mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
Misc fixes (#159)
* Fix `extract_assets` not properly checking if scenes files were updated * fix `first_diff.py` path due to the baserom renaming * FlexSkeletonHeader and other stuff * fix some SkeletonHeader instead of FlexSkeletonHeader * Add blob compilation to makefile * CURRENT_DAY and type swaps * Remove extra cast * run format * zbanks suggestions
This commit is contained in:
@@ -80,6 +80,8 @@ BASEROM_DIRS := $(shell find baserom -type d 2>/dev/null)
|
||||
COMP_DIRS := $(BASEROM_DIRS:baserom%=comp%)
|
||||
BINARY_DIRS := $(BASEROM_DIRS:baserom%=binary%)
|
||||
ASSET_C_FILES := $(shell find assets/ -type f -name "*.c")
|
||||
ASSET_FILES_BIN := $(foreach dir,$(ASSET_BIN_DIRS),$(wildcard $(dir)/*.bin))
|
||||
ASSET_FILES_OUT := $(foreach f,$(ASSET_FILES_BIN:.bin=.bin.inc.c),build/$f)
|
||||
|
||||
# Because we may not have disassembled the code files yet, there might not be any assembly files.
|
||||
# Instead, generate a list of assembly files based on what's listed in the linker script.
|
||||
@@ -137,7 +139,7 @@ CC := ./tools/preprocess.py $(CC) -- $(AS) $(ASFLAGS) --
|
||||
|
||||
# just using build/baserom still probably has some race condiction/dependency bug, but since
|
||||
# it is first and should be completed relatively fast, it should not occur all that often.
|
||||
$(UNCOMPRESSED_ROM): build/baserom $(TEXTURE_FILES_OUT) $(UNCOMPRESSED_ROM_FILES)
|
||||
$(UNCOMPRESSED_ROM): build/baserom $(TEXTURE_FILES_OUT) $(ASSET_FILES_OUT) $(UNCOMPRESSED_ROM_FILES)
|
||||
./tools/makerom.py ./tables/dmadata_table.txt $@
|
||||
ifeq ($(COMPARE),1)
|
||||
@md5sum $(UNCOMPRESSED_ROM)
|
||||
@@ -302,6 +304,9 @@ build/assets/%.d: assets/%.c
|
||||
build/%.inc.c: %.png
|
||||
$(ZAPD) btex -eh -tt $(lastword ,$(subst ., ,$(basename $<))) -i $< -o $@
|
||||
|
||||
build/assets/%.bin.inc.c: assets/%.bin
|
||||
$(ZAPD) bblb -eh -i $< -o $@
|
||||
|
||||
build/assets/%.jpg.inc.c: assets/%.jpg
|
||||
$(ZAPD) bren -eh -i $< -o $@
|
||||
|
||||
|
||||
+5
-3
@@ -37,9 +37,11 @@ def ExtractFunc(fullPath):
|
||||
basromPath = os.path.join("baserom", "assets", *pathList[2:-1])
|
||||
outSourcePath = outPath
|
||||
|
||||
isScene = fullPath.startswith("assets/xml/scenes/")
|
||||
if isScene:
|
||||
objectName += "_scene"
|
||||
## MM doesn't have _scene prefixed files, so this check is not necessary.
|
||||
## This _may_ change in the future, so I wont delete this for now.
|
||||
#isScene = fullPath.startswith("assets/xml/scenes/")
|
||||
#if isScene:
|
||||
# objectName += "_scene"
|
||||
|
||||
if not globalForce:
|
||||
cFile = os.path.join(outPath, objectName + ".c")
|
||||
|
||||
+2
-2
@@ -34,10 +34,10 @@ diff_count = args.count
|
||||
if args.make:
|
||||
check_call(["make", "-j4", "COMPARE=0"])
|
||||
|
||||
baseimg = f"expected/rom_uncompressed.z64"
|
||||
baseimg = f"expected/mm.us.rev1.rom_uncompressed.z64"
|
||||
basemap = f"expected/build/mm.map"
|
||||
|
||||
myimg = f"rom_uncompressed.z64"
|
||||
myimg = f"mm.us.rev1.rom_uncompressed.z64"
|
||||
mymap = f"build/mm.map"
|
||||
|
||||
if not os.path.isfile(baseimg):
|
||||
|
||||
+31
-31
@@ -2537,33 +2537,33 @@ s32 Entrance_GetTransitionFlags(u16 entranceIndex);
|
||||
// void func_80132FDC(void);
|
||||
// void func_80133000(void);
|
||||
// void func_80133038(void);
|
||||
void SkelAnime_LodDrawLimb(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skeleton, Vec3s* limbDrawTable, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, s32 dListIndex);
|
||||
void SkelAnime_LodDraw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDrawTable, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, s32 dListIndex);
|
||||
void SkelAnime_LodDrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skeleton, Vec3s* limbDrawTable, OverrideLimbDrawSV overrideLimbDraw, PostLimbDrawSV postLimbDraw, Actor* actor, s32 dListIndex, RSPMatrix** mtx);
|
||||
void SkelAnime_LodDrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDrawTable, s32 dListCount, OverrideLimbDrawSV overrideLimbDraw, PostLimbDrawSV postLimbDraw, Actor* actor, s32 dListIndex);
|
||||
void SkelAnime_DrawLimb(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skeleton, Vec3s* limbDrawTable, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor);
|
||||
void SkelAnime_Draw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDrawTable, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor);
|
||||
void SkelAnime_DrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skeleton, Vec3s* limbDrawTable, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, RSPMatrix** limbMatricies);
|
||||
void SkelAnime_DrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDrawTable, s32 dListCount, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor);
|
||||
void func_80134148(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skeleton, Vec3s* limbDrawTable, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, UnkActorDraw unkDraw, Actor* actor, RSPMatrix** mtx);
|
||||
void func_801343C0(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDrawTable, s32 dListCount, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, UnkActorDraw unkDraw, Actor* actor);
|
||||
void SkelAnime_LodDrawLimb(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec3s* limbDrawTable, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, s32 dListIndex);
|
||||
void SkelAnime_LodDraw(GlobalContext* globalCtx, void** skeleton, Vec3s* limbDrawTable, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, s32 dListIndex);
|
||||
void SkelAnime_LodDrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec3s* limbDrawTable, OverrideLimbDrawSV overrideLimbDraw, PostLimbDrawSV postLimbDraw, Actor* actor, s32 dListIndex, RSPMatrix** mtx);
|
||||
void SkelAnime_LodDrawSV(GlobalContext* globalCtx, void** skeleton, Vec3s* limbDrawTable, s32 dListCount, OverrideLimbDrawSV overrideLimbDraw, PostLimbDrawSV postLimbDraw, Actor* actor, s32 dListIndex);
|
||||
void SkelAnime_DrawLimb(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec3s* limbDrawTable, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor);
|
||||
void SkelAnime_Draw(GlobalContext* globalCtx, void** skeleton, Vec3s* limbDrawTable, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor);
|
||||
void SkelAnime_DrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec3s* limbDrawTable, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, RSPMatrix** limbMatricies);
|
||||
void SkelAnime_DrawSV(GlobalContext* globalCtx, void** skeleton, Vec3s* limbDrawTable, s32 dListCount, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor);
|
||||
void func_80134148(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec3s* limbDrawTable, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, UnkActorDraw unkDraw, Actor* actor, RSPMatrix** mtx);
|
||||
void func_801343C0(GlobalContext* globalCtx, void** skeleton, Vec3s* limbDrawTable, s32 dListCount, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, UnkActorDraw unkDraw, Actor* actor);
|
||||
void SkelAnime_AnimateFrame(AnimationHeader* animationSeg, s32 currentFrame, s32 limbCount, Vec3s* dst);
|
||||
s16 SkelAnime_GetTotalFrames(GenericAnimationHeader* animationSeg);
|
||||
s16 SkelAnime_GetFrameCount(GenericAnimationHeader* animationSeg);
|
||||
Gfx* SkelAnime_Draw2Limb(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skeleton, Vec3s* limbDrawTable, OverrideLimbDraw2 overrideLimbDraw, PostLimbDraw2 postLimbDraw, Actor* actor, Gfx* gfx);
|
||||
Gfx* SkelAnime_Draw2(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDrawTable, OverrideLimbDraw2 overrideLimbDraw, PostLimbDraw2 postLimbDraw, Actor* actor, Gfx* gfx);
|
||||
Gfx* SkelAnime_DrawLimbSV2(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skeleton, Vec3s* limbDrawTable, OverrideLimbDraw2 overrideLimbDraw, PostLimbDraw2 postLimbDraw, Actor* actor, RSPMatrix** mtx, Gfx* gfx);
|
||||
Gfx* SkelAnime_DrawSV2(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDrawTable, s32 dListCount, OverrideLimbDraw2 overrideLimbDraw, PostLimbDraw2 postLimbDraw, Actor* actor, Gfx* gfx);
|
||||
s16 SkelAnime_GetTotalFrames(AnimationHeaderCommon* animationSeg);
|
||||
s16 SkelAnime_GetFrameCount(AnimationHeaderCommon* animationSeg);
|
||||
Gfx* SkelAnime_Draw2Limb(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec3s* limbDrawTable, OverrideLimbDraw2 overrideLimbDraw, PostLimbDraw2 postLimbDraw, Actor* actor, Gfx* gfx);
|
||||
Gfx* SkelAnime_Draw2(GlobalContext* globalCtx, void** skeleton, Vec3s* limbDrawTable, OverrideLimbDraw2 overrideLimbDraw, PostLimbDraw2 postLimbDraw, Actor* actor, Gfx* gfx);
|
||||
Gfx* SkelAnime_DrawLimbSV2(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec3s* limbDrawTable, OverrideLimbDraw2 overrideLimbDraw, PostLimbDraw2 postLimbDraw, Actor* actor, RSPMatrix** mtx, Gfx* gfx);
|
||||
Gfx* SkelAnime_DrawSV2(GlobalContext* globalCtx, void** skeleton, Vec3s* limbDrawTable, s32 dListCount, OverrideLimbDraw2 overrideLimbDraw, PostLimbDraw2 postLimbDraw, Actor* actor, Gfx* gfx);
|
||||
s32 func_80134FFC(s32 arg0, s32 arg1, Vec3s* dst);
|
||||
s16 func_801353D4(GenericAnimationHeader* animationSeg);
|
||||
s16 SkelAnime_GetTotalFrames2(GenericAnimationHeader* animationSeg);
|
||||
s16 SkelAnime_GetFrameCount2(GenericAnimationHeader* animationSeg);
|
||||
s16 func_801353D4(AnimationHeaderCommon* animationSeg);
|
||||
s16 SkelAnime_GetTotalFrames2(AnimationHeaderCommon* animationSeg);
|
||||
s16 SkelAnime_GetFrameCount2(AnimationHeaderCommon* animationSeg);
|
||||
void SkelAnime_InterpolateVec3s(s32 limbCount, Vec3s* dst, Vec3s* vec2, Vec3s* vec3, f32 unkf);
|
||||
void SkelAnime_AnimationCtxReset(AnimationContext* animationCtx);
|
||||
void func_801358D4(GlobalContext* globalCtx);
|
||||
void func_801358F4(GlobalContext* globalCtx);
|
||||
AnimationEntry* SkelAnime_NextEntry(AnimationContext* animationCtx, AnimationType type);
|
||||
void SkelAnime_LoadLinkAnimetion(GlobalContext* globalCtx, LinkAnimetionEntry* linkAnimetionSeg, s32 frame, s32 limbCount, void* ram);
|
||||
void SkelAnime_LoadLinkAnimetion(GlobalContext* globalCtx, LinkAnimationHeader* linkAnimetionSeg, s32 frame, s32 limbCount, void* ram);
|
||||
void SkelAnime_LoadAnimationType1(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src);
|
||||
void SkelAnime_LoadAnimationType2(GlobalContext* globalCtx, s32 limbCount, Vec3s* arg2, Vec3s* arg3, f32 arg4);
|
||||
void SkelAnime_LoadAnimationType3(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src, u8* index);
|
||||
@@ -2576,7 +2576,7 @@ void SkelAnime_AnimationType3Loaded(GlobalContext* globalCtx, AnimationEntryType
|
||||
void SkelAnime_AnimationType4Loaded(GlobalContext* globalCtx, AnimationEntryType4* entry);
|
||||
void SkelAnime_AnimationType5Loaded(GlobalContext* globalCtx, AnimationEntryType5* entry);
|
||||
void func_80135EE8(GlobalContext* globalCtx, AnimationContext* animationCtx);
|
||||
void SkelAnime_InitLinkAnimetion(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg, LinkAnimetionEntry* linkAnimetionEntrySeg, s32 flags, Vec3s* limbDrawTbl, Vec3s* transitionDrawTbl, s32 limbBufCount);
|
||||
void SkelAnime_InitLinkAnimetion(GlobalContext* globalCtx, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg, LinkAnimationHeader* linkAnimationHeaderSeg, s32 flags, Vec3s* limbDrawTbl, Vec3s* transitionDrawTbl, s32 limbBufCount);
|
||||
void func_801360A8(SkelAnime* skelAnime);
|
||||
s32 func_801360E0(GlobalContext* globalCtx, SkelAnime* skelAnime);
|
||||
s32 func_80136104(GlobalContext* globalCtx, SkelAnime* skelAnime);
|
||||
@@ -2584,23 +2584,23 @@ void func_801361BC(GlobalContext* globalCtx, SkelAnime* skelAnime);
|
||||
s32 func_80136288(GlobalContext* globalCtx, SkelAnime* skelAnime);
|
||||
s32 func_8013631C(GlobalContext* globalCtx, SkelAnime* skelAnime);
|
||||
void SkelAnime_SetTransition(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 transitionRate);
|
||||
void SkelAnime_ChangeLinkAnim(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 playbackSpeed, f32 frame, f32 frameCount, u8 animationMode, f32 transitionRate);
|
||||
void SkelAnime_ChangeLinkAnimDefaultStop(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg);
|
||||
void SkelAnime_ChangeLinkAnimPlaybackStop(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 playbackSpeed);
|
||||
void SkelAnime_ChangeLinkAnimDefaultRepeat(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg);
|
||||
void SkelAnime_ChangeLinkAnimPlaybackRepeat(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 playbackSpeed);
|
||||
void SkelAnime_ChangeLinkAnim(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* linkAnimationHeaderSeg, f32 playbackSpeed, f32 frame, f32 frameCount, u8 animationMode, f32 transitionRate);
|
||||
void SkelAnime_ChangeLinkAnimDefaultStop(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* linkAnimationHeaderSeg);
|
||||
void SkelAnime_ChangeLinkAnimPlaybackStop(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* linkAnimationHeaderSeg, f32 playbackSpeed);
|
||||
void SkelAnime_ChangeLinkAnimDefaultRepeat(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* linkAnimationHeaderSeg);
|
||||
void SkelAnime_ChangeLinkAnimPlaybackRepeat(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* linkAnimationHeaderSeg, f32 playbackSpeed);
|
||||
void func_8013670C(GlobalContext* globalCtx, SkelAnime* skelAnime);
|
||||
void func_8013673C(GlobalContext* globalCtx, SkelAnime* skelAnime);
|
||||
void func_8013676C(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 frame);
|
||||
void func_801367B0(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 frame);
|
||||
void func_8013676C(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* linkAnimationHeaderSeg, f32 frame);
|
||||
void func_801367B0(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* linkAnimationHeaderSeg, f32 frame);
|
||||
void func_801367F4(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 frame);
|
||||
void func_8013682C(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 transitionFrame, LinkAnimetionEntry* linkAnimetionEntrySeg2, f32 frame, f32 transitionRate, Vec3s* limbDrawTbl);
|
||||
void func_801368CC(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 transitionFrame, LinkAnimetionEntry* linkAnimetionEntrySeg2, f32 frame, f32 transitionRate, Vec3s* limbDrawTbl);
|
||||
void func_8013682C(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* linkAnimationHeaderSeg, f32 transitionFrame, LinkAnimationHeader* LinkAnimationHeaderSeg2, f32 frame, f32 transitionRate, Vec3s* limbDrawTbl);
|
||||
void func_801368CC(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* linkAnimationHeaderSeg, f32 transitionFrame, LinkAnimationHeader* LinkAnimationHeaderSeg2, f32 frame, f32 transitionRate, Vec3s* limbDrawTbl);
|
||||
void SkelAnime_SetModeStop(SkelAnime* skelAnime);
|
||||
s32 func_80136990(SkelAnime* skelAnime, f32 arg1, f32 updateRate);
|
||||
s32 func_80136A48(SkelAnime* skelAnime, f32 arg1);
|
||||
void SkelAnime_Init(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg, AnimationHeader* animationSeg, Vec3s* limbDrawTbl, Vec3s* transitionDrawTable, s32 limbCount);
|
||||
void SkelAnime_InitSV(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg, AnimationHeader* animationSeg, Vec3s* limbDrawTbl, Vec3s* transitionDrawTable, s32 limbCount);
|
||||
void SkelAnime_InitSV(GlobalContext* globalCtx, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg, AnimationHeader* animationSeg, Vec3s* limbDrawTbl, Vec3s* transitionDrawTable, s32 limbCount);
|
||||
void SkelAnime_InitSkin(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg, AnimationHeader* animationSeg);
|
||||
void func_80136C84(SkelAnime* skelAnime);
|
||||
s32 SkelAnime_FrameUpdateMatrix(SkelAnime* skelAnime);
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
//#define LINK_IS_CHILD (gSaveContext.perm.linkAge != 0)
|
||||
#define LINK_IS_ADULT (gSaveContext.perm.linkAge == 0)
|
||||
|
||||
#define CURRENT_DAY (gSaveContext.perm.day % 5)
|
||||
|
||||
#define SQ(x) ((x)*(x))
|
||||
#define DECR(x) ((x) == 0 ? 0 : ((x) -= 1))
|
||||
|
||||
|
||||
+2
-2
@@ -644,9 +644,9 @@ typedef struct {
|
||||
/* 0x0008 */ s32 cutscene;
|
||||
/* 0x000C */ u16 time;
|
||||
/* 0x000E */ UNK_TYPE1 padE[0x2];
|
||||
/* 0x0010 */ u32 isNight;
|
||||
/* 0x0010 */ s32 isNight;
|
||||
/* 0x0014 */ u32 unk14;
|
||||
/* 0x0018 */ u32 day;
|
||||
/* 0x0018 */ s32 day;
|
||||
/* 0x001C */ u32 daysElapsed;
|
||||
/* 0x0020 */ u8 unk20;
|
||||
/* 0x0021 */ UNK_TYPE1 pad21[0x2];
|
||||
|
||||
+21
-20
@@ -24,18 +24,19 @@ typedef struct {
|
||||
/* 0x007 */ u8 nextLimbIndex; // The parent limb's next limb index into the limb table.
|
||||
/* 0x008 */ Gfx* displayLists[1]; // Display lists for the limb. Index 0 is the normal display list, index 1 is the
|
||||
// far model display list.
|
||||
} SkelLimbEntry; // Size = 0xC or 0x10
|
||||
} StandardLimb; // Size = 0xC
|
||||
|
||||
// Model has limbs with only rigid meshes
|
||||
typedef struct {
|
||||
/* 0x000 */ SkelLimbEntry* limbs[1]; // One or more limbs, index 0 is the root limb.
|
||||
} Skeleton; // Size >= 4
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ Skeleton* skeletonSeg; // Segment address of SkelLimbIndex.
|
||||
/* 0x000 */ void** skeletonSeg; // Segment address of SkelLimbIndex.
|
||||
/* 0x004 */ u8 limbCount; // Number of limbs in the model.
|
||||
/* 0x005 */ char unk05[3]; // unknown, maybe padding?
|
||||
} SkeletonHeader; // size = 0x8
|
||||
|
||||
// Model has limbs with flexible meshes
|
||||
typedef struct {
|
||||
/* 0x000 */ SkeletonHeader sh;
|
||||
/* 0x008 */ u8 dListCount; // Number of display lists in the model.
|
||||
} SkeletonHeader; // Size = 0xC
|
||||
} FlexSkeletonHeader; // size = 0xC
|
||||
|
||||
typedef s16 AnimationRotationValue;
|
||||
|
||||
@@ -43,18 +44,18 @@ typedef struct {
|
||||
/* 0x000 */ u16 x;
|
||||
/* 0x002 */ u16 y;
|
||||
/* 0x004 */ u16 z;
|
||||
} AnimationRotationIndex; // size = 0x06
|
||||
} JointIndex; // size = 0x06
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ s16 frameCount;
|
||||
/* 0x002 */ s16 unk02;
|
||||
} GenericAnimationHeader; // size = 0x4
|
||||
} AnimationHeaderCommon; // size = 0x4
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ GenericAnimationHeader genericHeader;
|
||||
/* 0x004 */ u32 rotationValueSeg; // referenced as tbl
|
||||
/* 0x008 */ u32 rotationIndexSeg; // referenced as ref_tbl
|
||||
/* 0x00C */ u16 limit;
|
||||
/* 0x00 */ AnimationHeaderCommon common;
|
||||
/* 0x04 */ s16* frameData; // referenced as tbl
|
||||
/* 0x08 */ JointIndex* jointIndices; // referenced as ref_tbl
|
||||
/* 0x0C */ u16 staticIndexMax;
|
||||
} AnimationHeader; // size = 0x10
|
||||
|
||||
typedef enum {
|
||||
@@ -137,9 +138,9 @@ typedef struct AnimationContext {
|
||||
} AnimationContext; // size = 0xC84
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ GenericAnimationHeader genericHeader;
|
||||
/* 0x004 */ u32 animationSegAddress;
|
||||
} LinkAnimetionEntry; // size = 0x8
|
||||
/* 0x00 */ AnimationHeaderCommon common;
|
||||
/* 0x04 */ u32 segment;
|
||||
} LinkAnimationHeader; // size = 0x8
|
||||
|
||||
struct SkelAnime {
|
||||
/* 0x00 */ u8 limbCount; // joint_Num
|
||||
@@ -150,12 +151,12 @@ struct SkelAnime {
|
||||
/* 0x01 */ u8 mode;
|
||||
/* 0x02 */ u8 dListCount;
|
||||
/* 0x03 */ s8 unk03;
|
||||
/* 0x04 */ Skeleton* skeleton;
|
||||
/* 0x04 */ void** skeleton; // An array of pointers to limbs. Can be StandardLimb, LodLimb, or SkinLimb.
|
||||
/* 0x08 */
|
||||
union {
|
||||
AnimationHeader* animCurrentSeg;
|
||||
LinkAnimetionEntry* linkAnimetionSeg;
|
||||
GenericAnimationHeader* genericSeg;
|
||||
LinkAnimationHeader* linkAnimetionSeg;
|
||||
AnimationHeaderCommon* genericSeg;
|
||||
};
|
||||
/* 0x0C */ f32 initialFrame;
|
||||
/* 0x10 */ f32 animFrameCount;
|
||||
|
||||
+113
-113
File diff suppressed because it is too large
Load Diff
@@ -23,7 +23,7 @@ const ActorInit Dm_Sa_InitVars = {
|
||||
(ActorFunc)DmSa_Draw,
|
||||
};
|
||||
|
||||
extern SkeletonHeader D_06013328;
|
||||
extern FlexSkeletonHeader D_06013328;
|
||||
extern AnimationHeader D_0600CC94;
|
||||
|
||||
static ActorAnimationEntry D_80A2ED00[] = { { &D_0600CC94, 1.0f, 0, -1.0f, 0, 0 } };
|
||||
@@ -33,7 +33,7 @@ void func_80A2E960(SkelAnime* arg0, ActorAnimationEntry* animations, u16 index)
|
||||
animations += index;
|
||||
|
||||
if (animations->frameCount < 0.0f) {
|
||||
frameCount = SkelAnime_GetFrameCount(&animations->animation->genericHeader);
|
||||
frameCount = SkelAnime_GetFrameCount(&animations->animation->common);
|
||||
} else {
|
||||
frameCount = animations->frameCount;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ const ActorInit En_Ending_Hero_InitVars = {
|
||||
(ActorFunc)EnEndingHero_Draw,
|
||||
};
|
||||
|
||||
extern SkeletonHeader D_0600B0CC;
|
||||
extern FlexSkeletonHeader D_0600B0CC;
|
||||
extern AnimationHeader D_06000BE0;
|
||||
extern UNK_PTR D_06007350[];
|
||||
extern UNK_PTR D_06009590[];
|
||||
|
||||
@@ -24,7 +24,7 @@ const ActorInit En_Ending_Hero2_InitVars = {
|
||||
(ActorFunc)EnEndingHero2_Draw,
|
||||
};
|
||||
|
||||
extern SkeletonHeader D_06007908;
|
||||
extern FlexSkeletonHeader D_06007908;
|
||||
extern AnimationHeader D_060011C0;
|
||||
|
||||
void EnEndingHero2_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
@@ -24,7 +24,7 @@ const ActorInit En_Ending_Hero3_InitVars = {
|
||||
(ActorFunc)EnEndingHero3_Draw,
|
||||
};
|
||||
|
||||
extern SkeletonHeader D_06007150;
|
||||
extern FlexSkeletonHeader D_06007150;
|
||||
extern AnimationHeader D_06000E50;
|
||||
|
||||
void EnEndingHero3_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
@@ -24,7 +24,7 @@ const ActorInit En_Ending_Hero4_InitVars = {
|
||||
(ActorFunc)EnEndingHero4_Draw,
|
||||
};
|
||||
|
||||
extern SkeletonHeader D_0600D640;
|
||||
extern FlexSkeletonHeader D_0600D640;
|
||||
extern AnimationHeader D_06002A84;
|
||||
|
||||
void EnEndingHero4_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
@@ -24,7 +24,7 @@ const ActorInit En_Ending_Hero5_InitVars = {
|
||||
(ActorFunc)EnEndingHero5_Draw,
|
||||
};
|
||||
|
||||
extern SkeletonHeader D_0600A850;
|
||||
extern FlexSkeletonHeader D_0600A850;
|
||||
extern AnimationHeader D_06002FA0;
|
||||
|
||||
extern Gfx D_060070C0[];
|
||||
|
||||
@@ -117,7 +117,7 @@ void EnGinkoMan_Idle(EnGinkoMan* this, GlobalContext* globalCtx) {
|
||||
this->curTextId = 0x44C; // would you like to make an account
|
||||
} else {
|
||||
func_800BDC5C(&this->skelAnime, animations, GINKO_SITTING);
|
||||
if ((((s32)gSaveContext.perm.day % 5) == 3) && (gSaveContext.perm.isNight == 1)) {
|
||||
if ((CURRENT_DAY == 3) && (gSaveContext.perm.isNight == 1)) {
|
||||
func_801518B0(globalCtx, 0x467, &this->actor);
|
||||
this->curTextId = 0x467; // "What's this? You need somethin' on a day like this?
|
||||
} else {
|
||||
@@ -304,7 +304,7 @@ void EnGinkoMan_DepositDialogue(EnGinkoMan* this, GlobalContext* globalCtx) { //
|
||||
func_801518B0(globalCtx, 0x479, &this->actor);
|
||||
this->curTextId = 0x479; // "Well, are you gonna make a deposit?"
|
||||
}
|
||||
} else if ((((s32)gSaveContext.perm.day % 5) == 3) && (gSaveContext.perm.isNight == 1)) {
|
||||
} else if ((CURRENT_DAY == 3) && (gSaveContext.perm.isNight == 1)) {
|
||||
func_801518B0(globalCtx, 0x46D, &this->actor);
|
||||
// "Look, little guy, if it's 'cause of the bad rumors going around, forget it! They're just rumors!"
|
||||
this->curTextId = 0x46D;
|
||||
@@ -687,8 +687,7 @@ void EnGinkoMan_Stamp(EnGinkoMan* this, GlobalContext* globalCtx) {
|
||||
case 0x469: // "Excuse me, but let me take a look at you..."
|
||||
func_800BDC5C(&this->skelAnime, animations, GINKO_SITTING);
|
||||
globalCtx->msgCtx.bankRupees = (gSaveContext.perm.bankRupees & 0xFFFF);
|
||||
// perm.day cast req for div vs divu
|
||||
if ((((s32)gSaveContext.perm.day % 5) == 3) && (gSaveContext.perm.isNight == 1)) {
|
||||
if ((CURRENT_DAY == 3) && (gSaveContext.perm.isNight == 1)) {
|
||||
func_801518B0(globalCtx, 0x46C, &this->actor);
|
||||
this->curTextId = 0x46C; // "Ah, yes...[Link], right?
|
||||
} else {
|
||||
|
||||
@@ -34,7 +34,7 @@ extern const ActorInit En_Ginko_Man_InitVars;
|
||||
#define GINKOMAN_CHOICE_YES 0
|
||||
#define GINKOMAN_CHOICE_NO 1
|
||||
|
||||
extern SkeletonHeader object_ginko_skeleton[];
|
||||
extern FlexSkeletonHeader object_ginko_skeleton[];
|
||||
extern Gfx object_ginko_limb15_dlist[];
|
||||
|
||||
extern AnimationHeader object_ginko_floorsmacking_anim[];
|
||||
|
||||
@@ -23,7 +23,7 @@ s32 EnPoFusen_OverrideLimbDraw(GlobalContext* gCtx, s32 limbIndex, Gfx** dList,
|
||||
struct Actor* actor);
|
||||
|
||||
extern AnimationHeader D_06000040;
|
||||
extern SkeletonHeader D_060024F0;
|
||||
extern FlexSkeletonHeader D_060024F0;
|
||||
|
||||
const ActorInit En_Po_Fusen_InitVars = {
|
||||
ACTOR_EN_PO_FUSEN,
|
||||
@@ -75,8 +75,7 @@ void EnPoFusen_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
if (0) {}
|
||||
this->collider.dim.worldSphere.radius = 40;
|
||||
SkelAnime_InitSV(globalCtx, &this->anime, &D_060024F0, &D_06000040,
|
||||
this->limbDrawTbl, this->transitionDrawTbl, 10);
|
||||
SkelAnime_InitSV(globalCtx, &this->anime, &D_060024F0, &D_06000040, this->limbDrawTbl, this->transitionDrawTbl, 10);
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 25.0f);
|
||||
func_800B78B8(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 4);
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ const ActorInit En_Rsn_InitVars = {
|
||||
(ActorFunc)EnRsn_Draw,
|
||||
};
|
||||
|
||||
extern SkeletonHeader D_06009220;
|
||||
extern FlexSkeletonHeader D_06009220;
|
||||
extern AnimationHeader D_06009120;
|
||||
extern AnimationHeader D_0600788C;
|
||||
extern Gfx D_06005458[];
|
||||
|
||||
@@ -26,8 +26,7 @@ extern Gfx D_060011E0[];
|
||||
void ObjDinner_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
ObjDinner* this = THIS;
|
||||
|
||||
if (gSaveContext.perm.isNight != 1 ||
|
||||
((s32)gSaveContext.perm.day % 5 == 3 && gSaveContext.perm.weekEventReg[0x16] & 1)) {
|
||||
if (gSaveContext.perm.isNight != 1 || (CURRENT_DAY == 3 && gSaveContext.perm.weekEventReg[0x16] & 1)) {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
}
|
||||
Actor_SetScale(&this->actor, 0.1f);
|
||||
|
||||
@@ -201,8 +201,7 @@ void ObjTokeiStep_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgCheck3_LoadMesh(globalCtx, &this->dyna, &D_06000968);
|
||||
ObjTokeiStep_InitSteps(this);
|
||||
ObjTokeiStep_SetupBeginOpen(this);
|
||||
} else if (!((((s32)gSaveContext.perm.day % 5) != 3) || (gSaveContext.perm.time >= 0x4000)) ||
|
||||
(s32)gSaveContext.perm.day >= 4) {
|
||||
} else if (!((CURRENT_DAY != 3) || (gSaveContext.perm.time >= 0x4000)) || gSaveContext.perm.day >= 4) {
|
||||
this->dyna.actor.draw = ObjTokeiStep_DrawOpen;
|
||||
ObjTokeiStep_InitStepsOpen(this);
|
||||
ObjTokeiStep_SetupDoNothingOpen(this);
|
||||
|
||||
Reference in New Issue
Block a user