00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _OBJ_INIT_H_
00019 #define _OBJ_INIT_H_
00020
00021 #include "object.h"
00022 #include "editobj.h"
00023
00024
00025
00026 #define SPEEDUP_GEN_HEIGHT 22.0f
00027 #define SPEEDUP_GEN_WIDTH 15.0f
00028
00029
00030
00031
00032 typedef struct {
00033 long (*InitFunc)(OBJECT *obj, long *flags);
00034 long AllocSize;
00035 } OBJECT_INIT_DATA;
00036
00037 typedef struct {
00038 long FadeUp, FadeDown;
00039 REAL Range;
00040 MODEL_RGB rgb;
00041 VEC GlowOffset;
00042 } STROBE_TABLE;
00043
00044
00045
00046
00047
00048 #ifndef _PSX
00049 typedef struct {
00050 REAL SpinSpeed;
00051 } BARREL_OBJ;
00052
00053 typedef struct {
00054 long OwnPlanet, OrbitPlanet;
00055 REAL OrbitSpeed, SpinSpeed;
00056 VEC OrbitOffset;
00057 MAT OrbitMatrix;
00058 VISIMASK VisiMask;
00059 } PLANET_OBJ;
00060
00061 typedef struct {
00062 long r, g, b, rgb;
00063 REAL Rot, RotVel;
00064 } SUN_OVERLAY;
00065
00066 typedef struct {
00067 VEC Pos;
00068 long rgb;
00069 } SUN_STAR;
00070
00071 typedef struct {
00072 PLANET_OBJ Planet;
00073 SUN_OVERLAY Overlay[SUN_OVERLAY_NUM];
00074 SUN_STAR Star[SUN_STAR_NUM];
00075 #ifdef _PC
00076 VERTEX_TEX0 Verts[SUN_STAR_NUM];
00077 #endif
00078 #ifdef _N64
00079 Vtx Verts[SUN_STAR_NUM];
00080 #endif
00081 VISIMASK VisiMask;
00082 } SUN_OBJ;
00083
00084 typedef struct {
00085 long PropModel;
00086 REAL Rot, Speed;
00087 VEC GenPos, Offset, PropPos;
00088 MAT BankMatrix, PropMatrix;
00089 } PLANE_OBJ;
00090
00091
00092 #define COPTER_FLYING (0)
00093 #define COPTER_TURNING (1)
00094 #define COPTER_WAIT (2)
00095
00096 typedef struct {
00097 long BladeModel1, BladeModel2;
00098 VEC BladePos1, BladePos2;
00099 MAT BladeMatrix1, BladeMatrix2;
00100
00101 long State;
00102 QUATERNION OldInitialQuat;
00103 QUATERNION InitialQuat;
00104 QUATERNION CurrentUpQuat;
00105 REAL TurnTime;
00106 BBOX FlyBox;
00107 VEC Destination;
00108 VEC Direction;
00109 REAL MaxVel;
00110 REAL Acc;
00111
00112 } COPTER_OBJ;
00113
00114 typedef struct {
00115 long rgb;
00116 REAL Time, MinSize, Size, Spin, SpinSpeed;
00117 VEC Pos;
00118 MAT Matrix;
00119 } DRAGON_FIRE;
00120
00121 typedef struct {
00122 long BodyModel, HeadModel, FireGenTime;
00123 REAL Count;
00124 VEC FireGenPoint, FireGenDir;
00125 DRAGON_FIRE Fire[DRAGON_FIRE_NUM];
00126 } DRAGON_OBJ;
00127
00128 typedef struct {
00129 REAL Height, Time, TotalTime;
00130 } WATER_VERTEX;
00131
00132 typedef struct {
00133 long VertNum;
00134 REAL Scale;
00135 WATER_VERTEX Vert[1];
00136 } WATER_OBJ;
00137
00138 typedef struct {
00139 REAL Height;
00140 REAL TimeX, TotalTimeX;
00141 REAL TimeHeight, TotalTimeHeight;
00142 REAL TimeZ, TotalTimeZ;
00143 REAL SteamTime;
00144 MAT Ori;
00145 } BOAT_OBJ;
00146
00147 typedef struct {
00148 REAL Time;
00149 LIGHT *Light1, *Light2;
00150 } RADAR_OBJ;
00151
00152 typedef struct {
00153 REAL Time, Height;
00154 } BALLOON_OBJ;
00155
00156 typedef struct {
00157 REAL CreakFlag, Time;
00158 MAT Mat;
00159 } HORSE_OBJ;
00160
00161 typedef struct {
00162 VEC WheelPos[4];
00163 long FrontWheel, BackWheel, WhistleFlag;
00164 REAL TimeFront, TimeBack, SteamTime;
00165 } TRAIN_OBJ;
00166
00167 typedef struct {
00168 long StrobeCount, StrobeNum;
00169 long FadeUp, FadeDown;
00170 long r, g, b;
00171 REAL Range, Glow;
00172 VEC LightPos;
00173 } STROBE_OBJ;
00174
00175 typedef struct {
00176 } SPACEMAN_OBJ;
00177
00178 typedef struct {
00179 long Mode, Clone;
00180 REAL Timer;
00181 VEC Pos, Vel;
00182 } PICKUP_OBJ;
00183
00184 typedef struct{
00185 VEC Vel, Rot;
00186 } DISSOLVE_PARTICLE;
00187
00188 typedef struct{
00189 REAL Age;
00190 MODEL Model;
00191 long EnvRGB;
00192 } DISSOLVE_OBJ;
00193
00194 typedef struct {
00195 VEC Dest;
00196 VEC Delta;
00197 REAL Dist;
00198 REAL Width;
00199 REAL RandWidth;
00200 REAL Length;
00201 long Phase;
00202 bool ObjectCollide;
00203 VISIMASK VisiMask;
00204 } LASER_OBJ;
00205
00206 typedef struct {
00207 VEC Pos[4];
00208 VEC Vel[4];
00209 REAL Frame, FrameAdd;
00210 } SPLASH_POLY;
00211
00212 typedef struct {
00213 long Count;
00214 SPLASH_POLY Poly[SPLASH_POLY_NUM];
00215 } SPLASH_OBJ;
00216
00217 struct CollPolyStruct;
00218 typedef struct {
00219 REAL Width, Height;
00220 REAL LoSpeed, HiSpeed, Speed;
00221 REAL ChangeTime, Time;
00222 struct CollPolyStruct CollPoly;
00223 VEC PostPos[2];
00224 REAL HeightMod[2];
00225 } SPEEDUP_OBJ;
00226
00227
00228 #endif // _PSX
00229
00230
00231
00232 #ifdef _PC
00233 extern void LoadObjects(char *file);
00234 #endif
00235 #ifdef _N64
00236 extern void LoadObjects();
00237 extern long LoadOneLevelModel(long id, long flag, struct renderflags renderflag, long tpage);
00238 #endif
00239 extern OBJECT *CreateObject(VEC *pos, MAT *mat, long ID, long *flags);
00240
00241
00242
00243 #endif