Super Mario 64s source code (from a leak on 4chan so be careful)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

113 lines
7.8 KiB

6 years ago
  1. #ifndef _SPECIAL_PRESETS_H
  2. #define _SPECIAL_PRESETS_H
  3. #include "special_preset_names.h"
  4. #include "behavior_data.h"
  5. #include "model_ids.h"
  6. // Special Preset types
  7. #define SPTYPE_NO_YROT_OR_PARAMS 0 // object is 8-bytes long, no y-rotation or any behavior params
  8. #define SPTYPE_YROT_NO_PARAMS 1 // object is 10-bytes long, has y-rotation but no params
  9. #define SPTYPE_PARAMS_AND_YROT 2 // object is 12-bytes long, has y-rotation and params
  10. #define SPTYPE_UNKNOWN 3 // object is 14-bytes long, has 3 extra shorts that get converted to floats.
  11. #define SPTYPE_DEF_PARAM_AND_YROT 4 // object is 10-bytes long, has y-rotation and uses the default param
  12. struct SpecialPreset
  13. {
  14. /*00*/ u8 preset_id;
  15. /*01*/ u8 type; // Determines whether object is 8, 10, 12 or 14 bytes long.
  16. /*02*/ u8 defParam; // Default parameter, only used when type is SPTYPE_DEF_PARAM_AND_YROT
  17. /*03*/ u8 model;
  18. /*04*/ u32 *behavior;
  19. };
  20. // Some Models ID's are missing their names because they are probably unused
  21. static struct SpecialPreset SpecialObjectPresets[] =
  22. {
  23. {0x00, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_NONE, NULL},
  24. {0x01, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_YELLOW_COIN, bhvYellowCoin},
  25. {0x02, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_YELLOW_COIN, bhvYellowCoin},
  26. {0x03, SPTYPE_NO_YROT_OR_PARAMS , 0x00, 0xB8, bhvStaticObject},
  27. {0x04, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_BOO, bhvBooGroup},
  28. {0x05, SPTYPE_NO_YROT_OR_PARAMS , 0x00, 0xAC, bhvCastleFloorTrap},
  29. {0x06, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_LLL_MOVING_OCTAGONAL_MESH_PLATFORM, bhvLllMovingOctagonalMeshPlatform},
  30. {0x07, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_CCM_SNOWMAN_HEAD, bhvSnowBall},
  31. {0x08, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_LLL_DRAWBRIDGE_PART, bhvLllDrawbridgeSpawner},
  32. {0x09, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_NONE, bhvStaticObject},
  33. {0x0A, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_LLL_ROTATING_BLOCK_FIRE_BARS, bhvLllRotatingBlockWithFireBars},
  34. {0x0B, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_NONE, bhvLllFloatingWoodBridge},
  35. {0x0C, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_NONE, bhvLllTumblingBridge},
  36. {0x0D, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_LLL_ROTATING_HEXAGONAL_RING , bhvLllRotatingHexagonalRing},
  37. {0x0E, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_LLL_SINKING_RECTANGULAR_PLATFORM, bhvLllSinkingRectangularPlatform},
  38. {0x0F, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_LLL_SINKING_SQUARE_PLATFORMS, bhvLllSinkingSquarePlatforms},
  39. {0x10, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_LLL_TILTING_SQUARE_PLATFORM, bhvLllTiltingSquarePlatform},
  40. {0x11, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_NONE, bhvLllBowserPuzzle},
  41. {0x12, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_NONE, bhvMrI},
  42. {0x13, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_BULLY, bhvSmallBully},
  43. {0x14, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_BULLY_BOSS, bhvBigBully},
  44. {0x15, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_NONE, bhvStaticObject},
  45. {0x16, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_NONE, bhvStaticObject},
  46. {0x17, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_NONE, bhvStaticObject},
  47. {0x18, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_NONE, bhvStaticObject},
  48. {0x19, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_NONE, bhvStaticObject},
  49. {0x1A, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_YELLOW_COIN, bhvMovingBlueCoin}, // ??
  50. {0x1B, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_TREASURE_CHEST_BASE, bhvBetaChest},
  51. {0x1C, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_WATER_RING, bhvJetStreamRingSpawner},
  52. {0x1D, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_WATER_MINE, bhvBowserBomb},
  53. {0x1E, SPTYPE_UNKNOWN , 0x00, MODEL_NONE, bhvStaticObject},
  54. {0x1F, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_NONE, bhvStaticObject},
  55. {0x20, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_BUTTERFLY, bhvButterfly},
  56. {0x21, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_BOWSER, bhvBowser},
  57. {0x22, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_WF_ROTATING_WOODEN_PLATFORM, bhvWfRotatingWoodenPlatform},
  58. {0x23, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_WF_SMALL_BOMP, bhvSmallBomp},
  59. {0x24, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_WF_SLIDING_PLATFORM, bhvWfSlidingPlatform},
  60. {0x25, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_NONE, bhvTowerPlatformGroup},
  61. {0x26, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_NONE, bhvRotatingCounterClockwise},
  62. {0x27, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_WF_TUMBLING_BRIDGE, bhvWfTumblingBridge},
  63. {0x28, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_WF_LARGE_BOMP, bhvLargeBomp},
  64. {0x65, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_LEVEL_GEOMETRY_03, bhvStaticObject},
  65. {0x66, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_LEVEL_GEOMETRY_04, bhvStaticObject},
  66. {0x67, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_LEVEL_GEOMETRY_05, bhvStaticObject},
  67. {0x68, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_LEVEL_GEOMETRY_06, bhvStaticObject},
  68. {0x69, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_LEVEL_GEOMETRY_07, bhvStaticObject},
  69. {0x6A, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_LEVEL_GEOMETRY_08, bhvStaticObject},
  70. {0x6B, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_LEVEL_GEOMETRY_09, bhvStaticObject},
  71. {0x6C, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_LEVEL_GEOMETRY_0A, bhvStaticObject},
  72. {0x6D, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_LEVEL_GEOMETRY_0B, bhvStaticObject},
  73. {0x6E, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_LEVEL_GEOMETRY_0C, bhvStaticObject},
  74. {0x6F, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_LEVEL_GEOMETRY_0D, bhvStaticObject},
  75. {0x70, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_LEVEL_GEOMETRY_0E, bhvStaticObject},
  76. {0x71, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_LEVEL_GEOMETRY_0F, bhvStaticObject},
  77. {0x72, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_LEVEL_GEOMETRY_10, bhvStaticObject},
  78. {0x73, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_LEVEL_GEOMETRY_11, bhvStaticObject},
  79. {0x74, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_LEVEL_GEOMETRY_12, bhvStaticObject},
  80. {0x75, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_LEVEL_GEOMETRY_13, bhvStaticObject},
  81. {0x76, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_LEVEL_GEOMETRY_14, bhvStaticObject},
  82. {0x77, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_LEVEL_GEOMETRY_15, bhvStaticObject},
  83. {0x78, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_LEVEL_GEOMETRY_16, bhvStaticObject},
  84. {0x79, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_BOB_BUBBLY_TREE, bhvTree},
  85. {0x7A, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_COURTYARD_SPIKY_TREE, bhvTree},
  86. {0x7B, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_CCM_SNOW_TREE, bhvTree},
  87. {0x7C, SPTYPE_NO_YROT_OR_PARAMS , 0x00, 0x1A, bhvTree},
  88. {0x7D, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_SSL_PALM_TREE, bhvTree},
  89. {0x89, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_CASTLE_CASTLE_DOOR2, bhvDoor},
  90. {0x7E, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_CASTLE_WOODEN_DOOR2, bhvDoor},
  91. {0x7F, SPTYPE_YROT_NO_PARAMS , 0x00, 0x1E, bhvDoor},
  92. {0x80, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_HMC_METAL_DOOR, bhvDoor},
  93. {0x81, SPTYPE_YROT_NO_PARAMS , 0x00, MODEL_HMC_HAZY_MAZE_DOOR, bhvDoor},
  94. {0x82, SPTYPE_YROT_NO_PARAMS , 0x00, 0x21, bhvDoor},
  95. {0x8A, SPTYPE_DEF_PARAM_AND_YROT, 0x00, MODEL_CASTLE_DOOR_0_STARS, bhvDoor},
  96. {0x8B, SPTYPE_DEF_PARAM_AND_YROT, 0x01, MODEL_CASTLE_DOOR_1_STAR, bhvDoor},
  97. {0x8C, SPTYPE_DEF_PARAM_AND_YROT, 0x03, MODEL_CASTLE_DOOR_3_STARS, bhvDoor},
  98. {0x8D, SPTYPE_DEF_PARAM_AND_YROT, 0x00, MODEL_CASTLE_KEY_DOOR, bhvDoor},
  99. {0x88, SPTYPE_PARAMS_AND_YROT , 0x00, MODEL_CASTLE_CASTLE_DOOR, bhvDoorWarp},
  100. {0x83, SPTYPE_PARAMS_AND_YROT , 0x00, MODEL_CASTLE_WOODEN_DOOR, bhvDoorWarp},
  101. {0x84, SPTYPE_PARAMS_AND_YROT , 0x00, 0x28, bhvDoorWarp},
  102. {0x85, SPTYPE_PARAMS_AND_YROT , 0x00, MODEL_CASTLE_METAL_DOOR, bhvDoorWarp},
  103. {0x86, SPTYPE_PARAMS_AND_YROT , 0x00, 0x2A, bhvDoorWarp},
  104. {0x87, SPTYPE_PARAMS_AND_YROT , 0x00, 0x2B, bhvDoorWarp},
  105. {0xFF, SPTYPE_NO_YROT_OR_PARAMS , 0x00, MODEL_NONE, NULL}
  106. };
  107. #endif // _SPECIAL_PRESETS_H