General cleanup (#1636)

* totalLoadedActors comparision

* OBJMINE_PARAMS

* Sort z64.h header includes

* MapSelect_LoadConsoleLogo

* Combine notebook tables into 1

* TGSw clean up
This commit is contained in:
Derek Hensley 2024-05-19 11:02:20 -07:00 committed by GitHub
parent a3a7b551ed
commit b7e5468ca1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 85 additions and 76 deletions

View File

@ -1,31 +0,0 @@
/**
* Bombers Notebook Person Table
*
* DEFINE_PERSON should be used for people with entries in the notebook
* - Argument 0: Enum value for this person
* - Argument 1: Photo texture for this person
* - Argument 2: Message id for the description of this person
* - Argument 3: Enum value for the event meeting this person
* - Argument 4: Message id for the event meeting this person
* - Argument 5: WeekEventFlag for the event meeting this person
*/
/* 0x00 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_BOMBERS, gBombersNotebookPhotoBombersTex, 0x21DD, BOMBERS_NOTEBOOK_EVENT_MET_BOMBERS, 0x2147, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_BOMBERS)
/* 0x01 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_ANJU, gBombersNotebookPhotoAnjuTex, 0x21CA, BOMBERS_NOTEBOOK_EVENT_MET_ANJU, 0x2134, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_ANJU)
/* 0x02 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_KAFEI, gBombersNotebookPhotoKafeiTex, 0x21CB, BOMBERS_NOTEBOOK_EVENT_MET_KAFEI, 0x2135, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_KAFEI)
/* 0x03 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_CURIOSITY_SHOP_MAN, gBombersNotebookPhotoCuriosityShopManTex, 0x21CC, BOMBERS_NOTEBOOK_EVENT_MET_CURIOSITY_SHOP_MAN, 0x2136, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_CURIOSITY_SHOP_MAN)
/* 0x04 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_BOMB_SHOP_LADY, gBombersNotebookPhotoBombShopLadyTex, 0x21CD, BOMBERS_NOTEBOOK_EVENT_MET_BOMB_SHOP_LADY, 0x2137, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_BOMB_SHOP_LADY)
/* 0x05 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_ROMANI, gBombersNotebookPhotoRomaniTex, 0x21CE, BOMBERS_NOTEBOOK_EVENT_MET_ROMANI, 0x2138, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_ROMANI)
/* 0x06 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_CREMIA, gBombersNotebookPhotoCremiaTex, 0x21CF, BOMBERS_NOTEBOOK_EVENT_MET_CREMIA, 0x2139, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_CREMIA)
/* 0x07 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_MAYOR_DOTOUR, gBombersNotebookPhotoMayorDotourTex, 0x21D0, BOMBERS_NOTEBOOK_EVENT_MET_MAYOR_DOTOUR, 0x213A, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_MAYOR_DOTOUR)
/* 0x08 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_MADAME_AROMA, gBombersNotebookPhotoMadameAromaTex, 0x21D1, BOMBERS_NOTEBOOK_EVENT_MET_MADAME_AROMA, 0x213B, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_MADAME_AROMA)
/* 0x09 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_TOTO, gBombersNotebookPhotoTotoTex, 0x21D2, BOMBERS_NOTEBOOK_EVENT_MET_TOTO, 0x213C, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_TOTO)
/* 0x0A */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_GORMAN, gBombersNotebookPhotoGormanTex, 0x21D3, BOMBERS_NOTEBOOK_EVENT_MET_GORMAN, 0x213D, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_GORMAN)
/* 0x0B */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_POSTMAN, gBombersNotebookPhotoPostmanTex, 0x21D4, BOMBERS_NOTEBOOK_EVENT_MET_POSTMAN, 0x213E, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_POSTMAN)
/* 0x0C */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_ROSA_SISTERS, gBombersNotebookPhotoRosaSistersTex, 0x21D5, BOMBERS_NOTEBOOK_EVENT_MET_ROSA_SISTERS, 0x213F, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_ROSA_SISTERS)
/* 0x0D */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_TOILET_HAND, gBombersNotebookPhotoToiletHandTex, 0x21D6, BOMBERS_NOTEBOOK_EVENT_MET_TOLIET_HAND, 0x2140, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_TOILET_HAND)
/* 0x0E */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_ANJUS_GRANDMOTHER, gBombersNotebookPhotoAnjusGrandmotherTex, 0x21D7, BOMBERS_NOTEBOOK_EVENT_MET_ANJUS_GRANDMOTHER, 0x2141, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_ANJUS_GRANDMOTHER)
/* 0x0F */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_KAMARO, gBombersNotebookPhotoKamaroTex, 0x21D8, BOMBERS_NOTEBOOK_EVENT_MET_KAMARO, 0x2142, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_KAMARO)
/* 0x10 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_GROG, gBombersNotebookPhotoGrogTex, 0x21D9, BOMBERS_NOTEBOOK_EVENT_MET_GROG, 0x2143, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_GROG)
/* 0x11 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_GORMAN_BROTHERS, gBombersNotebookPhotoGormanBrothersTex, 0x21DA, BOMBERS_NOTEBOOK_EVENT_MET_GORMAN_BROTHERS, 0x2144, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_GORMAN_BROTHERS)
/* 0x12 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_SHIRO, gBombersNotebookPhotoShiroTex, 0x21DB, BOMBERS_NOTEBOOK_EVENT_MET_SHIRO, 0x2145, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_SHIRO)
/* 0x13 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_GURU_GURU, gBombersNotebookPhotoGuruGuruTex, 0x21DC, BOMBERS_NOTEBOOK_EVENT_MET_GURU_GURU, 0x2146, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_GURU_GURU)

View File

@ -1,5 +1,13 @@
/**
* Bombers Notebook Event Table
* Bombers Notebook Table
*
* DEFINE_PERSON should be used for people with entries in the notebook
* - Argument 0: Enum value for this person
* - Argument 1: Photo texture for this person
* - Argument 2: Message id for the description of this person
* - Argument 3: Enum value for the event meeting this person
* - Argument 4: Message id for the event meeting this person
* - Argument 5: WeekEventFlag for the event meeting this person
*
* DEFINE_EVENT should be used for events in the notebook
* - Argument 0: Enum value for the event
@ -9,8 +17,28 @@
* - Argument 4: Message id for the completion of this event
* - Argument 5: WeekEventFlag for the completion of this event
*
* Note: These events are after the MET events, so will start indexing at BOMBERS_NOTEBOOK_PERSON_MAX
* Note: Event defines need to come after all Person defines
*/
/* 0x00 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_BOMBERS, gBombersNotebookPhotoBombersTex, 0x21DD, BOMBERS_NOTEBOOK_EVENT_MET_BOMBERS, 0x2147, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_BOMBERS)
/* 0x01 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_ANJU, gBombersNotebookPhotoAnjuTex, 0x21CA, BOMBERS_NOTEBOOK_EVENT_MET_ANJU, 0x2134, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_ANJU)
/* 0x02 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_KAFEI, gBombersNotebookPhotoKafeiTex, 0x21CB, BOMBERS_NOTEBOOK_EVENT_MET_KAFEI, 0x2135, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_KAFEI)
/* 0x03 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_CURIOSITY_SHOP_MAN, gBombersNotebookPhotoCuriosityShopManTex, 0x21CC, BOMBERS_NOTEBOOK_EVENT_MET_CURIOSITY_SHOP_MAN, 0x2136, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_CURIOSITY_SHOP_MAN)
/* 0x04 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_BOMB_SHOP_LADY, gBombersNotebookPhotoBombShopLadyTex, 0x21CD, BOMBERS_NOTEBOOK_EVENT_MET_BOMB_SHOP_LADY, 0x2137, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_BOMB_SHOP_LADY)
/* 0x05 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_ROMANI, gBombersNotebookPhotoRomaniTex, 0x21CE, BOMBERS_NOTEBOOK_EVENT_MET_ROMANI, 0x2138, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_ROMANI)
/* 0x06 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_CREMIA, gBombersNotebookPhotoCremiaTex, 0x21CF, BOMBERS_NOTEBOOK_EVENT_MET_CREMIA, 0x2139, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_CREMIA)
/* 0x07 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_MAYOR_DOTOUR, gBombersNotebookPhotoMayorDotourTex, 0x21D0, BOMBERS_NOTEBOOK_EVENT_MET_MAYOR_DOTOUR, 0x213A, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_MAYOR_DOTOUR)
/* 0x08 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_MADAME_AROMA, gBombersNotebookPhotoMadameAromaTex, 0x21D1, BOMBERS_NOTEBOOK_EVENT_MET_MADAME_AROMA, 0x213B, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_MADAME_AROMA)
/* 0x09 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_TOTO, gBombersNotebookPhotoTotoTex, 0x21D2, BOMBERS_NOTEBOOK_EVENT_MET_TOTO, 0x213C, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_TOTO)
/* 0x0A */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_GORMAN, gBombersNotebookPhotoGormanTex, 0x21D3, BOMBERS_NOTEBOOK_EVENT_MET_GORMAN, 0x213D, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_GORMAN)
/* 0x0B */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_POSTMAN, gBombersNotebookPhotoPostmanTex, 0x21D4, BOMBERS_NOTEBOOK_EVENT_MET_POSTMAN, 0x213E, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_POSTMAN)
/* 0x0C */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_ROSA_SISTERS, gBombersNotebookPhotoRosaSistersTex, 0x21D5, BOMBERS_NOTEBOOK_EVENT_MET_ROSA_SISTERS, 0x213F, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_ROSA_SISTERS)
/* 0x0D */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_TOILET_HAND, gBombersNotebookPhotoToiletHandTex, 0x21D6, BOMBERS_NOTEBOOK_EVENT_MET_TOLIET_HAND, 0x2140, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_TOILET_HAND)
/* 0x0E */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_ANJUS_GRANDMOTHER, gBombersNotebookPhotoAnjusGrandmotherTex, 0x21D7, BOMBERS_NOTEBOOK_EVENT_MET_ANJUS_GRANDMOTHER, 0x2141, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_ANJUS_GRANDMOTHER)
/* 0x0F */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_KAMARO, gBombersNotebookPhotoKamaroTex, 0x21D8, BOMBERS_NOTEBOOK_EVENT_MET_KAMARO, 0x2142, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_KAMARO)
/* 0x10 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_GROG, gBombersNotebookPhotoGrogTex, 0x21D9, BOMBERS_NOTEBOOK_EVENT_MET_GROG, 0x2143, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_GROG)
/* 0x11 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_GORMAN_BROTHERS, gBombersNotebookPhotoGormanBrothersTex, 0x21DA, BOMBERS_NOTEBOOK_EVENT_MET_GORMAN_BROTHERS, 0x2144, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_GORMAN_BROTHERS)
/* 0x12 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_SHIRO, gBombersNotebookPhotoShiroTex, 0x21DB, BOMBERS_NOTEBOOK_EVENT_MET_SHIRO, 0x2145, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_SHIRO)
/* 0x13 */ DEFINE_PERSON(BOMBERS_NOTEBOOK_PERSON_GURU_GURU, gBombersNotebookPhotoGuruGuruTex, 0x21DC, BOMBERS_NOTEBOOK_EVENT_MET_GURU_GURU, 0x2146, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_MET_GURU_GURU)
/* 0x14 */ DEFINE_EVENT(BOMBERS_NOTEBOOK_EVENT_RECEIVED_ROOM_KEY, BOMBERS_NOTEBOOK_EVENT_ICON_EXCLAMATION_POINT, WEEKEVENTREG_RECEIVED_ROOM_KEY, 0x2198, 0x2152, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_RECEIVED_ROOM_KEY)
/* 0x15 */ DEFINE_EVENT(BOMBERS_NOTEBOOK_EVENT_PROMISED_MIDNIGHT_MEETING, BOMBERS_NOTEBOOK_EVENT_ICON_EXCLAMATION_POINT, WEEKEVENTREG_PROMISED_MIDNIGHT_MEETING, 0x2199, 0x2153, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_PROMISED_MIDNIGHT_MEETING)
/* 0x16 */ DEFINE_EVENT(BOMBERS_NOTEBOOK_EVENT_PROMISED_TO_MEET_KAFEI, BOMBERS_NOTEBOOK_EVENT_ICON_EXCLAMATION_POINT, WEEKEVENTREG_HAD_MIDNIGHT_MEETING, 0x219A, 0x2154, WEEKEVENTREG_BOMBERS_NOTEBOOK_EVENT_PROMISED_TO_MEET_KAFEI)

View File

@ -1,6 +1,8 @@
#ifndef Z64_H
#define Z64_H
#include "ultra64.h"
#include "libc/math.h"
#include "libc/stdarg.h"
#include "libc/stdbool.h"
@ -8,28 +10,26 @@
#include "libc/stdint.h"
#include "libc/stdlib.h"
#include "ultra64.h"
#include "irqmgr.h"
#include "padmgr.h"
#include "scheduler.h"
#include "libc64/qrand.h"
#include "color.h"
#include "gfx.h"
#include "gfxprint.h"
#include "ichain.h"
#include "irqmgr.h"
#include "main.h"
#include "message_data_static.h"
#include "padmgr.h"
#include "padutils.h"
#include "regs.h"
#include "scheduler.h"
#include "sequence.h"
#include "seqcmd.h"
#include "sfx.h"
#include "message_data_static.h"
#include "main.h"
#include "gfx.h"
#include "gfxprint.h"
#include "padutils.h"
#include "libc64/qrand.h"
#include "sys_matrix.h"
#include "tha.h"
#include "thga.h"
#include "z64actor.h"
#include "z64animation.h"
#include "z64animation_legacy.h"
@ -49,6 +49,7 @@
#include "z64game.h"
#include "z64interface.h"
#include "z64item.h"
#include "z64keyframe.h"
#include "z64lib.h"
#include "z64light.h"
#include "z64map.h"
@ -70,8 +71,6 @@
#include "z64rumble.h"
#include "z64transition.h"
#include "z64view.h"
#include "z64keyframe.h"
#include "regs.h"
typedef struct {

View File

@ -9,12 +9,14 @@ struct Input;
struct PlayState;
#define DEFINE_PERSON(enum, _photo, _description, _metEnum, _metMessage, _metFlag) enum,
#define DEFINE_EVENT(enum, _icon, _colorFlag, _description, _completedMessage, _completedFlag)
typedef enum BombersNotebookPerson {
#include "tables/bombers_notebook/person_table.h"
#include "tables/notebook_table.h"
/* 0x14 */ BOMBERS_NOTEBOOK_PERSON_MAX
} BombersNotebookPerson;
#undef DEFINE_PERSON
#undef DEFINE_EVENT
typedef enum BombersNotebookLoadState {
/* 0 */ BOMBERS_NOTEBOOK_LOAD_STATE_NONE,
@ -25,8 +27,7 @@ typedef enum BombersNotebookLoadState {
#define DEFINE_PERSON(_enum, _photo, _description, metEnum, _metMessage, _metFlag) metEnum,
#define DEFINE_EVENT(enum, _icon, _colorFlag, _description, _completedMessage, _completedFlag) enum,
typedef enum BombersNotebookEvent {
#include "tables/bombers_notebook/person_table.h"
#include "tables/bombers_notebook/event_table.h"
#include "tables/notebook_table.h"
/* 0x37 */ BOMBERS_NOTEBOOK_EVENT_MAX
} BombersNotebookEvent;

View File

@ -3322,7 +3322,7 @@ Actor* Actor_SpawnAsChildAndCutscene(ActorContext* actorCtx, PlayState* play, s1
s32 objectSlot;
ActorOverlay* overlayEntry;
if (actorCtx->totalLoadedActors >= 0xFF) {
if (actorCtx->totalLoadedActors >= 255) {
return NULL;
}

View File

@ -36,8 +36,7 @@ u8 gPageSwitchNextButtonStatus[][5] = {
#define DEFINE_EVENT(_enum, _icon, _colorFlag, _description, completedMessage, _completedFlag) completedMessage,
u16 sBombersNotebookEventMessages[BOMBERS_NOTEBOOK_EVENT_MAX] = {
#include "tables/bombers_notebook/person_table.h"
#include "tables/bombers_notebook/event_table.h"
#include "tables/notebook_table.h"
};
#undef DEFINE_PERSON
@ -47,8 +46,7 @@ u16 sBombersNotebookEventMessages[BOMBERS_NOTEBOOK_EVENT_MAX] = {
#define DEFINE_EVENT(_enum, _icon, _colorFlag, _description, _completedMessage, completedFlag) completedFlag,
u16 gBombersNotebookWeekEventFlags[BOMBERS_NOTEBOOK_EVENT_MAX] = {
#include "tables/bombers_notebook/person_table.h"
#include "tables/bombers_notebook/event_table.h"
#include "tables/notebook_table.h"
};
#undef DEFINE_PERSON

View File

@ -262,23 +262,27 @@ TexturePtr sBombersNotebookDayTextures[] = {
gBombersNotebookDayFinalENGTex,
};
#define DEFINE_PERSON(_enum, _photo, _description, metEnum, _metMessage, _metFlag)
#define DEFINE_EVENT(_enum, icon, _colorFlag, _description, _completedMessage, _completedFlag) icon,
s32 sBombersNotebookEventIcons[] = {
#include "tables/bombers_notebook/event_table.h"
#include "tables/notebook_table.h"
};
#undef DEFINE_PERSON
#undef DEFINE_EVENT
s32 sBombersNotebookEventIconWidths[] = { 16, 24, 32 };
s32 sBombersNotebookEventIconHeights[] = { 16, 28, 28 };
#define DEFINE_PERSON(_enum, _photo, _description, metEnum, _metMessage, _metFlag)
#define DEFINE_EVENT(_enum, _icon, colorFlag, _description, _completedMessage, _completedFlag) colorFlag,
u16 sBombersNotebookEventColorWeekEventFlags[] = {
#include "tables/bombers_notebook/event_table.h"
#include "tables/notebook_table.h"
};
#undef DEFINE_PERSON
#undef DEFINE_EVENT
void BombersNotebook_DrawScisTexRect(Gfx** gfxP, s32 rxl, s32 ryl, s32 rxh, s32 ryh, s32 tile, s32 s, s32 t, s32 dsdx,
@ -556,12 +560,14 @@ void BombersNotebook_DrawEntries(Gfx** gfxP, s32 row, u32 rectTop) {
}
#define DEFINE_PERSON(_enum, photo, _description, _metEnum, _metMessage, _metFlag) photo,
#define DEFINE_EVENT(enum, _icon, _colorFlag, _description, _completedMessage, _completedFlag)
TexturePtr sBombersNotebookPhotoTextures[] = {
#include "tables/bombers_notebook/person_table.h"
#include "tables/notebook_table.h"
};
#undef DEFINE_PERSON
#undef DEFINE_EVENT
void BombersNotebook_DrawRows(BombersNotebook* this, Gfx** gfxP) {
static s16 sBarColorR = 0;
@ -1127,8 +1133,7 @@ void BombersNotebook_LoadFiles(BombersNotebook* this, s32 flag) {
#define DEFINE_EVENT(_enum, _icon, _colorFlag, description, _completedMessage, _completedFlag) description,
u16 sBombersNotebookTextIds[] = {
#include "tables/bombers_notebook/person_table.h"
#include "tables/bombers_notebook/event_table.h"
#include "tables/notebook_table.h"
};
#undef DEFINE_PERSON

View File

@ -10,6 +10,8 @@ typedef void (*EnSwActionFunc)(struct EnSw*, PlayState*);
#define ENSW_GETS_3(params) ((params & 3) & 0xFF)
#define ENSW_GET_3(thisx) (ENSW_GETS_3((thisx)->params))
#define ENSW_GETS_FC(params) (((params & 0xFC) >> 2) & 0xFF)
#define ENSW_GET_FC(thisx) (ENSW_GETS_FC((thisx)->params))
#define ENSW_GETS_3FC(params) (((params & 0x3FC) >> 2) & 0xFF)
#define ENSW_GET_3FC(thisx) (ENSW_GETS_3FC((thisx)->params))
#define ENSW_GET_PATH_INDEX(thisx) ((((thisx)->params & 0xFF00) >> 8) & 0xFF)

View File

@ -12,10 +12,10 @@ typedef void (*ObjMineActionFunc)(struct ObjMine*, PlayState*);
#define OBJMINE_GET_PATH_SPEED(thisx) (((thisx)->params >> 8) & 7)
#define OBJMINE_GET_TYPE(thisx) (((thisx)->params >> 12) & 3)
#define OBJMINE_PARAM(type, linkCount, pathIndex, pathSpeed) (((type) << 0xC) | ((type == OBJMINE_TYPE_PATH) ? ((pathIndex) | ((pathSpeed) << 8)) : (linkCount)))
#define OBJMINE_PATH_PARAM(pathIndex, pathSpeed) OBJMINE_PARAM(OBJMINE_TYPE_PATH, 0, pathIndex, pathSpeed)
#define OBJMINE_AIR_PARAM(linkCount) OBJMINE_PARAM(OBJMINE_TYPE_AIR, linkCount, 0, 0)
#define OBJMINE_WATER_PARAM(linkCount) OBJMINE_PARAM(OBJMINE_TYPE_WATER, linkCount, 0, 0)
#define OBJMINE_PARAMS(type, linkCount, pathIndex, pathSpeed) (((type) << 0xC) | ((type == OBJMINE_TYPE_PATH) ? ((pathIndex) | ((pathSpeed) << 8)) : (linkCount)))
#define OBJMINE_PATH_PARAMS(pathIndex, pathSpeed) OBJMINE_PARAMS(OBJMINE_TYPE_PATH, 0, pathIndex, pathSpeed)
#define OBJMINE_AIR_PARAMS(linkCount) OBJMINE_PARAMS(OBJMINE_TYPE_AIR, linkCount, 0, 0)
#define OBJMINE_WATER_PARAMS(linkCount) OBJMINE_PARAMS(OBJMINE_TYPE_WATER, linkCount, 0, 0)
#define OBJMINE_CHAIN_MAX 63

View File

@ -5,7 +5,9 @@
*/
#include "z_tg_sw.h"
#include "z64debug_display.h"
#include "overlays/actors/ovl_En_Sw/z_en_sw.h"
#define FLAGS (ACTOR_FLAG_10)
@ -17,7 +19,7 @@ void TGSw_Destroy(Actor* thisx, PlayState* play);
void TGSw_Update(Actor* thisx, PlayState* play);
void TGSw_Draw(Actor* thisx, PlayState* play);
void TGSw_ActionExecuteOneShot(struct TGSw* this, PlayState* play);
void TGSw_Die(struct TGSw* this, PlayState* play);
ActorInit TG_Sw_InitVars = {
/**/ ACTOR_TG_SW,
@ -31,7 +33,7 @@ ActorInit TG_Sw_InitVars = {
/**/ TGSw_Draw,
};
void TGSw_ActionDecider(TGSw* this, PlayState* play) {
void TGSw_Idle(TGSw* this, PlayState* play) {
f32 scaledAbsoluteRotZ;
f32 scaledAbsoluteRotY;
PlayerImpactType playerImpactType;
@ -45,12 +47,12 @@ void TGSw_ActionDecider(TGSw* this, PlayState* play) {
}
playerImpactType = play->actorCtx.playerImpact.type;
if ((playerImpactType == PLAYER_IMPACT_BONK) || (playerImpactType == PLAYER_IMPACT_GORON_GROUND_POUND)) {
this->actionFunc = TGSw_ActionExecuteOneShot;
this->actionFunc = TGSw_Die;
}
}
}
void TGSw_ActionExecuteOneShot(TGSw* this, PlayState* play) {
void TGSw_Die(TGSw* this, PlayState* play) {
Actor* actorIter = NULL;
// FAKE:
@ -61,7 +63,7 @@ void TGSw_ActionExecuteOneShot(TGSw* this, PlayState* play) {
if (actorIter == NULL) {
break;
}
if ((((this->actor.params & 0xFC) >> 2) & 0xFF) == (((actorIter->params & 0xFC) >> 2) & 0xFF)) {
if (TGSW_GET_FC(&this->actor) == ENSW_GET_FC(actorIter)) {
actorIter->parent = &this->actor;
actorIter->speed = ABS_ALT(this->actor.world.rot.x);
break;
@ -77,7 +79,7 @@ void TGSw_ActionExecuteOneShot(TGSw* this, PlayState* play) {
if (actorIter == NULL) {
break;
}
if ((((this->actor.params & 0xFC) >> 2) & 0xFF) == (((actorIter->params & 0xFC) >> 2) & 0xFF)) {
if (TGSW_GET_FC(&this->actor) == ENSW_GET_FC(actorIter)) {
actorIter->parent = &this->actor;
actorIter->speed = ABS_ALT(this->actor.world.rot.x);
break;
@ -92,7 +94,7 @@ void TGSw_Init(Actor* thisx, PlayState* play) {
TGSw* this = THIS;
this->actor.csId = this->actor.world.rot.z;
this->actionFunc = TGSw_ActionDecider;
this->actionFunc = TGSw_Idle;
}
void TGSw_Destroy(Actor* thisx, PlayState* play) {

View File

@ -6,6 +6,8 @@
struct TGSw;
typedef void (*TGSwActionFunc)(struct TGSw*, PlayState*);
#define TGSW_GET_FC(thisx) ((((thisx)->params & 0xFC) >> 2) & 0xFF)
typedef struct TGSw {
/* 0x000 */ Actor actor;
/* 0x144 */ TGSwActionFunc actionFunc;

View File

@ -10,7 +10,10 @@
#include "libc/alloca.h"
#include "overlays/gamestates/ovl_title/z_title.h"
void MapSelect_LoadConsoleLogo(MapSelectState* this) {
void MapSelect_LoadConsoleLogo(MapSelectState* this, u32 entrance, s32 spawn) {
s32 unused1 = entrance ? 0 : 0;
s32 unused2 = spawn ? 0 : 0;
STOP_GAMESTATE(&this->state);
SET_NEXT_GAMESTATE(&this->state, ConsoleLogo_Init, sizeof(ConsoleLogoState));
}
@ -496,7 +499,7 @@ static SceneSelectEntry sScenes[] = {
{ "X 1:SPOT00", MapSelect_LoadGame, ENTRANCE(CUTSCENE, 0) },
// "Title" (Title Screen)
{ "title", (void*)MapSelect_LoadConsoleLogo, 0 },
{ "title", MapSelect_LoadConsoleLogo, 0 },
};
void MapSelect_UpdateMenu(MapSelectState* this) {

View File

@ -13149,8 +13149,8 @@
0x80B198B0:("EnSnowman_Draw",),
0x80B19948:("EnSnowman_DrawSnowPile",),
0x80B19998:("EnSnowman_DrawSnowball",),
0x80B19F60:("TGSw_ActionDecider",),
0x80B1A008:("TGSw_ActionExecuteOneShot",),
0x80B19F60:("TGSw_Idle",),
0x80B1A008:("TGSw_Die",),
0x80B1A15C:("TGSw_Init",),
0x80B1A17C:("TGSw_Destroy",),
0x80B1A18C:("TGSw_Update",),