mirror of
https://github.com/izzy2lost/Diddy-Kong-Racing.git
synced 2026-06-19 01:16:26 -07:00
game_ui.c rework (#493)
* got overzealous with the alignments * small knowledge improvement on models * true * add enum size entries for easy ref * bgload names I forgot to merge in * transition memes * absinthe * brug * anguish * hell * getting there * misery * Update README.md * Update include/structs.h Co-authored-by: Ryan Myers <ryan.p.myers@gmail.com> * format moment * Delete object_animate.s * Update obj_animate.s * remembered to rename this --------- Co-authored-by: Ryan Myers <ryan.p.myers@gmail.com>
This commit is contained in:
+63
-21
@@ -55,7 +55,9 @@ typedef enum AssetSectionsEnum {
|
||||
ASSET_BINARY_46,
|
||||
ASSET_BINARY_47,
|
||||
ASSET_TTGHOSTS_TABLE,
|
||||
ASSET_TTGHOSTS
|
||||
ASSET_TTGHOSTS,
|
||||
|
||||
ASSET_SECTIONS_COUNT
|
||||
} AssetSectionsEnum;
|
||||
|
||||
/********** ASSET_AI_BEHAVIOUR **********/
|
||||
@@ -70,7 +72,9 @@ typedef enum AssetAiBehaviourEnum {
|
||||
ASSET_AI_BEHAVIOUR_6,
|
||||
ASSET_AI_BEHAVIOUR_7,
|
||||
ASSET_AI_BEHAVIOUR_8,
|
||||
ASSET_AI_BEHAVIOUR_9
|
||||
ASSET_AI_BEHAVIOUR_9,
|
||||
|
||||
ASSET_AI_BEHAVIOUR_COUNT
|
||||
} AssetAiBehaviourEnum;
|
||||
|
||||
/********** ASSET_TEXTURES_3D **********/
|
||||
@@ -1476,7 +1480,9 @@ typedef enum AssetTextures3dEnum {
|
||||
ASSET_TEX3D_COMMON_SAND6,
|
||||
ASSET_TEX3D_TROPICAL_PALMTREESHADOWLONG,
|
||||
ASSET_TEX3D_COMMON_DEBUGBLACKWHITE,
|
||||
ASSET_TEX3D_SPACE_RAREWARESIGNNONBLINKING
|
||||
ASSET_TEX3D_SPACE_RAREWARESIGNNONBLINKING,
|
||||
|
||||
ASSET_TEXTURES_3D_COUNT
|
||||
} AssetTextures3dEnum;
|
||||
|
||||
/********** ASSET_TEXTURES_2D **********/
|
||||
@@ -2387,7 +2393,9 @@ typedef enum AssetTextures2dEnum {
|
||||
ASSET_TEX2D_MENU_ICONTTAMULET3_0,
|
||||
ASSET_TEX2D_MENU_ICONTTAMULET3_1,
|
||||
ASSET_TEX2D_MENU_ICONTTAMULET4_0,
|
||||
ASSET_TEX2D_MENU_ICONTTAMULET4_1
|
||||
ASSET_TEX2D_MENU_ICONTTAMULET4_1,
|
||||
|
||||
ASSET_TEXTURES_2D_COUNT
|
||||
} AssetTextures2dEnum;
|
||||
|
||||
/********** ASSET_GAME_TEXT **********/
|
||||
@@ -2647,7 +2655,9 @@ typedef enum AssetGameTextEnum {
|
||||
ASSET_GAME_TEXT_251,
|
||||
ASSET_GAME_TEXT_252,
|
||||
ASSET_GAME_TEXT_253,
|
||||
ASSET_GAME_TEXT_254
|
||||
ASSET_GAME_TEXT_254,
|
||||
|
||||
ASSET_GAME_TEXT_COUNT
|
||||
} AssetGameTextEnum;
|
||||
|
||||
/********** ASSET_MENU_TEXT **********/
|
||||
@@ -2845,7 +2855,9 @@ typedef enum AssetMenuTextIdsEnum {
|
||||
ASSET_MENU_TEXT_SUBTITLESON,
|
||||
ASSET_MENU_TEXT_SUBTITLESOFF,
|
||||
ASSET_MENU_TEXT_CORRUPTDATA_0,
|
||||
ASSET_MENU_TEXT_CORRUPTDATA_1
|
||||
ASSET_MENU_TEXT_CORRUPTDATA_1,
|
||||
|
||||
ASSET_MENU_TEXT_COUNT
|
||||
} AssetMenuTextIdsEnum;
|
||||
|
||||
/********** ASSET_SPRITES **********/
|
||||
@@ -3043,7 +3055,9 @@ typedef enum AssetSpritesEnum {
|
||||
ASSET_SPRITE_MENU_ICONTROPHY,
|
||||
ASSET_SPRITE_MENU_ICONKEY,
|
||||
ASSET_SPRITE_MENU_ICONWIZPIGAMULET,
|
||||
ASSET_SPRITE_MENU_ICONTTAMULET
|
||||
ASSET_SPRITE_MENU_ICONTTAMULET,
|
||||
|
||||
ASSET_SPRITES_COUNT
|
||||
} AssetSpritesEnum;
|
||||
|
||||
/********** ASSET_MISC **********/
|
||||
@@ -3118,7 +3132,9 @@ typedef enum AssetMiscEnum {
|
||||
ASSET_MISC_TITLE_SCREEN_DEMO_IDS,
|
||||
ASSET_MISC_67,
|
||||
ASSET_MISC_68,
|
||||
ASSET_MISC_69
|
||||
ASSET_MISC_69,
|
||||
|
||||
ASSET_MISC_COUNT
|
||||
} AssetMiscEnum;
|
||||
|
||||
/********** ASSET_LEVEL_OBJECT_MAPS **********/
|
||||
@@ -3261,7 +3277,9 @@ typedef enum AssetLevelObjectMapsEnum {
|
||||
ASSET_LEVEL_OBJECT_MAPS_134,
|
||||
ASSET_LEVEL_OBJECT_MAPS_135,
|
||||
ASSET_LEVEL_OBJECT_MAPS_136,
|
||||
ASSET_LEVEL_OBJECT_MAPS_137
|
||||
ASSET_LEVEL_OBJECT_MAPS_137,
|
||||
|
||||
ASSET_LEVEL_OBJECT_MAPS_COUNT
|
||||
} AssetLevelObjectMapsEnum;
|
||||
|
||||
/********** ASSET_LEVEL_HEADERS **********/
|
||||
@@ -3331,7 +3349,9 @@ typedef enum AssetLevelHeadersEnum {
|
||||
ASSET_LEVEL_BUBBLERANIM,
|
||||
ASSET_LEVEL_WIZPIG2ANIM,
|
||||
ASSET_LEVEL_LASTBIT,
|
||||
ASSET_LEVEL_LASTBITB
|
||||
ASSET_LEVEL_LASTBITB,
|
||||
|
||||
ASSET_LEVEL_HEADERS_COUNT
|
||||
} AssetLevelHeadersEnum;
|
||||
|
||||
/********** ASSET_LEVEL_NAMES **********/
|
||||
@@ -3401,7 +3421,9 @@ typedef enum AssetLevelNamesEnum {
|
||||
ASSET_LEVEL_BUBBLERANIM_NAME,
|
||||
ASSET_LEVEL_WIZPIG2ANIM_NAME,
|
||||
ASSET_LEVEL_LASTBIT_NAME,
|
||||
ASSET_LEVEL_LASTBITB_NAME
|
||||
ASSET_LEVEL_LASTBITB_NAME,
|
||||
|
||||
ASSET_LEVEL_NAMES_COUNT
|
||||
} AssetLevelNamesEnum;
|
||||
|
||||
/********** ASSET_LEVEL_MODELS **********/
|
||||
@@ -3461,7 +3483,9 @@ typedef enum AssetLevelModelsEnum {
|
||||
ASSET_LEVELMODEL_WIZPIG2ANIMATION,
|
||||
ASSET_LEVELMODEL_WIZPIG2,
|
||||
ASSET_LEVELMODEL_ENDINGPART1,
|
||||
ASSET_LEVELMODEL_ENDINGPART2
|
||||
ASSET_LEVELMODEL_ENDINGPART2,
|
||||
|
||||
ASSET_LEVEL_MODELS_COUNT
|
||||
} AssetLevelModelsEnum;
|
||||
|
||||
/********** ASSET_OBJECT_MODELS **********/
|
||||
@@ -3856,7 +3880,9 @@ typedef enum AssetObjectModelsEnum {
|
||||
ASSET_OBJECTMODEL_TTDOOR_2,
|
||||
ASSET_OBJECTMODEL_PIGLOG,
|
||||
ASSET_OBJECTMODEL_KEITHPIGDOOR,
|
||||
ASSET_OBJECTMODEL_MAGNETFX
|
||||
ASSET_OBJECTMODEL_MAGNETFX,
|
||||
|
||||
ASSET_OBJECT_MODELS_COUNT
|
||||
} AssetObjectModelsEnum;
|
||||
|
||||
/********** ASSET_OBJECT_ANIMATIONS **********/
|
||||
@@ -4331,7 +4357,9 @@ typedef enum AssetObjectAnimationsEnum {
|
||||
ASSET_OBJECT_ANIMATIONS_466,
|
||||
ASSET_OBJECT_ANIMATIONS_467,
|
||||
ASSET_OBJECT_ANIMATIONS_468,
|
||||
ASSET_OBJECT_ANIMATIONS_469
|
||||
ASSET_OBJECT_ANIMATIONS_469,
|
||||
|
||||
ASSET_OBJECT_ANIMATIONS_COUNT
|
||||
} AssetObjectAnimationsEnum;
|
||||
|
||||
/********** ASSET_OBJECTS **********/
|
||||
@@ -4640,7 +4668,9 @@ typedef enum AssetObjectsEnum {
|
||||
ASSET_OBJECT_LIGHTNING,
|
||||
ASSET_OBJECT_MIDIFADEPOINT,
|
||||
ASSET_OBJECT_LEVELNAME,
|
||||
ASSET_OBJECT_MIDICHSET
|
||||
ASSET_OBJECT_MIDICHSET,
|
||||
|
||||
ASSET_OBJECTS_COUNT
|
||||
} AssetObjectsEnum;
|
||||
|
||||
/********** ASSET_LEVEL_OBJECT_TRANSLATION_TABLE **********/
|
||||
@@ -4950,7 +4980,9 @@ typedef enum AssetLevelObjectTranslationTableEnum {
|
||||
NULL_OBJECT_301_ID,
|
||||
ASSET_OBJECT_ID_LIGHTHOUSE2,
|
||||
ASSET_OBJECT_ID_CHICKENCHARACTE,
|
||||
ASSET_OBJECT_ID_INFOPOINT
|
||||
ASSET_OBJECT_ID_INFOPOINT,
|
||||
|
||||
ASSET_LEVEL_OBJECT_TRANSLATION_TABLE_COUNT
|
||||
} AssetLevelObjectTranslationTableEnum;
|
||||
|
||||
/********** ASSET_AUDIO **********/
|
||||
@@ -4968,7 +5000,9 @@ typedef enum AssetAudioEnum {
|
||||
ASSET_AUDIO_9,
|
||||
ASSET_AUDIO_10,
|
||||
ASSET_AUDIO_11,
|
||||
ASSET_AUDIO_12
|
||||
ASSET_AUDIO_12,
|
||||
|
||||
ASSET_AUDIO_COUNT
|
||||
} AssetAudioEnum;
|
||||
|
||||
/********** ASSET_PARTICLES **********/
|
||||
@@ -5043,7 +5077,9 @@ typedef enum AssetParticlesEnum {
|
||||
ASSET_PARTICLES_66,
|
||||
ASSET_PARTICLES_67,
|
||||
ASSET_PARTICLES_68,
|
||||
ASSET_PARTICLES_69
|
||||
ASSET_PARTICLES_69,
|
||||
|
||||
ASSET_PARTICLES_COUNT
|
||||
} AssetParticlesEnum;
|
||||
|
||||
/********** ASSET_PARTICLE_BEHAVIORS **********/
|
||||
@@ -5123,7 +5159,9 @@ typedef enum AssetParticleBehaviorsEnum {
|
||||
ASSET_PARTICLE_BEHAVIORS_71,
|
||||
ASSET_PARTICLE_BEHAVIORS_72,
|
||||
ASSET_PARTICLE_BEHAVIORS_73,
|
||||
ASSET_PARTICLE_BEHAVIORS_74
|
||||
ASSET_PARTICLE_BEHAVIORS_74,
|
||||
|
||||
ASSET_PARTICLE_BEHAVIORS_COUNT
|
||||
} AssetParticleBehaviorsEnum;
|
||||
|
||||
/********** ASSET_FONTS **********/
|
||||
@@ -5132,7 +5170,9 @@ typedef enum AssetFontsEnum {
|
||||
ASSET_FONTS_FUNFONT,
|
||||
ASSET_FONTS_SMALLFONT,
|
||||
ASSET_FONTS_BIGFONT,
|
||||
ASSET_FONTS_SUBTITLEFONT
|
||||
ASSET_FONTS_SUBTITLEFONT,
|
||||
|
||||
ASSET_FONTS_COUNT
|
||||
} AssetFontsEnum;
|
||||
|
||||
/********** ASSET_TTGHOSTS **********/
|
||||
@@ -5157,7 +5197,9 @@ typedef enum AssetTtghostsEnum {
|
||||
ASSET_TTGHOSTS_TREASURECAVES,
|
||||
ASSET_TTGHOSTS_HAUNTEDWOODS,
|
||||
ASSET_TTGHOSTS_DARKMOONCAVERNS,
|
||||
ASSET_TTGHOSTS_STARCITY
|
||||
ASSET_TTGHOSTS_STARCITY,
|
||||
|
||||
ASSET_TTGHOSTS_COUNT
|
||||
} AssetTtghostsEnum;
|
||||
|
||||
#endif
|
||||
|
||||
+2
-1
@@ -37,7 +37,8 @@ typedef enum Vehicle {
|
||||
VEHICLE_PLANE,
|
||||
VEHICLE_FLYING_CAR,
|
||||
VEHICLE_LOOPDELOOP,
|
||||
VEHICLE_TRICKY,
|
||||
VEHICLE_BOSSES,
|
||||
VEHICLE_TRICKY = VEHICLE_BOSSES,
|
||||
VEHICLE_BLUEY,
|
||||
VEHICLE_SMOKEY,
|
||||
VEHICLE_PTERODACTYL,
|
||||
|
||||
@@ -134,7 +134,7 @@ typedef struct SaveConfig {
|
||||
unsigned subtitles : 1;
|
||||
unsigned unk0 : 31;
|
||||
// unsigned checksum : 8; // For some reason, the struct becomes 12 bytes if this is there.
|
||||
} SaveConfig ALIGNED8;
|
||||
} SaveConfig;
|
||||
|
||||
typedef struct SaveFile {
|
||||
unsigned checksum : 16;
|
||||
@@ -207,13 +207,13 @@ typedef struct SaveFile {
|
||||
unsigned sceneWorld5Key : 1; // Unused
|
||||
|
||||
unsigned name : 15;
|
||||
} SaveFile ALIGNED8;
|
||||
} SaveFile;
|
||||
|
||||
typedef struct CourseRecords {
|
||||
u16 checksum;
|
||||
u16 padding;
|
||||
u32 courseTime[COURSE_RECORD_TOTAL];
|
||||
} CourseRecords ALIGNED8;
|
||||
} CourseRecords;
|
||||
|
||||
typedef struct SaveBuffer {
|
||||
SaveFile gameSave[NUMBER_OF_SAVE_FILES];
|
||||
|
||||
+31
-6
@@ -24,6 +24,16 @@ typedef struct Vec3f {
|
||||
};
|
||||
} Vec3f;
|
||||
|
||||
typedef struct Vec2f {
|
||||
union {
|
||||
struct {
|
||||
f32 x;
|
||||
f32 y;
|
||||
};
|
||||
f32 f[2];
|
||||
};
|
||||
} Vec2f;
|
||||
|
||||
typedef struct Vec3s {
|
||||
union {
|
||||
struct {
|
||||
@@ -40,6 +50,20 @@ typedef struct Vec3s {
|
||||
};
|
||||
} Vec3s;
|
||||
|
||||
typedef struct Vec2s {
|
||||
union {
|
||||
struct {
|
||||
s16 y_rotation;
|
||||
s16 x_rotation;
|
||||
};
|
||||
struct {
|
||||
s16 x;
|
||||
s16 y;
|
||||
};
|
||||
s16 s[2];
|
||||
};
|
||||
} Vec2s;
|
||||
|
||||
typedef struct Vec3i {
|
||||
union {
|
||||
struct {
|
||||
@@ -628,6 +652,7 @@ typedef struct ObjectModel {
|
||||
/* 0x4C */ s32 *unk4C;
|
||||
/* 0x50 */ s16 unk50;
|
||||
/* 0x52 */ s16 unk52;
|
||||
/* 0x54 */ u8 pad[0x2C];
|
||||
} ObjectModel;
|
||||
|
||||
/* Size: 0x44 bytes */
|
||||
@@ -1367,7 +1392,7 @@ typedef struct Object_Racer {
|
||||
/* 0x291 */ s8 indicator_timer;
|
||||
/* 0x1FA */ s8 drifting;
|
||||
/* 0x1FB */ s8 unk1FB;
|
||||
/* 0x1FC */ u8 unk1FC;
|
||||
/* 0x1FC */ u8 wrongWayCounter;
|
||||
/* 0x1FD */ s8 cameraIndex;
|
||||
/* 0x1FE */ u8 unk1FE;
|
||||
/* 0x1FF */ u8 unk1FF;
|
||||
@@ -1669,7 +1694,7 @@ typedef struct Object_68 {
|
||||
ObjectModel *objModel;
|
||||
TextureHeader *texHeader;
|
||||
};
|
||||
/* 0x04 */ Vertex *unk4[2];
|
||||
/* 0x04 */ Vertex *vertices[2];
|
||||
/* 0x0C */ s32 *unkC;
|
||||
/* 0x10 */ s16 animationID;
|
||||
/* 0x12 */ s16 animationFrame;
|
||||
@@ -1677,10 +1702,10 @@ typedef struct Object_68 {
|
||||
/* 0x16 */ s16 offsetX;
|
||||
/* 0x18 */ s16 offsetY;
|
||||
/* 0x1A */ s16 offsetZ;
|
||||
/* 0x1C */ s16 unk1C;
|
||||
/* 0x1E */ s8 unk1E;
|
||||
/* 0x1C */ s16 headTilt;
|
||||
/* 0x1E */ s8 modelType;
|
||||
/* 0x1F */ s8 animationTaskNum;
|
||||
/* 0x20 */ s8 unk20;
|
||||
/* 0x20 */ s8 animUpdateTimer;
|
||||
/* 0x21 */ s8 unk21;
|
||||
/* 0x22 */ s16 unk22;
|
||||
/* 0x24 */ s32 unk24;
|
||||
@@ -1882,7 +1907,7 @@ typedef struct Object_LightData {
|
||||
/* Size: 0x0630 bytes */
|
||||
typedef struct Object {
|
||||
/* 0x0000 */ ObjectSegment segment;
|
||||
/* 0x0044 */ Vertex *unk44;
|
||||
/* 0x0044 */ Vertex *curVertData;
|
||||
/* 0x0048 */ s16 behaviorId;
|
||||
/* 0x004A */ s16 objectID; // First 9 bits are object ID, last 7 bits are header size
|
||||
/* 0x004C */ ObjectInteraction *interactObj; //player + 0x318
|
||||
|
||||
Reference in New Issue
Block a user