mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-07-13 07:57:23 -04:00
Decomp, update z_en_holl.c (#6890)
This commit is contained in:
@@ -1238,10 +1238,10 @@ void Room_DrawBackground2D(Gfx** gfxP, void* tex, void* tlut, u16 width, u16 hei
|
||||
u16 tlutCount, f32 offsetX, f32 offsetY);
|
||||
void func_80096FD4(PlayState* play, Room* room);
|
||||
u32 func_80096FE8(PlayState* play, RoomContext* roomCtx);
|
||||
s32 func_8009728C(PlayState* play, RoomContext* roomCtx, s32 roomNum);
|
||||
s32 Room_RequestNewRoom(PlayState* play, RoomContext* roomCtx, s32 roomNum);
|
||||
s32 func_800973FC(PlayState* play, RoomContext* roomCtx);
|
||||
void Room_Draw(PlayState* play, Room* room, u32 flags);
|
||||
void func_80097534(PlayState* play, RoomContext* roomCtx);
|
||||
void Room_FinishRoomChange(PlayState* play, RoomContext* roomCtx);
|
||||
void Sample_Destroy(GameState* thisx);
|
||||
void Sample_Init(GameState* thisx);
|
||||
void Inventory_ChangeEquipment(s16 equipment, u16 value);
|
||||
|
||||
+2
-2
@@ -1084,7 +1084,7 @@ typedef struct {
|
||||
/* 0x00 */ Room curRoom;
|
||||
/* 0x14 */ Room prevRoom;
|
||||
/* 0x28 */ void* bufPtrs[2];
|
||||
/* 0x30 */ u8 unk_30;
|
||||
/* 0x30 */ u8 activeBufPage;
|
||||
/* 0x31 */ s8 status;
|
||||
/* 0x34 */ void* unk_34;
|
||||
/* 0x38 */ DmaRequest dmaRequest;
|
||||
@@ -1477,7 +1477,7 @@ typedef struct PlayState {
|
||||
/* 0x11E14 */ u8 skyboxId;
|
||||
/* 0x11E15 */ s8 transitionTrigger; // "fade_direction"
|
||||
/* 0x11E16 */ s16 unk_11E16;
|
||||
/* 0x11E18 */ s16 unk_11E18;
|
||||
/* 0x11E18 */ s16 bgCoverAlpha;
|
||||
/* 0x11E1A */ s16 nextEntranceIndex;
|
||||
/* 0x11E1C */ char unk_11E1C[0x40];
|
||||
/* 0x11E5C */ s8 shootingGalleryStatus;
|
||||
|
||||
@@ -472,4 +472,41 @@ typedef struct {
|
||||
/* 0x24 */ char unk_24[0x4];
|
||||
} NpcInteractInfo; // size = 0x28
|
||||
|
||||
// Converts a number of bits to a bitmask, helper for params macros
|
||||
// e.g. 3 becomes 0b111 (7)
|
||||
#define NBITS_TO_MASK(n) \
|
||||
((1 << (n)) - 1)
|
||||
|
||||
// Extracts the `n`-bit value at position `s` in `p`, shifts then masks
|
||||
// Unsigned variant, no possibility of sign extension
|
||||
#define PARAMS_GET_U(p, s, n) \
|
||||
(((p) >> (s)) & NBITS_TO_MASK(n))
|
||||
|
||||
// Extracts the `n`-bit value at position `s` in `p`, masks then shifts
|
||||
// Signed variant, possibility of sign extension
|
||||
#define PARAMS_GET_S(p, s, n) \
|
||||
(((p) & (NBITS_TO_MASK(n) << (s))) >> (s))
|
||||
|
||||
// Extracts all bits past position `s` in `p`
|
||||
#define PARAMS_GET_NOMASK(p, s) \
|
||||
((p) >> (s))
|
||||
|
||||
// Extracts the `n`-bit value at position `s` in `p` without shifting it from its current position
|
||||
#define PARAMS_GET_NOSHIFT(p, s, n) \
|
||||
((p) & (NBITS_TO_MASK(n) << (s)))
|
||||
|
||||
// Moves the `n`-bit value `p` to bit position `s` for building actor parameters by OR-ing these together
|
||||
#define PARAMS_PACK(p, s, n) \
|
||||
(((p) & NBITS_TO_MASK(n)) << (s))
|
||||
|
||||
// Moves the value `p` to bit position `s` for building actor parameters by OR-ing these together.
|
||||
#define PARAMS_PACK_NOMASK(p, s) \
|
||||
((p) << (s))
|
||||
|
||||
// Generates a bitmask for bit position `s` of length `n`
|
||||
#define PARAMS_MAKE_MASK(s, n) PARAMS_GET_NOSHIFT(~0, s, n)
|
||||
|
||||
#define TRANSITION_ACTOR_PARAMS_INDEX_SHIFT 10
|
||||
#define GET_TRANSITION_ACTOR_INDEX(actor) PARAMS_GET_NOMASK((u16)(actor)->params, 10)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -292,7 +292,7 @@ typedef struct {
|
||||
/* 0x1354 */ s32 fileNum; // "file_no"
|
||||
/* 0x1358 */ char unk_1358[0x0004];
|
||||
/* 0x135C */ s32 gameMode;
|
||||
/* 0x1360 */ s32 sceneSetupIndex; // "counter" // Upstream TODO: sceneLayer
|
||||
/* 0x1360 */ s32 sceneLayer; // "counter"
|
||||
/* 0x1364 */ s32 respawnFlag; // "restart_flag"
|
||||
/* 0x1368 */ RespawnData respawn[RESPAWN_MODE_MAX]; // "restart_data"
|
||||
/* 0x13BC */ f32 entranceSpeed;
|
||||
@@ -423,7 +423,7 @@ typedef enum {
|
||||
/* 4 */ SCENE_LAYER_CUTSCENE_FIRST
|
||||
} SceneLayer;
|
||||
|
||||
#define IS_CUTSCENE_LAYER (gSaveContext.sceneSetupIndex >= SCENE_LAYER_CUTSCENE_FIRST)
|
||||
#define IS_CUTSCENE_LAYER (gSaveContext.sceneLayer >= SCENE_LAYER_CUTSCENE_FIRST)
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ LINK_AGE_ADULT,
|
||||
|
||||
Reference in New Issue
Block a user