]> icculus.org git repositories - btb/d2x.git/blob - main/bm.h
remove rcs tags
[btb/d2x.git] / main / bm.h
1 /*
2 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
3 SOFTWARE CORPORATION ("PARALLAX").  PARALLAX, IN DISTRIBUTING THE CODE TO
4 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
5 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
6 IN USING, DISPLAYING,  AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
7 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
8 FREE PURPOSES.  IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
9 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES.  THE END-USER UNDERSTANDS
10 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
11 COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
12 */
13
14 /*
15  *
16  * Bitmap and Palette loading functions.
17  *
18  */
19
20 #ifndef _BM_H
21 #define _BM_H
22
23 #include "gr.h"
24 #include "piggy.h"
25
26 #define MAX_TEXTURES    1200
27
28 //tmapinfo flags
29 #define TMI_VOLATILE    1   //this material blows up when hit
30 #define TMI_WATER       2   //this material is water
31 #define TMI_FORCE_FIELD 4   //this is force field - flares don't stick
32 #define TMI_GOAL_BLUE   8   //this is used to remap the blue goal
33 #define TMI_GOAL_RED    16  //this is used to remap the red goal
34 #define TMI_GOAL_HOARD  32  //this is used to remap the goals
35
36 typedef struct {
37         ubyte   flags;     //values defined above
38         ubyte   pad[3];    //keep alignment
39         fix     lighting;  //how much light this casts
40         fix     damage;    //how much damage being against this does (for lava)
41         short   eclip_num; //the eclip that changes this, or -1
42         short   destroyed; //bitmap to show when destroyed, or -1
43         short   slide_u,slide_v;    //slide rates of texture, stored in 8:8 fix
44         #ifdef EDITOR
45         char    filename[13];       //used by editor to remap textures
46         char    pad2[3];
47         #endif
48 } __pack__ tmap_info;
49
50 #define TMAP_INFO_SIZE 20   // how much space it takes up on disk
51
52 extern int Num_object_types;
53
54 #define N_COCKPIT_BITMAPS 6
55 extern int Num_cockpits;
56 extern bitmap_index cockpit_bitmap[N_COCKPIT_BITMAPS];
57
58 extern int Num_tmaps;
59 #ifdef EDITOR
60 extern int TmapList[MAX_TEXTURES];
61 #endif
62
63 extern tmap_info TmapInfo[MAX_TEXTURES];
64
65 //for each model, a model number for dying & dead variants, or -1 if none
66 extern int Dying_modelnums[];
67 extern int Dead_modelnums[];
68
69 //the model number of the marker object
70 extern int Marker_model_num;
71
72 // Initializes the palette, bitmap system...
73 int bm_init();
74 void bm_close();
75
76 // Initializes the Texture[] array of bmd_bitmap structures.
77 void init_textures();
78
79 extern int  Num_object_subtypes;     // Number of possible IDs for the current type of object to be placed
80
81 #define MAX_OBJ_BITMAPS     610
82
83 extern bitmap_index ObjBitmaps[MAX_OBJ_BITMAPS];
84 extern ushort ObjBitmapPtrs[MAX_OBJ_BITMAPS];
85 extern int First_multi_bitmap_num;
86
87 // Initializes all bitmaps from BITMAPS.TBL file.
88 int bm_init_use_tbl(void);
89
90 extern void bm_read_all(CFILE * fp);
91
92 int load_exit_models();
93
94 #endif /* _BM_H */