1 #include "3dc.h" 2 #include "module.h" 3 4 #include "stratdef.h" 5 #include "gamedef.h" 6 #include "comp_shp.h" 7 8 #define UseLocalAssert Yes 9 10 #include "ourasert.h" 11 12 extern SHAPEHEADER ** mainshapelist; 13 14 extern MAPBLOCK8 Player_and_Camera_Type8[]; 15 extern MAPBLOCK6 Empty_Object_Type6; 16 extern MAPBLOCK6 Term_Type6; 17 18 extern MODULEMAPBLOCK AvpCompiledMaps[]; 19 20 MAPHEADER Map[]={ 21 { 22 0, 23 0, 24 0, 25 0, 26 0, 27 0, 28 0, 29 &Player_and_Camera_Type8[0] 30 } 31 }; 32 33 34 MAPSETVDB chnk_playcam_vdb = { 35 36 ViewDB_Flag_AdjustScale 37 // | ViewDB_Flag_Hazing 38 | ViewDB_Flag_AddSubject 39 | ViewDB_Flag_ImageBackdrop 40 | ViewDB_Flag_FullSize, 41 42 0, 43 0, 44 45 0, 46 0, 47 48 0, 49 0, 50 0, 51 52 0, 53 0, 54 0, 55 0, 56 57 5000, /* Hazing in */ 58 30000, /*+ (ONE_FIXED << 0), hazing end */ 59 0, 60 61 /*col24(200,200,200),*/ /* Background Colour */ 62 /*col24(32,128,255),*/ /* Background Colour */ 63 0, /* Background Colour */ 64 /*col24(0,0,0),*/ /* Background Colour */ 65 /*col24(255,0,0),*/ /* Background Colour */ 66 67 65536 >> 2 , /* Ambience */ 68 69 #if 0 70 VState_RelativeYRemote, /* View State */ 71 2/*-1*/, /* View Distance */ 72 0,0, /* Pan X,Y */ 73 #endif 74 75 #if 1 76 VState_Inside, /* View State */ 77 1, /* View Distance */ 78 0,0, /* Pan X,Y */ 79 #endif 80 81 }; 82 83 84 85 86 /****************************************************************************/ 87 88 MAPBLOCK6 Empty_Landscape_Type6 = { 89 90 91 MapType_Default, 92 93 -1, /* No shape */ 94 95 {0,0,0}, /* Loc */ 96 {0,0,0}, /* Orient */ 97 98 ObFlag_MultLSrc 99 /*| ObFlag_BFCRO*/ 100 | ObFlag_VertexHazing 101 /* Hack CONSTANTINE */ 102 /* | ObFlag_SortFarZ */ 103 /*| ObFlag_RSP*/ 104 /*| ObFlag_NotVis*/ 105 /*| ObFlag_NoColls*/, /* Flags */ 106 107 #if StandardStrategyAndCollisions 108 StrategyI_Null, /* Strategy */ 109 CollType_Landscape,/* e.g. Shape or Landscape */ 110 GameCollStrat_Default, /* Game Collision Strategy */ 111 0, /* Shape Collision Strategy */ 112 0, /* Landscape Collision Strategy */ 113 #endif 114 115 0, /* VDB Definition */ 116 0 /* Interior Type */ 117 118 }; 119 120 121 122 MAPBLOCK6 Empty_Object_Type6 = { 123 124 125 MapType_Default, 126 127 -1, /* No shape */ 128 129 {0,0,0}, /* Loc */ 130 {0,0,0}, /* Orient */ 131 132 ObFlag_MultLSrc | 133 /*| ObFlag_BFCRO*/ 134 ObFlag_VertexHazing | 135 /* hack CONSTANTINE */ 136 /* ObFlag_SortFarZ | */ 137 /*| ObFlag_RSP*/ 138 /*| ObFlag_NotVis*/ 139 /*| ObFlag_NoColls*/ 140 0, /* Flags1 (no others in this map type)*/ 141 142 #if StandardStrategyAndCollisions 143 StrategyI_Null, /* Strategy */ 144 0,/* e.g. Shape or Landscape */ 145 GameCollStrat_Default, /* Game Collision Strategy */ 146 0, /* Shape Collision Strategy */ 147 0, /* Landscape Collision Strategy */ 148 #endif 149 0, /* VDB Definition */ 150 0 /* Interior Type */ 151 152 }; 153 154 155 MAPBLOCK6 Term_Type6 = { 156 157 /* map end */ 158 159 MapType_Term, 160 0, 161 {0,0,0}, 162 {0,0,0}, 163 0, /* Flags */ 164 165 #if StandardStrategyAndCollisions 166 0, /* Strategy */ 167 0, /* e.g. Shape or Landscape */ 168 0, /* Game Collision Strategy */ 169 0, /* Shape Collision Strategy */ 170 0, /* Landscape Collision Strategy */ 171 #endif 172 0, /* VDB Definition */ 173 0, /* Interior Type */ 174 175 }; 176 177 /****************************************************************************/ 178 179 180 MAPBLOCK8 Player_and_Camera_Type8[] = { 181 #if SupportModules 182 /* Ship */ 183 { 184 MapType_Player, 185 186 I_ShapeMarinePlayer, /*mainshapelist position 0*/ 187 188 189 /* MapType_Camera, */ 190 191 {0, 0, 0}, /* Loc */ 192 {0, 3062, 0}, /* Orient */ 193 194 ObFlag_MultLSrc 195 |0 196 |0, 197 /* Flags 2 */ 198 0 199 /* | ObFlag2_DirectedMerge */ 200 /* | ObFlag2_SurfaceAlign*/ 201 /* | ObFlag2_Augmented_LFR*/ 202 /* | ObFlag2_LFR_GuessReloc*/ 203 /* | ObFlag2_LFR_UseFRM*/ 204 /* | ObFlag2_FRM_VariableR */ 205 /* | ObFlag2_NoMotionLerp*/ 206 /*| ObFlag2_NoMerge*/ 207 /*| ObFlag2_NoMergeDIfNear*/ 208 /*| ObFlag2_NoMergeD*/ 209 |0, 210 211 0 212 | 0, /* Flags 3 */ 213 214 #if StandardStrategyAndCollisions 215 StrategyI_Player, /* Strategy */ 216 0, /* e.g. Shape or Landscape */ 217 GameCollStrat_Default, /* Game Collision Strategy */ 218 ShapeCStrat_DoubleExtentEllipsoid, /* Shape Collision Strategy */ 219 0, /* Landscape Collision Strategy */ 220 #endif 221 222 &chnk_playcam_vdb, /* VDB Definition */ 223 IType_Body, /* Interior Type */ 224 225 0, /* MapLightType */ 226 #if StandardStrategyAndCollisions 227 0, /* MapMass */ 228 0,0,0, /* MapNewtonV */ 229 #endif 230 {0,0,0}, /* MapOrigin */ 231 232 0, /* MapSimShapes */ 233 0, /* MapViewType */ 234 235 0, /* MapMPtr */ 236 237 0, /* MapDPtr */ 238 {0,0,0} /* MapMOffset */ 239 }, 240 241 /****************************************************************************/ 242 243 #if 0 244 /* Player Ship Camera - MUST be next map object */ 245 246 MapType_PlayerShipCamera, 247 248 I_ShapeCube, /* mainshapelist position 1 */ 249 250 0,0,0, /* Loc */ 251 0,0,0, /* Orient */ 252 0 253 |0 /* Flags 1 */ 254 | 0, 255 256 0, /* Flags 2 */ 257 0, /* Flags 3 */ 258 259 #if StandardStrategyAndCollisions 260 StrategyI_Camera, /* Strategy */ 261 0, /* e.g. Shape or Landscape */ 262 GameCollStrat_Default, /* Game Collision Strategy */ 263 0, /* Shape Collision Strategy */ 264 0, /* Landscape Collision Strategy */ 265 #endif 266 267 &chnk_playcam_vdb, /* VDB Definition */ 268 269 #if 0 270 271 IType_Default, /* Interior Type */ 272 273 #else 274 275 IType_Body, /* Interior Type */ 276 277 #endif 278 279 0, /* MapLightType */ 280 281 #if StandardStrategyAndCollisions 282 0, /* MapMass */ 283 0,0,0, /* MapNewtonV */ 284 #endif 285 0,0,0, /* MapOrigin */ 286 0, /* MapSimShapes */ 287 0, /* MapViewType */ 288 289 0, /* MapMPtr */ 290 0, /* MapDPtr */ 291 0,0,0, /* MapMOffset */ 292 #endif 293 294 /****************************************************************************/ 295 /****************************************************************************/ 296 /* Map End */ 297 #endif /*SupportModules*/ 298 { 299 MapType_Term, /* Map Type Function */ 300 0, /* Shape */ 301 {0,0,0}, /* Loc */ 302 {0,0,0}, /* Orient */ 303 0, /* Flags 1 */ 304 0, /* Flags 2 */ 305 0, /* Flags 3 */ 306 #if StandardStrategyAndCollisions 307 0, /* Strategy */ 308 0, /* e.g. Shape or Landscape */ 309 0, /* Game Collision Strategy */ 310 0, /* Shape Collision Strategy */ 311 0, /* Landscape Collision Strategy */ 312 #endif 313 0, /* VDB Definition */ 314 0, /* Interior Type */ 315 0, /* MapLightType */ 316 #if StandardStrategyAndCollisions 317 0, /* MapMass */ 318 0,0,0, /* MapNewtonV */ 319 #endif 320 {0,0,0}, /* MapOrigin */ 321 0, /* MapSimShapes */ 322 0, /* MapViewType */ 323 0, /* MapMPtr */ 324 0, /* MapDPtr */ 325 {0,0,0} /* MapMOffset */ 326 } 327 }; 328 329 330 331 /* ******************************************************************************** */ 332 333 334 /*--------------** 335 ** Module stuff ** 336 **--------------*/ 337 338 SCENEMODULE MainScene; 339 340 SCENEMODULE * MainSceneArray[] = 341 { 342 &MainScene, 343 0 344 }; 345 346 /* these are effectively mapblock8*/ 347 348 extern MODULEMAPBLOCK AvpCompiledMaps[]; 349 350 MODULEMAPBLOCK AvpCompiledMaps[] = { 351 /****************************************************************************/ 352 /****************************************************************************/ 353 /* Map End */ 354 { 355 MapType_Term, /* Map Type Function */ 356 0, /* Shape */ 357 {0,0,0}, /* Loc */ 358 {0,0,0}, /* Orient */ 359 0, /* Flags 1 */ 360 0, /* Flags 2 */ 361 0, /* Flags 3 */ 362 #if StandardStrategyAndCollisions 363 0, /* Strategy */ 364 0, /* e.g. Shape or Landscape */ 365 0, /* Game Collision Strategy */ 366 0, /* Shape Collision Strategy */ 367 0, /* Landscape Collision Strategy */ 368 #endif 369 0, /* VDB Definition */ 370 0, /* Interior Type */ 371 0, /* MapLightType */ 372 #if StandardStrategyAndCollisions 373 0, /* MapMass */ 374 0,0,0, /* MapNewtonV */ 375 #endif 376 {0,0,0}, /* MapOrigin */ 377 0, /* MapSimShapes */ 378 0, /* MapViewType */ 379 0, /* MapMPtr */ 380 0, /* MapDPtr */ 381 {0,0,0}, /* MapMOffset */ 382 } 383 }; 384 385 386 387 MODULE Empty_Module = { 388 389 mtype_module, /* MODULETYPE m_type */ 390 "null", /* char m_name[] */ 391 0, /* int m_index */ 392 0, /* int m_flags */ 393 {0,0,0}, /* VECTOR m_world */ 394 {"null"}, /* MREF m_ext */ 395 0, /* int m_ext_scale */ 396 0, /* int m_maxx */ 397 0, /* int m_minx */ 398 0, /* int m_maxy */ 399 0, /* int m_miny */ 400 0, /* int m_maxz */ 401 0, /* int m_minz */ 402 0, /* MODULEMAPBLOCK *m_mapptr */ 403 0, /* struct displayblock *m_dptr */ 404 {"null"}, /* MREF m_vptr */ 405 0, /* VMODULE *m_v_ptrs */ 406 0, /* struct module **m_link_ptrs */ 407 // 0, /* VIEWPORT *m_viewports */ 408 0, /* MODULETABLEHEADER *m_table */ 409 mfun_null, /* MFUNCTION m_ifvisible */ 410 mfun_null, /* MFUNCTION m_ifvinside */ 411 {"null"}, /* MREF m_funref */ 412 0, /* Strategy block * */ 413 0, /* num lights*/ 414 NULL, /* pointer to light blocks*/ 415 NULL, /* pointer to extraitemdata */ 416 417 {0,0,0, 418 0,0,0, 419 0,0,0}, 420 421 0, 422 }; 423 424 425 MODULE Term_Module = { 426 427 mtype_term /* MODULETYPE m_type */ 428 429 }; 430 431 432 // this is the one used for the loaded modules 433 434 MODULEMAPBLOCK Empty_Module_Map = 435 { 436 437 MapType_Default, /* MapType */ 438 -1, /* MapShape */ 439 {0, 0, 0}, /* MapWorld */ 440 {0, 0, 0}, /* MapEuler */ /* Orient */ 441 442 0 443 | ObFlag_MultLSrc /* MapFlags */ 444 | ObFlag_NoInfLSrc 445 //| ObFlag_BFCRO 446 //| ObFlag_VertexHazing 447 | 0, 448 449 0 450 //| ObFlag2_SortD 451 | 0, /* Flags 2 */ 452 453 0 454 | ObFlag3_ObjectSortedItems 455 | ObFlag3_NoLightDot 456 | ObFlag3_PreLit 457 | 0, /* Flags 3 */ 458 459 0, /* VDB Definition */ 460 0, /* Interior Type */ 461 462 LightType_PerVertex, /* MapLightType */ 463 {0,0,0}, /* MapOrigin */ 464 0, /* MapSimShapes */ 465 0, /* MapViewType */ 466 467 0, /* MapMPtr */ 468 0, /* MapDPtr */ 469 {0,0,0}, /* MapMOffset */ 470 471 }; 472 473 // !!!!!!!!!!!! 474 475 // Default ModuleMapBlock defined below; this will be used for 476 // run-time creation of both temporary, local, and global objects; 477 // for the most part, these objects will have no collisions, comprising 478 // sprite-based explosions, vertex-based explosion fragments, missiles, 479 // grenades, etc. They might also include "placeable" objects, like 480 // deposited inventory items, ammo, medpacks, etc. 481 482 // !!!!!!!!!!!! 483 484 MODULEMAPBLOCK TempModuleMap = \ 485 { 486 487 MapType_Default, /* MapType */ 488 -1, /* MapShape */ 489 490 {0, 0, 0}, /* MapWorld */ 491 {0, 0, 0}, /* MapEuler */ /* Orient */ 492 493 0 /* flags 1*/ 494 | ObFlag_NoInfLSrc 495 | ObFlag_MultLSrc 496 |0, 497 /* Flags 2 */ 498 0, 499 500 0 501 // | ObFlag3_NoLightDot 502 | 0, /* Flags 3 */ 503 504 0, /* VDB Definition */ 505 0, /* Interior Type */ 506 507 LightType_PerVertex, /* MapLightType */ 508 509 {0,0,0}, /* MapOrigin */ 510 0, /* MapSimShapes */ 511 0, /* MapViewType */ 512 0, /* MapMPtr */ 513 0, /* MapDPtr */ 514 {0,0,0} /* MapMOffset */ 515 516 }; 517 518