]> icculus.org git repositories - taylor/freespace2.git/blob - src/freespace2/levelpaging.cpp
make loading screen and title screen work with emterpreter async
[taylor/freespace2.git] / src / freespace2 / levelpaging.cpp
1 /*
2  * Copyright (C) Volition, Inc. 1999.  All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell 
5  * or otherwise commercially exploit the source or things you created based on
6  * the source.
7  */
8
9 /*
10  * $Logfile: /Freespace2/code/Freespace2/LevelPaging.cpp $
11  * $Revision$
12  * $Date$
13  * $Author$
14  *
15  * Code to page in all the bitmaps at the beginning of a level.
16  *
17  * $Log$
18  * Revision 1.3  2002/06/09 04:41:17  relnev
19  * added copyright header
20  *
21  * Revision 1.2  2002/05/07 03:16:44  theoddone33
22  * The Great Newline Fix
23  *
24  * Revision 1.1.1.1  2002/05/03 03:28:09  root
25  * Initial import.
26  *
27  * 
28  * 4     8/19/99 10:12a Alanl
29  * preload mission-specific messages on machines greater than 48MB
30  * 
31  * 3     8/10/99 6:54p Dave
32  * Mad optimizations. Added paging to the nebula effect.
33  * 
34  * 2     10/07/98 10:54a Dave
35  * Initial checkin.
36  * 
37  * 1     10/07/98 10:48a Dave
38  * 
39  * 6     5/23/98 4:14p John
40  * Added code to preload textures to video card for AGP.   Added in code
41  * to page in some bitmaps that weren't getting paged in at level start.
42  * 
43  * 5     4/05/98 4:15p Dave
44  * Fixed a weapons model paging problem with the standalone server.
45  * 
46  * 4     4/01/98 5:34p John
47  * Made only the used POFs page in for a level.   Reduced some interp
48  * arrays.    Made custom detail level work differently.
49  * 
50  * 3     3/29/98 4:05p John
51  * New paging code that loads everything necessary at level startup.
52  * 
53  * 2     3/26/98 5:26p John
54  * added new paging code. nonfunctional.
55  * 
56  * 1     3/26/98 5:14p John
57  *
58  * $NoKeywords: $
59  */
60
61 #include "freespace.h"
62 #include "bmpman.h"
63 #include "levelpaging.h"
64
65 // All the page in functions
66 extern void ship_page_in();
67 extern void debris_page_in();
68 extern void particle_page_in();
69 extern void stars_page_in();
70 extern void hud_page_in();
71 extern void radar_page_in();
72 extern void weapons_page_in();
73 extern void fireballs_page_in();
74 extern void shockwave_page_in();
75 extern void shield_hit_page_in();
76 extern void asteroid_page_in();
77 extern void training_mission_page_in();
78 extern void neb2_page_in();
79 extern void message_pagein_mission_messages();
80
81 // Pages in all the texutures for the currently
82 // loaded mission.  Call game_busy() occasionally...
83 extern "C"
84 void level_page_in()
85 {
86
87         mprintf(( "Beginning level bitmap paging...\n" ));
88
89         if(!(Game_mode & GM_STANDALONE_SERVER)){                
90                 bm_page_in_start();
91         }
92
93         // Most important ones first
94         ship_page_in();
95         weapons_page_in();
96         fireballs_page_in();
97         particle_page_in();
98         debris_page_in();
99         hud_page_in();
100         radar_page_in();
101         training_mission_page_in();
102         stars_page_in();
103         shockwave_page_in();
104         shield_hit_page_in();
105         asteroid_page_in();
106         neb2_page_in();
107
108         // preload mission messages if NOT running low-memory (greater than 48MB)
109         if (game_using_low_mem() == false) {
110                 message_pagein_mission_messages();
111         }
112
113         if(!(Game_mode & GM_STANDALONE_SERVER)){
114                 bm_page_in_stop();
115         }
116
117         mprintf(( "Ending level bitmap paging...\n" ));
118
119 }
120