mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-05 07:24:34 +00:00
En_Elf Decompiled (#432)
* init matched * everything but navi OK * progress * 4 left * remove asm * progress * progress * asm and spec * remove comment * suggestion * review1 * use type enum * name func * overridelimbdraw * review 2 * forgot one * merge master * format
This commit is contained in:
parent
3ba022128c
commit
6e000fcc54
77 changed files with 1637 additions and 4303 deletions
|
@ -1147,7 +1147,7 @@ u32 D_8015BBA4;
|
|||
|
||||
s32 func_8002E2AC(GlobalContext* globalCtx, Actor* actor, Vec3f* arg2, s32 arg3) {
|
||||
f32 sp34;
|
||||
u32 sp30;
|
||||
s32 sp30;
|
||||
|
||||
arg2->y += 50.0f;
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "overlays/actors/ovl_En_Elf/z_en_elf.h"
|
||||
#include "overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h"
|
||||
|
||||
#define FLAGS 0x00000000
|
||||
|
@ -876,7 +877,7 @@ EnItem00* Item_DropCollectible(GlobalContext* globalCtx, Vec3f* spawnPos, s16 pa
|
|||
if (((params & 0x00FF) == ITEM00_FLEXIBLE) && !param4000) {
|
||||
// TODO: Prevent the cast to EnItem00 here since this is a different actor (En_Elf)
|
||||
spawnedActor = (EnItem00*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELF, spawnPos->x,
|
||||
spawnPos->y + 40.0f, spawnPos->z, 0, 0, 0, 0x0002);
|
||||
spawnPos->y + 40.0f, spawnPos->z, 0, 0, 0, FAIRY_HEAL_TIMED);
|
||||
EffectSsDeadSound_SpawnStationary(globalCtx, spawnPos, NA_SE_EV_BUTTERFRY_TO_FAIRY, true,
|
||||
DEADSOUND_REPEAT_MODE_OFF, 40);
|
||||
} else {
|
||||
|
@ -920,7 +921,7 @@ EnItem00* Item_DropCollectible2(GlobalContext* globalCtx, Vec3f* spawnPos, s16 p
|
|||
if (((params & 0x00FF) == ITEM00_FLEXIBLE) && !param4000) {
|
||||
// TODO: Prevent the cast to EnItem00 here since this is a different actor (En_Elf)
|
||||
spawnedActor = (EnItem00*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELF, spawnPos->x,
|
||||
spawnPos->y + 40.0f, spawnPos->z, 0, 0, 0, 0x0002);
|
||||
spawnPos->y + 40.0f, spawnPos->z, 0, 0, 0, FAIRY_HEAL_TIMED);
|
||||
EffectSsDeadSound_SpawnStationary(globalCtx, spawnPos, NA_SE_EV_BUTTERFRY_TO_FAIRY, true,
|
||||
DEADSOUND_REPEAT_MODE_OFF, 40);
|
||||
} else {
|
||||
|
@ -990,7 +991,7 @@ void Item_DropCollectibleRandom(GlobalContext* globalCtx, Actor* fromActor, Vec3
|
|||
if (dropId == ITEM00_FLEXIBLE) {
|
||||
if (gSaveContext.health <= 0x10) { // 1 heart or less
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELF, spawnPos->x, spawnPos->y + 40.0f, spawnPos->z, 0,
|
||||
0, 0, 0x0002);
|
||||
0, 0, FAIRY_HEAL_TIMED);
|
||||
EffectSsDeadSound_SpawnStationary(globalCtx, spawnPos, NA_SE_EV_BUTTERFRY_TO_FAIRY, true,
|
||||
DEADSOUND_REPEAT_MODE_OFF, 40);
|
||||
return;
|
||||
|
|
|
@ -33,8 +33,8 @@ void Font_LoadOrderedFont(Font* font) {
|
|||
|
||||
font->msgOffset = D_070380D4 - D_07000000;
|
||||
len = font->msgLength = D_0703811C - D_070380D4;
|
||||
DmaMgr_SendRequest1(font->msgBuf, &_nes_message_data_staticSegmentRomStart[font->msgOffset], len,
|
||||
"../z_kanfont.c", 122);
|
||||
DmaMgr_SendRequest1(font->msgBuf, &_nes_message_data_staticSegmentRomStart[font->msgOffset], len, "../z_kanfont.c",
|
||||
122);
|
||||
osSyncPrintf("msg_data=%x, msg_data0=%x jj=%x\n", font->msgOffset, font->msgLength, jj = len);
|
||||
len = jj;
|
||||
for (fontBufIndex = 0, codePointIndex = 0; font->msgBuf[codePointIndex] != MESSAGE_END; codePointIndex++) {
|
||||
|
|
|
@ -1685,7 +1685,7 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) {
|
|||
return item;
|
||||
} else if (item == ITEM_MAGIC_SMALL) {
|
||||
if (gSaveContext.unk_13F0 != 10) {
|
||||
func_80087680(globalCtx);
|
||||
Magic_Fill(globalCtx);
|
||||
}
|
||||
|
||||
func_80087708(globalCtx, 12, 5);
|
||||
|
@ -1698,7 +1698,7 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) {
|
|||
return item;
|
||||
} else if (item == ITEM_MAGIC_LARGE) {
|
||||
if (gSaveContext.unk_13F0 != 10) {
|
||||
func_80087680(globalCtx);
|
||||
Magic_Fill(globalCtx);
|
||||
}
|
||||
|
||||
func_80087708(globalCtx, 24, 5);
|
||||
|
@ -2256,7 +2256,7 @@ void Inventory_ChangeAmmo(s16 item, s16 ammoChange) {
|
|||
osSyncPrintf("合計 = (%d)\n", AMMO(item));
|
||||
}
|
||||
|
||||
void func_80087680(GlobalContext* globalCtx) {
|
||||
void Magic_Fill(GlobalContext* globalCtx) {
|
||||
if (gSaveContext.magicAcquired) {
|
||||
gSaveContext.unk_13F2 = gSaveContext.unk_13F0;
|
||||
gSaveContext.unk_13F6 = (gSaveContext.doubleMagic * 0x30) + 0x30;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue