mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
z_parameter: Magic (#934)
* Document magic * Cleanup * Few fixes * PR Suggestions, More Lens Docs * Few comments * missed a spot * Better macros/names * Deactivate Lens * more PR suggestions * fix names
This commit is contained in:
@@ -75,9 +75,9 @@
|
||||
<Texture Name="gAmmoDigit9Tex" OutName="ammo_digit_9" Format="ia8" Width="8" Height="8" Offset="0x4CE0"/>
|
||||
<Texture Name="gAmmoDigitHalfTex" OutName="ammo_digit_half" Format="ia8" Width="16" Height="8" Offset="0x4D20"/>
|
||||
|
||||
<Texture Name="gMagicBarEndTex" OutName="magic_bar_end" Format="ia8" Width="8" Height="16" Offset="0x4DA0"/>
|
||||
<Texture Name="gMagicBarMidTex" OutName="magic_bar_mid" Format="ia8" Width="24" Height="16" Offset="0x4E20"/>
|
||||
<Texture Name="gMagicBarFillTex" OutName="magic_bar_fill" Format="ia8" Width="8" Height="8" Offset="0x4FA0"/>
|
||||
<Texture Name="gMagicMeterEndTex" OutName="magic_meter_end" Format="ia8" Width="8" Height="16" Offset="0x4DA0"/>
|
||||
<Texture Name="gMagicMeterMidTex" OutName="magic_meter_mid" Format="ia8" Width="24" Height="16" Offset="0x4E20"/>
|
||||
<Texture Name="gMagicMeterFillTex" OutName="magic_meter_fill" Format="ia8" Width="8" Height="8" Offset="0x4FA0"/>
|
||||
|
||||
<!-- The analog clock from day one until midnight of the final day -->
|
||||
<Texture Name="gThreeDayClockDiamondTex" OutName="three_day_clock_diamond" Format="ia8" Width="40" Height="32" Offset="0x4FE0"/>
|
||||
|
||||
+4
-8
@@ -718,7 +718,7 @@ void func_800B9038(Actor* actor, s32 timer);
|
||||
void func_800B9084(Actor* actor);
|
||||
void func_800B9098(Actor* actor);
|
||||
s32 func_800B90AC(PlayState* play, Actor* actor, CollisionPoly* polygon, s32 index, s32 arg4);
|
||||
void func_800B90F4(PlayState* play);
|
||||
void Actor_DeactivateLens(PlayState* play);
|
||||
void func_800B9120(ActorContext* actorCtx);
|
||||
void Actor_InitContext(PlayState* play, ActorContext* actorCtx, ActorEntry* actorEntry);
|
||||
void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx);
|
||||
@@ -1855,13 +1855,9 @@ s32 Health_ChangeBy(PlayState* play, s16 healthChange);
|
||||
void Health_GiveHearts(s16 hearts);
|
||||
void Rupees_ChangeBy(s16 rupeeChange);
|
||||
void Inventory_ChangeAmmo(s16 item, s16 ammoChange);
|
||||
void Parameter_AddMagic(PlayState* play, s16 arg1);
|
||||
void func_80115D5C(GameState* gamestate);
|
||||
// void func_80115DB4(void);
|
||||
// void func_80116088(void);
|
||||
// void func_80116114(void);
|
||||
// void func_80116348(void);
|
||||
// void func_80116918(void);
|
||||
void Magic_Add(PlayState* play, s16 magicToAdd);
|
||||
void Magic_Reset(PlayState* play);
|
||||
s32 Magic_Consume(PlayState* play, s16 magicToConsume, s16 type);
|
||||
// void func_80116FD8(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
|
||||
// void func_801170B8(void);
|
||||
// void func_80117100(void);
|
||||
|
||||
@@ -45,6 +45,9 @@
|
||||
#define CAPACITY(upg, value) gUpgradeCapacities[upg][value]
|
||||
#define CUR_CAPACITY(upg) CAPACITY(upg, CUR_UPG_VALUE(upg))
|
||||
|
||||
// To be used with `Magic_Add`, but ensures enough magic is added to fill the magic bar to capacity
|
||||
#define MAGIC_FILL_TO_CAPACITY (((void)0, gSaveContext.magicFillTarget) + (gSaveContext.save.playerData.isDoubleMagicAcquired + 1) * MAGIC_NORMAL_METER)
|
||||
|
||||
#define CONTROLLER1(gameState) (&(gameState)->input[0])
|
||||
#define CONTROLLER2(gameState) (&(gameState)->input[1])
|
||||
#define CONTROLLER3(gameState) (&(gameState)->input[2])
|
||||
|
||||
+52
-55
@@ -43,61 +43,58 @@
|
||||
#define bREG(r) BASE_REG(28, r)
|
||||
|
||||
/* TODO: Actually confirm these, in case of miss-match it's at least a simple list to `sed` */
|
||||
#define R_ENABLE_ARENA_DBG SREG(0) // Same as OoT
|
||||
#define R_RUN_SPEED_LIMIT REG(45)
|
||||
#define R_UPDATE_RATE SREG(30)
|
||||
#define R_PAUSE_MENU_MODE SREG(94)
|
||||
#define R_C_UP_ICON_X YREG(88)
|
||||
#define R_C_UP_ICON_Y YREG(89)
|
||||
#define R_MAGIC_FILL_COLOR(i) ZREG(0 + i)
|
||||
#define R_C_BTN_COLOR(i) ZREG(39 + i)
|
||||
#define R_B_BTN_COLOR(i) ZREG(43 + i)
|
||||
#define R_START_LABEL_DD(i) ZREG(48 + i)
|
||||
#define R_START_LABEL_Y(i) ZREG(51 + i)
|
||||
#define R_START_LABEL_X(i) ZREG(54 + i)
|
||||
#define R_C_UP_BTN_X ZREG(62)
|
||||
#define R_C_UP_BTN_Y ZREG(63)
|
||||
#define R_START_BTN_X ZREG(68)
|
||||
#define R_START_BTN_Y ZREG(69)
|
||||
#define R_ITEM_BTN_X(i) ZREG(70 + i)
|
||||
#define R_ITEM_BTN_Y(i) ZREG(74 + i)
|
||||
#define R_ITEM_BTN_DD(i) ZREG(78 + i)
|
||||
#define R_ITEM_ICON_X(i) ZREG(82 + i)
|
||||
#define R_ITEM_ICON_Y(i) ZREG(86 + i)
|
||||
#define R_ITEM_ICON_DD(i) ZREG(90 + i)
|
||||
#define R_A_BTN_Y XREG(16)
|
||||
#define R_A_BTN_X XREG(17)
|
||||
#define R_A_ICON_Y XREG(19)
|
||||
#define R_A_ICON_X XREG(20)
|
||||
#define R_A_BTN_COLOR(i) XREG(22 + i)
|
||||
#define R_MAGIC_BAR_SMALL_Y XREG(48)
|
||||
#define R_MAGIC_BAR_X XREG(49)
|
||||
#define R_MAGIC_BAR_LARGE_Y XREG(50)
|
||||
#define R_MAGIC_FILL_X XREG(51)
|
||||
#define R_MINIMAP_DISABLED XREG(95)
|
||||
#define R_B_LABEL_DD WREG(0)
|
||||
#define R_OW_MINIMAP_X WREG(29)
|
||||
#define R_OW_MINIMAP_Y WREG(30)
|
||||
#define R_B_LABEL_X(i) WREG(40 + i)
|
||||
#define R_B_LABEL_Y(i) WREG(43 + i)
|
||||
#define R_DGN_MINIMAP_X WREG(68)
|
||||
#define R_DGN_MINIMAP_Y WREG(69)
|
||||
#define R_MAP_INDEX VREG(11)
|
||||
#define R_MAP_TEX_INDEX_BASE VREG(12)
|
||||
#define R_MAP_TEX_INDEX VREG(13)
|
||||
#define R_COMPASS_SCALE_X VREG(14)
|
||||
#define R_COMPASS_SCALE_Y VREG(15)
|
||||
#define R_COMPASS_OFFSET_X VREG(16)
|
||||
#define R_COMPASS_OFFSET_Y VREG(17)
|
||||
#define R_MINIMAP_COLOR(i) VREG(18 + i)
|
||||
#define R_ITEM_AMMO_X(i) VREG(64 + i)
|
||||
#define R_ITEM_AMMO_Y(i) VREG(68 + i)
|
||||
#define R_ITEM_ICON_WIDTH(i) VREG(76 + i)
|
||||
#define R_ITEM_BTN_WIDTH(i) VREG(80 + i)
|
||||
#define R_ENABLE_ARENA_DBG SREG(0) // Same as OoT
|
||||
#define R_RUN_SPEED_LIMIT REG(45)
|
||||
#define R_UPDATE_RATE SREG(30)
|
||||
#define R_PAUSE_MENU_MODE SREG(94)
|
||||
#define R_C_UP_ICON_X YREG(88)
|
||||
#define R_C_UP_ICON_Y YREG(89)
|
||||
#define R_MAGIC_FILL_COLOR(i) ZREG(0 + i)
|
||||
#define R_C_BTN_COLOR(i) ZREG(39 + i)
|
||||
#define R_B_BTN_COLOR(i) ZREG(43 + i)
|
||||
#define R_START_LABEL_DD(i) ZREG(48 + i)
|
||||
#define R_START_LABEL_Y(i) ZREG(51 + i)
|
||||
#define R_START_LABEL_X(i) ZREG(54 + i)
|
||||
#define R_C_UP_BTN_X ZREG(62)
|
||||
#define R_C_UP_BTN_Y ZREG(63)
|
||||
#define R_START_BTN_X ZREG(68)
|
||||
#define R_START_BTN_Y ZREG(69)
|
||||
#define R_ITEM_BTN_X(i) ZREG(70 + i)
|
||||
#define R_ITEM_BTN_Y(i) ZREG(74 + i)
|
||||
#define R_ITEM_BTN_DD(i) ZREG(78 + i)
|
||||
#define R_ITEM_ICON_X(i) ZREG(82 + i)
|
||||
#define R_ITEM_ICON_Y(i) ZREG(86 + i)
|
||||
#define R_ITEM_ICON_DD(i) ZREG(90 + i)
|
||||
#define R_A_BTN_Y XREG(16)
|
||||
#define R_A_BTN_X XREG(17)
|
||||
#define R_A_ICON_Y XREG(19)
|
||||
#define R_A_ICON_X XREG(20)
|
||||
#define R_A_BTN_COLOR(i) XREG(22 + i)
|
||||
#define R_MAGIC_CONSUME_TIMER_GIANTS_MASK XREG(41)
|
||||
#define R_MINIMAP_DISABLED XREG(95)
|
||||
#define R_B_LABEL_DD WREG(0)
|
||||
#define R_OW_MINIMAP_X WREG(29)
|
||||
#define R_OW_MINIMAP_Y WREG(30)
|
||||
#define R_B_LABEL_X(i) WREG(40 + i)
|
||||
#define R_B_LABEL_Y(i) WREG(43 + i)
|
||||
#define R_DGN_MINIMAP_X WREG(68)
|
||||
#define R_DGN_MINIMAP_Y WREG(69)
|
||||
#define R_MAP_INDEX VREG(11)
|
||||
#define R_MAP_TEX_INDEX_BASE VREG(12)
|
||||
#define R_MAP_TEX_INDEX VREG(13)
|
||||
#define R_COMPASS_SCALE_X VREG(14)
|
||||
#define R_COMPASS_SCALE_Y VREG(15)
|
||||
#define R_COMPASS_OFFSET_X VREG(16)
|
||||
#define R_COMPASS_OFFSET_Y VREG(17)
|
||||
#define R_MINIMAP_COLOR(i) VREG(18 + i)
|
||||
#define R_ITEM_AMMO_X(i) VREG(64 + i)
|
||||
#define R_ITEM_AMMO_Y(i) VREG(68 + i)
|
||||
#define R_ITEM_ICON_WIDTH(i) VREG(76 + i)
|
||||
#define R_ITEM_BTN_WIDTH(i) VREG(80 + i)
|
||||
|
||||
#define R_FB_FILTER_TYPE SREG(80)
|
||||
#define R_FB_FILTER_PRIM_COLOR(c) SREG(81 + c)
|
||||
#define R_FB_FILTER_A SREG(84)
|
||||
#define R_FB_FILTER_ENV_COLOR(c) SREG(85 + c)
|
||||
#define R_FB_FILTER_TYPE SREG(80)
|
||||
#define R_FB_FILTER_PRIM_COLOR(c) SREG(81 + c)
|
||||
#define R_FB_FILTER_A SREG(84)
|
||||
#define R_FB_FILTER_ENV_COLOR(c) SREG(85 + c)
|
||||
|
||||
#endif
|
||||
|
||||
+6
-6
@@ -1028,11 +1028,11 @@ extern UNK_PTR D_801BF5C0;
|
||||
// extern UNK_TYPE2 D_801BF890;
|
||||
// extern UNK_TYPE2 D_801BF898;
|
||||
// extern UNK_TYPE2 D_801BF89C;
|
||||
// extern UNK_TYPE2 D_801BF8A0;
|
||||
// extern UNK_TYPE2 D_801BF8A4;
|
||||
// extern UNK_TYPE2 D_801BF8A8;
|
||||
// extern UNK_TYPE2 D_801BF8AC;
|
||||
// extern UNK_TYPE2 D_801BF8B0;
|
||||
// extern UNK_TYPE2 sMagicMeterOutlinePrimRed;
|
||||
// extern UNK_TYPE2 sMagicMeterOutlinePrimGreen;
|
||||
// extern UNK_TYPE2 sMagicMeterOutlinePrimBlue;
|
||||
// extern UNK_TYPE2 sMagicBorderRatio;
|
||||
// extern UNK_TYPE2 sMagicBorderStep;
|
||||
// extern UNK_TYPE2 D_801BF8DC;
|
||||
// extern UNK_TYPE2 D_801BF8E0;
|
||||
// extern UNK_TYPE2 D_801BF8E4;
|
||||
@@ -2719,7 +2719,7 @@ extern f32 D_801DE860;
|
||||
extern f32 D_801DE864;
|
||||
extern f32 D_801DE868;
|
||||
extern f32 D_801DE884;
|
||||
extern TexturePtr D_801DE890[];
|
||||
extern TexturePtr gCircleTex;
|
||||
extern f32 D_801DF090;
|
||||
extern f32 D_801DF094;
|
||||
extern f32 D_801DF0A0;
|
||||
|
||||
+1
-1
@@ -523,7 +523,7 @@ typedef struct {
|
||||
/* 0x252 */ s16 lifeSizeChange;
|
||||
/* 0x254 */ s16 lifeSizeChangeDirection; // 1 means shrinking, 0 growing
|
||||
/* 0x256 */ s16 unk_256;
|
||||
/* 0x258 */ s16 unk_258;
|
||||
/* 0x258 */ s16 magicConsumptionTimer; // For certain magic states, 1 unit of magic is consumed every time the timer reaches 0
|
||||
/* 0x25A */ u8 numHorseBoosts;
|
||||
/* 0x25C */ u16 unk_25C;
|
||||
/* 0x25E */ u16 unk_25E;
|
||||
|
||||
+6
-3
@@ -365,15 +365,18 @@ typedef struct ActorListEntry {
|
||||
/* 0x8 */ s32 unk_08;
|
||||
} ActorListEntry; // size = 0xC
|
||||
|
||||
// Target size when activated
|
||||
#define LENS_MASK_ACTIVE_SIZE 100
|
||||
|
||||
typedef struct ActorContext {
|
||||
/* 0x000 */ u8 freezeFlashTimer;
|
||||
/* 0x001 */ UNK_TYPE1 pad1;
|
||||
/* 0x002 */ u8 unk2;
|
||||
/* 0x003 */ u8 unk3;
|
||||
/* 0x004 */ s8 unk4;
|
||||
/* 0x003 */ u8 lensActive;
|
||||
/* 0x004 */ s8 lensMaskSize; // The size of the circle when drawn the lens mask. Larger value leads to a smaller circle
|
||||
/* 0x005 */ u8 unk5;
|
||||
/* 0x006 */ UNK_TYPE1 pad6[0x5];
|
||||
/* 0x00B */ s8 unkB;
|
||||
/* 0x00B */ s8 lensActorsDrawn;
|
||||
/* 0x00C */ s16 unkC;
|
||||
/* 0x00E */ u8 totalLoadedActors;
|
||||
/* 0x00F */ u8 undrawnActorCount;
|
||||
|
||||
+41
-11
@@ -24,6 +24,36 @@ typedef enum RespawnMode {
|
||||
|
||||
#define SAVE_BUFFER_SIZE 0x4000
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ MAGIC_STATE_IDLE, // Regular gameplay
|
||||
/* 1 */ MAGIC_STATE_CONSUME_SETUP, // Sets the speed at which the magic border flashes
|
||||
/* 2 */ MAGIC_STATE_CONSUME, // Consume magic until target is reached or no more magic is available
|
||||
/* 3 */ MAGIC_STATE_METER_FLASH_1, // Flashes border
|
||||
/* 4 */ MAGIC_STATE_METER_FLASH_2, // Flashes border and draws yellow magic to preview target consumption
|
||||
/* 5 */ MAGIC_STATE_RESET, // Reset colors and return to idle
|
||||
/* 6 */ MAGIC_STATE_METER_FLASH_3, // Flashes border with no additional behaviour
|
||||
/* 7 */ MAGIC_STATE_CONSUME_LENS, // Magic slowly consumed by Lens of Truth
|
||||
/* 8 */ MAGIC_STATE_STEP_CAPACITY, // Step `magicCapacity` to full capacity
|
||||
/* 9 */ MAGIC_STATE_FILL, // Add magic until magicFillTarget is reached
|
||||
/* 10 */ MAGIC_STATE_CONSUME_GORON_ZORA_SETUP,
|
||||
/* 11 */ MAGIC_STATE_CONSUME_GORON_ZORA, // Magic slowly consumed by Goron spiked rolling or Zora electric barrier.
|
||||
/* 12 */ MAGIC_STATE_CONSUME_GIANTS_MASK // Magic slowly consumed by Giant's Mask
|
||||
} MagicState;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ MAGIC_CONSUME_NOW, // Consume magic immediately without preview
|
||||
/* 1 */ MAGIC_CONSUME_WAIT_NO_PREVIEW, // Sets consume target but waits to consume. No yellow magic preview to target consumption. Unused
|
||||
/* 2 */ MAGIC_CONSUME_NOW_ALT, // Identical behaviour to MAGIC_CONSUME_NOW. Unused
|
||||
/* 3 */ MAGIC_CONSUME_LENS, // Lens of Truth consumption
|
||||
/* 4 */ MAGIC_CONSUME_WAIT_PREVIEW, // Sets consume target but waits to consume. Show magic to be consumed in yellow.
|
||||
/* 5 */ MAGIC_CONSUME_GORON_ZORA, // Goron spiked rolling or Zora electric barrier slow consumption
|
||||
/* 6 */ MAGIC_CONSUME_GIANTS_MASK, // Giant's Mask slow consumption
|
||||
/* 7 */ MAGIC_CONSUME_DEITY_BEAM // Fierce Deity Beam consumption, consumed magic now and not via request
|
||||
} MagicChangeType;
|
||||
|
||||
#define MAGIC_NORMAL_METER 0x30
|
||||
#define MAGIC_DOUBLE_METER (2 * MAGIC_NORMAL_METER)
|
||||
|
||||
typedef struct SramContext {
|
||||
/* 0x00 */ u8* readBuff;
|
||||
/* 0x04 */ u8 *saveBuf;
|
||||
@@ -105,13 +135,13 @@ typedef struct SavePlayerData {
|
||||
/* 0x08 */ char playerName[8]; // "player_name"
|
||||
/* 0x10 */ s16 healthCapacity; // "max_life"
|
||||
/* 0x12 */ s16 health; // "now_life"
|
||||
/* 0x14 */ s8 magicLevel; // "magic_max"
|
||||
/* 0x15 */ s8 magic; // "magic_now"
|
||||
/* 0x14 */ s8 magicLevel; // 0 for no magic/new load, 1 for magic, 2 for double magic "magic_max"
|
||||
/* 0x15 */ s8 magic; // current magic available for use "magic_now"
|
||||
/* 0x16 */ s16 rupees; // "lupy_count"
|
||||
/* 0x18 */ u16 swordHealth; // "long_sword_hp"
|
||||
/* 0x1A */ u16 tatlTimer; // "navi_timer"
|
||||
/* 0x1C */ u8 magicAcquired; // "magic_mode"
|
||||
/* 0x1D */ u8 doubleMagic; // "magic_ability"
|
||||
/* 0x1C */ u8 isMagicAcquired; // "magic_mode"
|
||||
/* 0x1D */ u8 isDoubleMagicAcquired; // "magic_ability"
|
||||
/* 0x1E */ u8 doubleDefense; // "life_ability"
|
||||
/* 0x1F */ u8 unk_1F; // "ocarina_round"
|
||||
/* 0x20 */ u8 unk_20; // "first_memory"
|
||||
@@ -226,13 +256,13 @@ typedef struct SaveContext {
|
||||
/* 0x3F22 */ u16 unk_3F22; // "prev_alpha_type"
|
||||
/* 0x3F24 */ u16 unk_3F24; // "alpha_count"
|
||||
/* 0x3F26 */ u16 unk_3F26; // "last_time_type"
|
||||
/* 0x3F28 */ s16 unk_3F28; // "magic_flag"
|
||||
/* 0x3F2A */ s16 unk_3F2A; // "recovery_magic_flag"
|
||||
/* 0x3F2C */ s16 unk_3F2C; // "keep_magic_flag"
|
||||
/* 0x3F2E */ s16 unk_3F2E; // "magic_now_max"
|
||||
/* 0x3F30 */ s16 unk_3F30; // "magic_now_now"
|
||||
/* 0x3F32 */ s16 unk_3F32; // "magic_used"
|
||||
/* 0x3F34 */ s16 unk_3F34; // "magic_recovery"
|
||||
/* 0x3F28 */ s16 magicState; // determines magic meter behavior on each frame "magic_flag"
|
||||
/* 0x3F2A */ s16 isMagicRequested; // a request to add magic has been given "recovery_magic_flag"
|
||||
/* 0x3F2C */ s16 magicFlag; // Set to 0 in func_80812D94(), otherwise unused "keep_magic_flag"
|
||||
/* 0x3F2E */ s16 magicCapacity; // maximum magic available "magic_now_max"
|
||||
/* 0x3F30 */ s16 magicFillTarget; // target used to fill magic "magic_now_now"
|
||||
/* 0x3F32 */ s16 magicToConsume; // accumulated magic that is requested to be consumed "magic_used"
|
||||
/* 0x3F34 */ s16 magicToAdd; // accumulated magic that is requested to be added "magic_recovery"
|
||||
/* 0x3F36 */ u16 mapIndex; // "scene_ID"
|
||||
/* 0x3F38 */ u16 minigameState; // "yabusame_mode"
|
||||
/* 0x3F3A */ u16 minigameScore; // "yabusame_total"
|
||||
|
||||
@@ -8,7 +8,7 @@ void TitleSetup_GameStateResetContext(void) {
|
||||
XREG(12) = 0xE;
|
||||
XREG(13) = 0;
|
||||
XREG(31) = 0;
|
||||
XREG(41) = 0x50;
|
||||
R_MAGIC_CONSUME_TIMER_GIANTS_MASK = 80;
|
||||
XREG(43) = 0xFC54;
|
||||
|
||||
XREG(44) = 0xD7;
|
||||
|
||||
+21
-22
@@ -2212,10 +2212,10 @@ s32 func_800B90AC(PlayState* play, Actor* actor, CollisionPoly* polygon, s32 bgI
|
||||
return false;
|
||||
}
|
||||
|
||||
void func_800B90F4(PlayState* play) {
|
||||
if (play->actorCtx.unk3 != 0) {
|
||||
play->actorCtx.unk3 = 0;
|
||||
func_80115D5C(&play->state);
|
||||
void Actor_DeactivateLens(PlayState* play) {
|
||||
if (play->actorCtx.lensActive) {
|
||||
play->actorCtx.lensActive = false;
|
||||
Magic_Reset(play);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2594,7 +2594,7 @@ void func_800B9D1C(Actor* actor) {
|
||||
|
||||
void Actor_DrawAllSetup(PlayState* play) {
|
||||
play->actorCtx.undrawnActorCount = 0;
|
||||
play->actorCtx.unkB = 0;
|
||||
play->actorCtx.lensActorsDrawn = false;
|
||||
}
|
||||
|
||||
s32 Actor_RecordUndrawnActor(PlayState* play, Actor* actor) {
|
||||
@@ -2607,13 +2607,12 @@ s32 Actor_RecordUndrawnActor(PlayState* play, Actor* actor) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void func_800B9E84(Gfx** arg0, s32 arg1) {
|
||||
func_80164C14(arg0, D_801DE890, 4, 0, 6, 6, ((100 - arg1) * 0.003f) + 1.0f);
|
||||
void Actor_DrawLensOverlay(Gfx** gfxP, s32 lensMaskSize) {
|
||||
func_80164C14(gfxP, &gCircleTex, 4, 0, 6, 6, ((LENS_MASK_ACTIVE_SIZE - lensMaskSize) * 0.003f) + 1.0f);
|
||||
}
|
||||
|
||||
#ifdef NON_EQUIVALENT
|
||||
// Related to draw actors with lens
|
||||
void func_800B9EF4(PlayState* play, s32 numActors, Actor** actors) {
|
||||
void Actor_DrawLensActors(PlayState* play, s32 numActors, Actor** actors) {
|
||||
s32 spB4;
|
||||
Gfx* spAC;
|
||||
void* spA8; // pad
|
||||
@@ -2684,7 +2683,7 @@ void func_800B9EF4(PlayState* play, s32 numActors, Actor** actors) {
|
||||
}
|
||||
|
||||
// spAC = phi_s1;
|
||||
func_800B9E84(&spAC, play->actorCtx.unk4);
|
||||
Actor_DrawLensOverlay(&spAC, play->actorCtx.lensMaskSize);
|
||||
phi_s1_2 = func_801660B8(play, spAC);
|
||||
|
||||
for (spB4 = 0; spB4 < numActors; spB4++, actors++) {
|
||||
@@ -2744,7 +2743,7 @@ void func_800B9EF4(PlayState* play, s32 numActors, Actor** actors) {
|
||||
spAC = phi_s1_2;
|
||||
|
||||
// spAC = temp_s1_11;
|
||||
func_800B9E84(&spAC, (s32)play->actorCtx.unk4);
|
||||
Actor_DrawLensOverlay(&spAC, (s32)play->actorCtx.lensMaskSize);
|
||||
// temp_s1_11->words.w0 = 0xE7000000;
|
||||
// temp_s1_11->words.w1 = 0;
|
||||
// temp_s1_12 = temp_s1_11 + 8;
|
||||
@@ -2796,15 +2795,15 @@ void func_800B9EF4(PlayState* play, s32 numActors, Actor** actors) {
|
||||
// spAC = temp_s1_18 + 8;
|
||||
gDPSetPrimColor(spAC++, 0, 0, 74, 0, 0, 74);
|
||||
|
||||
func_800B9E84(&spAC, (s32)play->actorCtx.unk4);
|
||||
Actor_DrawLensOverlay(&spAC, (s32)play->actorCtx.lensMaskSize);
|
||||
|
||||
OVERLAY_DISP = spAC;
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
#else
|
||||
void func_800B9EF4(PlayState* play, s32 numActors, Actor** actors);
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_actor/func_800B9EF4.s")
|
||||
void Actor_DrawLensActors(PlayState* play, s32 numActors, Actor** actors);
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_actor/Actor_DrawLensActors.s")
|
||||
#endif
|
||||
|
||||
s32 func_800BA2D8(PlayState* play, Actor* actor) {
|
||||
@@ -2883,7 +2882,7 @@ void Actor_DrawAll(PlayState* play, ActorContext* actorCtx) {
|
||||
actor->isDrawn = false;
|
||||
if ((actor->init == NULL) && (actor->draw != NULL) && (actor->flags & actorFlags)) {
|
||||
if ((actor->flags & ACTOR_FLAG_80) &&
|
||||
((play->roomCtx.currRoom.unk5 == 0) || (play->actorCtx.unk4 == 0x64) ||
|
||||
((play->roomCtx.currRoom.unk5 == 0) || (play->actorCtx.lensMaskSize == LENS_MASK_ACTIVE_SIZE) ||
|
||||
(actor->room != play->roomCtx.currRoom.num))) {
|
||||
if (Actor_RecordUndrawnActor(play, actor)) {}
|
||||
} else {
|
||||
@@ -2903,17 +2902,17 @@ void Actor_DrawAll(PlayState* play, ActorContext* actorCtx) {
|
||||
gSPDisplayList(sp58, &ref2[1]);
|
||||
POLY_XLU_DISP = &ref2[1];
|
||||
|
||||
if (play->actorCtx.unk3 != 0) {
|
||||
Math_StepToC(&play->actorCtx.unk4, 100, 20);
|
||||
if (play->actorCtx.lensActive) {
|
||||
Math_StepToC(&play->actorCtx.lensMaskSize, LENS_MASK_ACTIVE_SIZE, 20);
|
||||
if (GET_PLAYER(play)->stateFlags2 & 0x8000000) {
|
||||
func_800B90F4(play);
|
||||
Actor_DeactivateLens(play);
|
||||
}
|
||||
} else {
|
||||
Math_StepToC(&play->actorCtx.unk4, 0, 10);
|
||||
Math_StepToC(&play->actorCtx.lensMaskSize, 0, 10);
|
||||
}
|
||||
if (play->actorCtx.unk4 != 0) {
|
||||
play->actorCtx.unkB = 1;
|
||||
func_800B9EF4(play, play->actorCtx.undrawnActorCount, play->actorCtx.undrawnActors);
|
||||
if (play->actorCtx.lensMaskSize != 0) {
|
||||
play->actorCtx.lensActorsDrawn = true;
|
||||
Actor_DrawLensActors(play, play->actorCtx.undrawnActorCount, play->actorCtx.undrawnActors);
|
||||
}
|
||||
|
||||
tmp2 = POLY_XLU_DISP;
|
||||
|
||||
@@ -25,7 +25,7 @@ u16 ElfMessage_GetFirstCycleHint(PlayState* play) {
|
||||
}
|
||||
return 0x21D;
|
||||
}
|
||||
if (gSaveContext.save.playerData.magicAcquired != true) {
|
||||
if (gSaveContext.save.playerData.isMagicAcquired != true) {
|
||||
return 0x21F;
|
||||
}
|
||||
if (INV_CONTENT(ITEM_DEED_LAND) == ITEM_DEED_LAND) {
|
||||
|
||||
@@ -500,7 +500,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
if (play->gameOverCtx.state != 0) {
|
||||
if (play->gameOverCtx.state != GAMEOVER_INACTIVE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,8 @@ void KaleidoSetup_Update(PlayState* play) {
|
||||
if ((play->transitionTrigger == TRANS_TRIGGER_OFF) && (play->transitionMode == TRANS_MODE_OFF)) {
|
||||
if ((gSaveContext.save.cutscene < 0xFFF0) && (gSaveContext.nextCutsceneIndex < 0xFFF0)) {
|
||||
if (!Play_InCsMode(play) || ((msgCtx->msgMode != 0) && (msgCtx->currentTextId == 0xFF))) {
|
||||
if ((play->unk_1887C < 2) && (gSaveContext.unk_3F28 != 8) && (gSaveContext.unk_3F28 != 9)) {
|
||||
if ((play->unk_1887C < 2) && (gSaveContext.magicState != MAGIC_STATE_STEP_CAPACITY) &&
|
||||
(gSaveContext.magicState != MAGIC_STATE_FILL)) {
|
||||
if (!(gSaveContext.eventInf[1] & 0x80) && !(player->stateFlags1 & 0x20)) {
|
||||
if (!(play->actorCtx.unk5 & 2) && !(play->actorCtx.unk5 & 4)) {
|
||||
if ((play->actorCtx.unk268 == 0) && CHECK_BTN_ALL(input->press.button, BTN_START)) {
|
||||
|
||||
+477
-17
File diff suppressed because it is too large
Load Diff
@@ -597,12 +597,12 @@ SavePlayerData sSaveDefaultPlayerData = {
|
||||
0x30, // healthCapacity
|
||||
0x30, // health
|
||||
0, // magicLevel
|
||||
0x30, // magic
|
||||
MAGIC_NORMAL_METER, // magic
|
||||
0, // rupees
|
||||
0, // swordHealth
|
||||
0, // tatlTimer
|
||||
0, // magicAcquired
|
||||
0, // doubleMagic
|
||||
false, // isMagicAcquired
|
||||
false, // isDoubleMagicAcquired
|
||||
0, // doubleDefense
|
||||
0, // unk_1F
|
||||
0xFF, // unk_20
|
||||
@@ -697,12 +697,12 @@ SavePlayerData sSaveDebugPlayerData = {
|
||||
0x80, // healthCapacity
|
||||
0x80, // health
|
||||
0, // magicLevel
|
||||
0x30, // magic
|
||||
0x32, // rupees
|
||||
0x64, // swordHealth
|
||||
MAGIC_NORMAL_METER, // magic
|
||||
50, // rupees
|
||||
100, // swordHealth
|
||||
0, // tatlTimer
|
||||
1, // magicAcquired
|
||||
0, // doubleMagic
|
||||
true, // isMagicAcquired
|
||||
false, // isDoubleMagicAcquired
|
||||
0, // doubleDefense
|
||||
0, // unk_1F
|
||||
0xFF, // unk_20
|
||||
|
||||
@@ -81,7 +81,7 @@ void ArrowFire_Init(Actor* thisx, PlayState* play) {
|
||||
void ArrowFire_Destroy(Actor* thisx, PlayState* play) {
|
||||
ArrowFire* this = THIS;
|
||||
|
||||
func_80115D5C(&play->state);
|
||||
Magic_Reset(play);
|
||||
Collider_DestroyQuad(play, &this->collider1);
|
||||
Collider_DestroyQuad(play, &this->collider2);
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ void ArrowIce_Init(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
void ArrowIce_Destroy(Actor* thisx, PlayState* play) {
|
||||
func_80115D5C(&play->state);
|
||||
Magic_Reset(play);
|
||||
(void)"消滅"; // Unreferenced in retail, means "Disappearance"
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ void ArrowLight_Init(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
void ArrowLight_Destroy(Actor* thisx, PlayState* play) {
|
||||
func_80115D5C(&play->state);
|
||||
Magic_Reset(play);
|
||||
(void)"消滅"; // Unreferenced in retail, means "Disappearance"
|
||||
}
|
||||
|
||||
|
||||
@@ -571,7 +571,7 @@ void Boss02_Init(Actor* thisx, PlayState* play) {
|
||||
} else {
|
||||
this->unk_1D20 = 1;
|
||||
}
|
||||
XREG(41) = KREG(14) + 20;
|
||||
R_MAGIC_CONSUME_TIMER_GIANTS_MASK = KREG(14) + 20;
|
||||
this->unk_01AC = 1.0f;
|
||||
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_TANRON5, 0.0f, 1000.0f, 0.0f, 0, 0, 0, 0);
|
||||
} else if (this->actor.params == TWINMOLD_TAIL) {
|
||||
|
||||
@@ -139,7 +139,7 @@ void EnArrow_Destroy(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
if ((this->actor.params >= ENARROW_3) && (this->actor.params < ENARROW_6) && (this->actor.child == NULL)) {
|
||||
func_80115D5C(&play->state);
|
||||
Magic_Reset(play);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,13 +162,13 @@ void func_8088A594(EnArrow* this, PlayState* play) {
|
||||
this->bubble.unk_148++;
|
||||
if (this->bubble.unk_148 > 20) {
|
||||
this->actionFunc = func_8088ACE0;
|
||||
func_80115D5C(&play->state);
|
||||
Magic_Reset(play);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ((this->actor.params != ENARROW_8) && (player->unk_D57 == 0)) {
|
||||
if (this->actor.params == ENARROW_7) {
|
||||
func_80115D5C(&play->state);
|
||||
Magic_Reset(play);
|
||||
}
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
return;
|
||||
@@ -202,7 +202,7 @@ void func_8088A594(EnArrow* this, PlayState* play) {
|
||||
this->bubble.unk_144 = CLAMP_MIN(this->bubble.unk_144, 3.5f);
|
||||
func_8088A514(this);
|
||||
this->unk_260 = 99;
|
||||
func_80115D5C(&play->state);
|
||||
Magic_Reset(play);
|
||||
} else if (this->actor.params >= ENARROW_6) {
|
||||
if ((this->actor.params == ENARROW_8) && (this->actor.world.rot.x < 0)) {
|
||||
Actor_SetScale(&this->actor, 0.009f);
|
||||
@@ -310,7 +310,7 @@ void func_8088AA98(EnArrow* this, PlayState* play) {
|
||||
return;
|
||||
}
|
||||
|
||||
func_80115D5C(&play->state);
|
||||
Magic_Reset(play);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user