mirror of
https://github.com/HackerN64/HackerOoT.git
synced 2026-01-21 10:37:37 -08:00
Merge pull request #68 from Yanis42/decomp_merge
Merged decomp/main in HackerOoT
This commit is contained in:
8
Jenkinsfile
vendored
8
Jenkinsfile
vendored
@@ -17,7 +17,7 @@ pipeline {
|
||||
}
|
||||
stage('Build (qemu-irix)') {
|
||||
when {
|
||||
branch 'master'
|
||||
branch 'main'
|
||||
}
|
||||
steps {
|
||||
sh 'ORIG_COMPILER=1 make -j'
|
||||
@@ -26,7 +26,7 @@ pipeline {
|
||||
stage('Build') {
|
||||
when {
|
||||
not {
|
||||
branch 'master'
|
||||
branch 'main'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
@@ -35,7 +35,7 @@ pipeline {
|
||||
}
|
||||
stage('Report Progress') {
|
||||
when {
|
||||
branch 'master'
|
||||
branch 'main'
|
||||
}
|
||||
steps {
|
||||
sh 'mkdir reports'
|
||||
@@ -47,7 +47,7 @@ pipeline {
|
||||
}
|
||||
stage('Update Progress') {
|
||||
when {
|
||||
branch 'master'
|
||||
branch 'main'
|
||||
}
|
||||
agent {
|
||||
label 'zeldaret_website'
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
<Root>
|
||||
<File Name="object_shopnuts" Segment="6">
|
||||
<!-- Business Scrub Skeleton -->
|
||||
<Skeleton Name="gBusinessScrubSkel" Type="Flex" LimbType="Standard" Offset="0x41A8"/>
|
||||
<Skeleton Name="gBusinessScrubSkel" Type="Flex" LimbType="Standard" LimbNone="BUSINESS_SCRUB_LIMB_NONE" LimbMax="BUSINESS_SCRUB_LIMB_MAX" EnumName="BusinessScrubLimb" Offset="0x41A8"/>
|
||||
|
||||
<!-- Business Scrub Limbs -->
|
||||
<Limb Name="gBusinessScrubRootLimb" LimbType="Standard" Offset="0x4098"/>
|
||||
<Limb Name="gBusinessScrubLeftThighLimb" LimbType="Standard" Offset="0x40A4"/>
|
||||
<Limb Name="gBusinessScrubLeftShinLimb" LimbType="Standard" Offset="0x40B0"/>
|
||||
<Limb Name="gBusinessScrubLeftFootLimb" LimbType="Standard" Offset="0x40BC"/>
|
||||
<Limb Name="gBusinessScrubRightThighLimb" LimbType="Standard" Offset="0x40C8"/>
|
||||
<Limb Name="gBusinessScrubRightShinLimb" LimbType="Standard" Offset="0x40D4"/>
|
||||
<Limb Name="gBusinessScrubRightFootLimb" LimbType="Standard" Offset="0x40E0"/>
|
||||
<Limb Name="gBusinessScrubTopLeafLimb" LimbType="Standard" Offset="0x40EC"/>
|
||||
<Limb Name="gBusinessScrubNoseLimb" LimbType="Standard" Offset="0x40F8"/>
|
||||
<Limb Name="gBusinessScrubLeftUpperArmLimb" LimbType="Standard" Offset="0x4104"/>
|
||||
<Limb Name="gBusinessScrubLeftForearmLimb" LimbType="Standard" Offset="0x4110"/>
|
||||
<Limb Name="gBusinessScrubLeftHandLimb" LimbType="Standard" Offset="0x411C"/>
|
||||
<Limb Name="gBusinessScrubRightUpperArmLimb" LimbType="Standard" Offset="0x4128"/>
|
||||
<Limb Name="gBusinessScrubRightForearmLimb" LimbType="Standard" Offset="0x4134"/>
|
||||
<Limb Name="gBusinessScrubRightHandLimb" LimbType="Standard" Offset="0x4140"/>
|
||||
<Limb Name="gBusinessScrubEyesLimb" LimbType="Standard" Offset="0x414C"/>
|
||||
<Limb Name="gBusinessScrubBodyLimb" LimbType="Standard" Offset="0x4158"/>
|
||||
<Limb Name="gBusinessScrubRootLimb" LimbType="Standard" EnumName="BUSINESS_SCRUB_LIMB_ROOT" Offset="0x4098"/>
|
||||
<Limb Name="gBusinessScrubLeftThighLimb" LimbType="Standard" EnumName="BUSINESS_SCRUB_LIMB_LEFT_THIGH" Offset="0x40A4"/>
|
||||
<Limb Name="gBusinessScrubLeftShinLimb" LimbType="Standard" EnumName="BUSINESS_SCRUB_LIMB_LEFT_SHIN" Offset="0x40B0"/>
|
||||
<Limb Name="gBusinessScrubLeftFootLimb" LimbType="Standard" EnumName="BUSINESS_SCRUB_LIMB_LEFT_FOOT" Offset="0x40BC"/>
|
||||
<Limb Name="gBusinessScrubRightThighLimb" LimbType="Standard" EnumName="BUSINESS_SCRUB_LIMB_RIGHT_THIGH" Offset="0x40C8"/>
|
||||
<Limb Name="gBusinessScrubRightShinLimb" LimbType="Standard" EnumName="BUSINESS_SCRUB_LIMB_RIGHT_SHIN" Offset="0x40D4"/>
|
||||
<Limb Name="gBusinessScrubRightFootLimb" LimbType="Standard" EnumName="BUSINESS_SCRUB_LIMB_RIGHT_FOOT" Offset="0x40E0"/>
|
||||
<Limb Name="gBusinessScrubTopLeafLimb" LimbType="Standard" EnumName="BUSINESS_SCRUB_LIMB_TOP_LEAF" Offset="0x40EC"/>
|
||||
<Limb Name="gBusinessScrubNoseLimb" LimbType="Standard" EnumName="BUSINESS_SCRUB_LIMB_NOSE" Offset="0x40F8"/>
|
||||
<Limb Name="gBusinessScrubLeftUpperArmLimb" LimbType="Standard" EnumName="BUSINESS_SCRUB_LIMB_LEFT_UPPER_ARM" Offset="0x4104"/>
|
||||
<Limb Name="gBusinessScrubLeftForearmLimb" LimbType="Standard" EnumName="BUSINESS_SCRUB_LIMB_LEFT_FOREARM" Offset="0x4110"/>
|
||||
<Limb Name="gBusinessScrubLeftHandLimb" LimbType="Standard" EnumName="BUSINESS_SCRUB_LIMB_LEFT_HAND" Offset="0x411C"/>
|
||||
<Limb Name="gBusinessScrubRightUpperArmLimb" LimbType="Standard" EnumName="BUSINESS_SCRUB_LIMB_RIGHT_UPPER_ARM" Offset="0x4128"/>
|
||||
<Limb Name="gBusinessScrubRightForearmLimb" LimbType="Standard" EnumName="BUSINESS_SCRUB_LIMB_RIGHT_FOREARM" Offset="0x4134"/>
|
||||
<Limb Name="gBusinessScrubRightHandLimb" LimbType="Standard" EnumName="BUSINESS_SCRUB_LIMB_RIGHT_HAND" Offset="0x4140"/>
|
||||
<Limb Name="gBusinessScrubEyesLimb" LimbType="Standard" EnumName="BUSINESS_SCRUB_LIMB_EYES" Offset="0x414C"/>
|
||||
<Limb Name="gBusinessScrubBodyLimb" LimbType="Standard" EnumName="BUSINESS_SCRUB_LIMB_BODY" Offset="0x4158"/>
|
||||
|
||||
<!-- Business Scrub Limb DisplayLists -->
|
||||
<DList Name="gBusinessScrubRootLeafDL" Offset="0x3C80"/>
|
||||
@@ -54,14 +54,14 @@
|
||||
<DList Name="gBusinessScrubDekuNutDL" Offset="0x4008"/>
|
||||
|
||||
<!-- Business Scrub Animations -->
|
||||
<Animation Name="gBusinessScrubAnim_1EC" Offset="0x1EC"/>
|
||||
<Animation Name="gBusinessScrubAnim_39C" Offset="0x39C"/>
|
||||
<Animation Name="gBusinessScrubThrowNutAnim" Offset="0x1EC"/>
|
||||
<Animation Name="gBusinessScrubPeekBurrowAnim" Offset="0x39C"/>
|
||||
<Animation Name="gBusinessScrubRotateAnim" Offset="0x764"/>
|
||||
<Animation Name="gBusinessScrubNervousTransitionAnim" Offset="0x9A0"/>
|
||||
<Animation Name="gBusinessScrubLookAroundAnim" Offset="0xBA0"/>
|
||||
<Animation Name="gBusinessScrubNervousIdleAnim" Offset="0x1108"/>
|
||||
<Animation Name="gBusinessScrubAnim_139C" Offset="0x139C"/>
|
||||
<Animation Name="gBusinessScrubAnim_4404" Offset="0x4404"/>
|
||||
<Animation Name="gBusinessScrubAnim_4574" Offset="0x4574"/>
|
||||
<Animation Name="gBusinessScrubInitialAnim" Offset="0x139C"/>
|
||||
<Animation Name="gBusinessScrubLeaveBurrowAnim" Offset="0x4404"/>
|
||||
<Animation Name="gBusinessScrubPeekAnim" Offset="0x4574"/>
|
||||
</File>
|
||||
</Root>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
## Pre-decompilation
|
||||
- Building the repo (follow the instructions in the README.md)
|
||||
- Most of us use VSCode. (You can watch Fig's video to get an idea of how this can be used). Some useful information is [here](vscode.md).
|
||||
- Most of us use VSCode. (You can watch Fig's video to get an idea of how this can be used). Some useful information is [here](../vscode.md).
|
||||
- Choosing a first actor (You want something small that has simple interactions with the environment. But OoT is far enough in that there are basically no unreserved actors left anyway now.)
|
||||
|
||||
## Decompilation
|
||||
|
||||
@@ -61,9 +61,9 @@ If you can't match a function even with everyone's, don't worry overlong about i
|
||||
|
||||
Run the formatting script `format.py`, to format the C files in the standard way we use.
|
||||
|
||||
### Merge master
|
||||
### Merge main
|
||||
|
||||
To make sure the PR builds correctly with the current master, you need to merge `upstream/master` before you make the PR. This tends to break things, that you have to fix to get it to compile correctly again.
|
||||
To make sure the PR builds correctly with the current main, you need to merge `upstream/main` before you make the PR. This tends to break things, that you have to fix to get it to compile correctly again.
|
||||
|
||||
## Pull Requests
|
||||
|
||||
@@ -81,7 +81,7 @@ and so on, although these four tend to cover most cases. Feel free to add a comm
|
||||
|
||||
Pull requests may be reviewed by anyone (who knows enough about the conventions of the project), but all are usually reviewed by Fig and Roman.
|
||||
|
||||
To implement suggestions made in reviews, it is generally easier to be consistent if you push more commits from your local branch. It is quite possible that in the meantime some other PR has gone in, and git will ask you to merge master before you add more commits. This is normally fairly painless, although often you have to resolve merge conflicts. If in doubt, backup your work before doing anything, and ask in Discord before doing anything drastic, or if you don't understand what git is telling you.
|
||||
To implement suggestions made in reviews, it is generally easier to be consistent if you push more commits from your local branch. It is quite possible that in the meantime some other PR has gone in, and git will ask you to merge main before you add more commits. This is normally fairly painless, although often you have to resolve merge conflicts. If in doubt, backup your work before doing anything, and ask in Discord before doing anything drastic, or if you don't understand what git is telling you.
|
||||
|
||||
There is no need to wait for your PR to be approved and committed before working on your next actor.
|
||||
|
||||
@@ -94,4 +94,4 @@ It's helpful to use the labels on Trello.
|
||||
- Matched for when it is totally decompiled and matching
|
||||
- Documented if at least everything is named and odd code is commented. We'll likely wipe these and start over when proper documentation begins.
|
||||
|
||||
We now have a PR label on the Trello that you can use to indicate your actor is in a PR. When the actor is committed to master, you can move the actor into the `Decompiled Files (Overlays)` column: it goes at the top if there is a non-matching, and below if not.
|
||||
We now have a PR label on the Trello that you can use to indicate your actor is in a PR. When the actor is committed to main, you can move the actor into the `Decompiled Files (Overlays)` column: it goes at the top if there is a non-matching, and below if not.
|
||||
|
||||
@@ -10,7 +10,7 @@ This is covered on the main page of the repository.
|
||||
|
||||
First, make a GitHub fork of the repository, then clone it into a git-enabled local folder.
|
||||
|
||||
Once you have decided on an actor, you should make a new git branch to work on: your master branch is meant to stay level with the main repository. Name it something sensible: my `EnFirefly` branch is called "en_firefly", for example, but you may prefer to use a more descriptive name: "Dark_Link" is rather more suggestive than "en_torch2", for example. You work on the branch, commit changes, and periodically push them to GitHub, if only for backup purposes.
|
||||
Once you have decided on an actor, you should make a new git branch to work on: your main branch is meant to stay level with the main repository. Name it something sensible: my `EnFirefly` branch is called "en_firefly", for example, but you may prefer to use a more descriptive name: "Dark_Link" is rather more suggestive than "en_torch2", for example. You work on the branch, commit changes, and periodically push them to GitHub, if only for backup purposes.
|
||||
|
||||
Once you have finished an actor, you submit a pull request for other people to check your work complies with the project's conventions, and once it is deemed satisfactory, it will be merged in to the main repository.
|
||||
|
||||
|
||||
12
include/attributes.h
Normal file
12
include/attributes.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef ATTRIBUTES_H
|
||||
#define ATTRIBUTES_H
|
||||
|
||||
#ifndef __GNUC__
|
||||
#define __attribute__(x)
|
||||
#endif
|
||||
|
||||
#define UNUSED __attribute__((unused))
|
||||
#define FALLTHROUGH __attribute__((fallthrough))
|
||||
#define NORETURN __attribute__((noreturn))
|
||||
|
||||
#endif
|
||||
@@ -44,8 +44,8 @@ void Fault_Init(void);
|
||||
|
||||
// Fatal Errors
|
||||
|
||||
void Fault_AddHungupAndCrashImpl(const char* exp1, const char* exp2);
|
||||
void Fault_AddHungupAndCrash(const char* file, s32 line);
|
||||
NORETURN void Fault_AddHungupAndCrashImpl(const char* exp1, const char* exp2);
|
||||
NORETURN void Fault_AddHungupAndCrash(const char* file, s32 line);
|
||||
|
||||
// Client Registration
|
||||
|
||||
|
||||
@@ -33,13 +33,13 @@ void Locale_ResetRegion(void);
|
||||
u32 func_80001F48(void);
|
||||
u32 func_80001F8C(void);
|
||||
u32 Locale_IsRegionNative(void);
|
||||
void __assert(const char* exp, const char* file, s32 line);
|
||||
NORETURN void __assert(const char* exp, const char* file, s32 line);
|
||||
void isPrintfInit(void);
|
||||
void osSyncPrintfUnused(const char* fmt, ...);
|
||||
void osSyncPrintf(const char* fmt, ...);
|
||||
void rmonPrintf(const char* fmt, ...);
|
||||
void* is_proutSyncPrintf(void* arg, const char* str, u32 count);
|
||||
void func_80002384(const char* exp, const char* file, u32 line);
|
||||
NORETURN void func_80002384(const char* exp, const char* file, u32 line);
|
||||
OSPiHandle* osDriveRomInit(void);
|
||||
void Mio0_Decompress(Yaz0Header* hdr, u8* dst);
|
||||
void StackCheck_Init(StackEntry* entry, void* stackBottom, void* stackTop, u32 initValue, s32 minSpace,
|
||||
@@ -392,8 +392,8 @@ void func_8002DE74(PlayState* play, Player* player);
|
||||
void Actor_MountHorse(PlayState* play, Player* player, Actor* horse);
|
||||
s32 func_8002DEEC(Player* player);
|
||||
void func_8002DF18(PlayState* play, Player* player);
|
||||
s32 func_8002DF38(PlayState* play, Actor* actor, u8 csMode);
|
||||
s32 func_8002DF54(PlayState* play, Actor* actor, u8 csMode);
|
||||
s32 func_8002DF38(PlayState* play, Actor* actor, u8 csAction);
|
||||
s32 func_8002DF54(PlayState* play, Actor* actor, u8 csAction);
|
||||
void func_8002DF90(DynaPolyActor* dynaActor);
|
||||
void func_8002DFA4(DynaPolyActor* dynaActor, f32 arg1, s16 arg2);
|
||||
s32 Player_IsFacingActor(Actor* actor, s16 maxAngle, PlayState* play);
|
||||
@@ -465,7 +465,7 @@ void Enemy_StartFinishingBlow(PlayState* play, Actor* actor);
|
||||
s16 func_80032CB4(s16* arg0, s16 arg1, s16 arg2, s16 arg3);
|
||||
void BodyBreak_Alloc(BodyBreak* bodyBreak, s32 count, PlayState* play);
|
||||
void BodyBreak_SetInfo(BodyBreak* bodyBreak, s32 limbIndex, s32 minLimbIndex, s32 maxLimbIndex, u32 count, Gfx** dList,
|
||||
s16 objectId);
|
||||
s16 objectSlot);
|
||||
s32 BodyBreak_SpawnParts(Actor* actor, BodyBreak* bodyBreak, PlayState* play, s16 type);
|
||||
void Actor_SpawnFloorDustRing(PlayState* play, Actor* actor, Vec3f* posXZ, f32 radius, s32 amountMinusOne,
|
||||
f32 randAccelWeight, s16 scale, s16 scaleStep, u8 useLighting);
|
||||
@@ -871,7 +871,7 @@ s32 Math_StepUntilS(s16* pValue, s16 limit, s16 step);
|
||||
s32 Math_StepToAngleS(s16* pValue, s16 target, s16 step);
|
||||
s32 Math_StepUntilF(f32* pValue, f32 limit, f32 step);
|
||||
s32 Math_AsymStepToF(f32* pValue, f32 target, f32 incrStep, f32 decrStep);
|
||||
void func_80077D10(f32* arg0, s16* arg1, Input* input);
|
||||
void Lib_GetControlStickData(f32* outMagnitude, s16* outAngle, Input* input);
|
||||
s16 Rand_S16Offset(s16 base, s16 range);
|
||||
void Math_Vec3f_Copy(Vec3f* dest, Vec3f* src);
|
||||
void Math_Vec3s_ToVec3f(Vec3f* dest, Vec3s* src);
|
||||
@@ -1058,7 +1058,7 @@ s32 Player_OverrideLimbDrawGameplayCrawling(PlayState* play, s32 limbIndex, Gfx*
|
||||
u8 func_80090480(PlayState* play, ColliderQuad* collider, WeaponInfo* weaponInfo, Vec3f* newTip, Vec3f* newBase);
|
||||
void Player_DrawGetItem(PlayState* play, Player* this);
|
||||
void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx);
|
||||
u32 func_80091738(PlayState* play, u8* segment, SkelAnime* skelAnime);
|
||||
u32 Player_InitPauseDrawData(PlayState* play, u8* segment, SkelAnime* skelAnime);
|
||||
void Player_DrawPause(PlayState* play, u8* segment, SkelAnime* skelAnime, Vec3f* pos, Vec3s* rot, f32 scale,
|
||||
s32 sword, s32 tunic, s32 shield, s32 boots);
|
||||
void PreNMI_Init(GameState* thisx);
|
||||
@@ -1088,7 +1088,7 @@ void Gfx_SetupDL_37Opa(GraphicsContext* gfxCtx);
|
||||
Gfx* Gfx_SetupDL_39(Gfx* gfx);
|
||||
void Gfx_SetupDL_39Opa(GraphicsContext* gfxCtx);
|
||||
void Gfx_SetupDL_39Overlay(GraphicsContext* gfxCtx);
|
||||
void Gfx_SetupDL_39Ptr(Gfx** gfxp);
|
||||
void Gfx_SetupDL_39Ptr(Gfx** gfxP);
|
||||
void Gfx_SetupDL_40Opa(GraphicsContext* gfxCtx);
|
||||
void Gfx_SetupDL_41Opa(GraphicsContext* gfxCtx);
|
||||
void Gfx_SetupDL_47Xlu(GraphicsContext* gfxCtx);
|
||||
@@ -1100,8 +1100,8 @@ void Gfx_SetupDL_42Overlay(GraphicsContext* gfxCtx);
|
||||
void Gfx_SetupDL_27Xlu(GraphicsContext* gfxCtx);
|
||||
void Gfx_SetupDL_60NoCDXlu(GraphicsContext* gfxCtx);
|
||||
void Gfx_SetupDL_61Xlu(GraphicsContext* gfxCtx);
|
||||
void Gfx_SetupDL_56Ptr(Gfx** gfxp);
|
||||
Gfx* Gfx_BranchTexScroll(Gfx** gfxp, u32 x, u32 y, s32 width, s32 height);
|
||||
void Gfx_SetupDL_56Ptr(Gfx** gfxP);
|
||||
Gfx* Gfx_BranchTexScroll(Gfx** gfxP, u32 x, u32 y, s32 width, s32 height);
|
||||
Gfx* func_80094E78(GraphicsContext* gfxCtx, u32 x, u32 y);
|
||||
Gfx* Gfx_TexScroll(GraphicsContext* gfxCtx, u32 x, u32 y, s32 width, s32 height);
|
||||
Gfx* Gfx_TwoTexScroll(GraphicsContext* gfxCtx, s32 tile1, u32 x1, u32 y1, s32 width1, s32 height1, s32 tile2, u32 x2,
|
||||
@@ -1125,11 +1125,10 @@ void Sample_Init(GameState* thisx);
|
||||
void Inventory_ChangeEquipment(s16 equipment, u16 value);
|
||||
u8 Inventory_DeleteEquipment(PlayState* play, s16 equipment);
|
||||
void Inventory_ChangeUpgrade(s16 upgrade, s16 value);
|
||||
s32 Object_Spawn(ObjectContext* objectCtx, s16 objectId);
|
||||
void Object_InitBank(PlayState* play, ObjectContext* objectCtx);
|
||||
void Object_UpdateBank(ObjectContext* objectCtx);
|
||||
s32 Object_GetIndex(ObjectContext* objectCtx, s16 objectId);
|
||||
s32 Object_IsLoaded(ObjectContext* objectCtx, s32 bankIndex);
|
||||
void Object_InitContext(PlayState* play, ObjectContext* objectCtx);
|
||||
void Object_UpdateEntries(ObjectContext* objectCtx);
|
||||
s32 Object_GetSlot(ObjectContext* objectCtx, s16 objectId);
|
||||
s32 Object_IsLoaded(ObjectContext* objectCtx, s32 slot);
|
||||
void func_800981B8(ObjectContext* objectCtx);
|
||||
s32 Scene_ExecuteCommands(PlayState* play, SceneCmd* sceneCmd);
|
||||
void TransitionActor_InitContext(GameState* state, TransitionActorContext* transiActorCtx);
|
||||
@@ -1206,7 +1205,7 @@ void View_Apply(View* view, s32 mask);
|
||||
s32 View_ApplyOrthoToOverlay(View* view);
|
||||
s32 View_ApplyPerspectiveToOverlay(View* view);
|
||||
s32 View_UpdateViewingMatrix(View* view);
|
||||
s32 View_ApplyTo(View* view, s32 mask, Gfx** gfxp);
|
||||
s32 View_ApplyTo(View* view, s32 mask, Gfx** gfxP);
|
||||
s32 View_ErrorCheckEyePosition(f32 eyeX, f32 eyeY, f32 eyeZ);
|
||||
void ViMode_LogPrint(OSViMode* osViMode);
|
||||
void ViMode_Configure(ViMode* viMode, s32 type, s32 tvType, s32 loRes, s32 antialiasOff, s32 modeN, s32 fb16Bit,
|
||||
@@ -1217,15 +1216,6 @@ void ViMode_Init(ViMode* viMode);
|
||||
void ViMode_Destroy(ViMode* viMode);
|
||||
void ViMode_ConfigureFeatures(ViMode* viMode, s32 viFeatures);
|
||||
void ViMode_Update(ViMode* viMode, Input* input);
|
||||
void func_800ACE70(struct_801664F0* this);
|
||||
void func_800ACE90(struct_801664F0* this);
|
||||
void func_800ACE98(struct_801664F0* this, Gfx** gfxp);
|
||||
void VisMono_Init(VisMono* this);
|
||||
void VisMono_Destroy(VisMono* this);
|
||||
void VisMono_Draw(VisMono* this, Gfx** gfxp);
|
||||
void func_800AD920(struct_80166500* this);
|
||||
void func_800AD950(struct_80166500* this);
|
||||
void func_800AD958(struct_80166500* this, Gfx** gfxp);
|
||||
void PlayerCall_InitFuncPtrs(void);
|
||||
void TransitionTile_Destroy(TransitionTile* this);
|
||||
TransitionTile* TransitionTile_Init(TransitionTile* this, s32 cols, s32 rows);
|
||||
@@ -1332,16 +1322,16 @@ void PreRender_SetValuesSave(PreRender* this, u32 width, u32 height, void* fbuf,
|
||||
void PreRender_Init(PreRender* this);
|
||||
void PreRender_SetValues(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf);
|
||||
void PreRender_Destroy(PreRender* this);
|
||||
void func_800C170C(PreRender* this, Gfx** gfxp, void* buf, void* bufSave, u32 r, u32 g, u32 b, u32 a);
|
||||
void func_800C1AE8(PreRender* this, Gfx** gfxp, void* fbuf, void* fbufSave);
|
||||
void PreRender_SaveZBuffer(PreRender* this, Gfx** gfxp);
|
||||
void PreRender_SaveFramebuffer(PreRender* this, Gfx** gfxp);
|
||||
void PreRender_DrawCoverage(PreRender* this, Gfx** gfxp);
|
||||
void PreRender_RestoreZBuffer(PreRender* this, Gfx** gfxp);
|
||||
void func_800C213C(PreRender* this, Gfx** gfxp);
|
||||
void PreRender_RestoreFramebuffer(PreRender* this, Gfx** gfxp);
|
||||
void PreRender_CopyImageRegion(PreRender* this, Gfx** gfxp);
|
||||
#ifdef ENABLE_PAUSE_BG_AA
|
||||
void func_800C170C(PreRender* this, Gfx** gfxP, void* buf, void* bufSave, u32 r, u32 g, u32 b, u32 a);
|
||||
void func_800C1AE8(PreRender* this, Gfx** gfxP, void* fbuf, void* fbufSave);
|
||||
void PreRender_SaveZBuffer(PreRender* this, Gfx** gfxP);
|
||||
void PreRender_SaveFramebuffer(PreRender* this, Gfx** gfxP);
|
||||
void PreRender_DrawCoverage(PreRender* this, Gfx** gfxP);
|
||||
void PreRender_RestoreZBuffer(PreRender* this, Gfx** gfxP);
|
||||
void func_800C213C(PreRender* this, Gfx** gfxP);
|
||||
void PreRender_RestoreFramebuffer(PreRender* this, Gfx** gfxP);
|
||||
void PreRender_CopyImageRegion(PreRender* this, Gfx** gfxP);
|
||||
void PreRender_ApplyFilters(PreRender* this);
|
||||
#endif
|
||||
void AudioMgr_StopAllSfx(void);
|
||||
@@ -1352,9 +1342,9 @@ void AudioMgr_ThreadEntry(void* arg0);
|
||||
void AudioMgr_Unlock(AudioMgr* audioMgr);
|
||||
void AudioMgr_Init(AudioMgr* audioMgr, void* stack, OSPri pri, OSId id, Scheduler* sched, IrqMgr* irqMgr);
|
||||
void GameState_FaultPrint(void);
|
||||
void GameState_SetFBFilter(Gfx** gfx);
|
||||
void GameState_SetFBFilter(Gfx** gfxP);
|
||||
#ifdef SHOW_INPUT_DISPLAY
|
||||
void GameState_DrawInputDisplay(u16 input, Gfx** gfx);
|
||||
void GameState_DrawInputDisplay(u16 input, Gfx** gfxP);
|
||||
#endif
|
||||
void GameState_Draw(GameState* gameState, GraphicsContext* gfxCtx);
|
||||
void GameState_SetFrameBuffer(GraphicsContext* gfxCtx);
|
||||
@@ -1393,7 +1383,7 @@ void Graph_CloseDisps(Gfx** dispRefs, GraphicsContext* gfxCtx, const char* file,
|
||||
|
||||
Gfx* Graph_GfxPlusOne(Gfx* gfx);
|
||||
Gfx* Graph_BranchDlist(Gfx* gfx, Gfx* dst);
|
||||
void* Graph_DlistAlloc(Gfx** gfx, u32 size);
|
||||
void* Graph_DlistAlloc(Gfx** gfxP, u32 size);
|
||||
ListAlloc* ListAlloc_Init(ListAlloc* this);
|
||||
void* ListAlloc_Alloc(ListAlloc* this, u32 size);
|
||||
void ListAlloc_Free(ListAlloc* this, void* data);
|
||||
@@ -1511,7 +1501,7 @@ u64* SysUcode_GetUCodeBoot(void);
|
||||
size_t SysUcode_GetUCodeBootSize(void);
|
||||
u64* SysUcode_GetUCode(void);
|
||||
u64* SysUcode_GetUCodeData(void);
|
||||
void func_800D31A0(void);
|
||||
NORETURN void func_800D31A0(void);
|
||||
void func_800D31F0(void);
|
||||
void func_800D3210(void);
|
||||
|
||||
|
||||
@@ -3,19 +3,12 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifndef __GNUC__
|
||||
#define __attribute__(x)
|
||||
#endif
|
||||
|
||||
#ifndef AVOID_UB
|
||||
#define BAD_RETURN(type) type
|
||||
#else
|
||||
#define BAD_RETURN(type) void
|
||||
#endif
|
||||
|
||||
#define UNUSED __attribute__((unused))
|
||||
#define FALLTHROUGH __attribute__((fallthrough))
|
||||
|
||||
#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
|
||||
#define ARRAY_COUNTU(arr) (u32)(sizeof(arr) / sizeof(arr[0]))
|
||||
|
||||
|
||||
@@ -12,28 +12,13 @@ struct GameState;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ char unk_00[0x18];
|
||||
/* 0x18 */ s32 unk_18;
|
||||
/* 0x18 */ s32 x; // Unused
|
||||
/* 0x1C */ s32 y;
|
||||
} SpeedMeter; // size = 0x20
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 maxval;
|
||||
/* 0x04 */ s32 val;
|
||||
/* 0x08 */ u16 backColor;
|
||||
/* 0x0A */ u16 foreColor;
|
||||
/* 0x0C */ s32 ulx;
|
||||
/* 0x10 */ s32 lrx;
|
||||
/* 0x14 */ s32 uly;
|
||||
/* 0x18 */ s32 lry;
|
||||
} SpeedMeterAllocEntry; // size = 0x1C
|
||||
|
||||
void SpeedMeter_InitImpl(SpeedMeter* this, u32 arg1, u32 y);
|
||||
void SpeedMeter_Init(SpeedMeter* this);
|
||||
void SpeedMeter_Destroy(SpeedMeter* this);
|
||||
void SpeedMeter_DrawTimeEntries(SpeedMeter* this, struct GraphicsContext* gfxCtx);
|
||||
void SpeedMeter_InitAllocEntry(SpeedMeterAllocEntry* this, u32 maxval, u32 val, u16 backColor, u16 foreColor, u32 ulx,
|
||||
u32 lrx, u32 uly, u32 lry);
|
||||
void SpeedMeter_DrawAllocEntry(SpeedMeterAllocEntry* this, struct GraphicsContext* gfxCtx);
|
||||
void SpeedMeter_DrawAllocEntries(SpeedMeter* meter, struct GraphicsContext* gfxCtx, struct GameState* state);
|
||||
|
||||
#endif // ENABLE_SPEEDMETER
|
||||
|
||||
@@ -62,7 +62,7 @@ extern s32 gMaxActorId; // original name: "MaxProfile"
|
||||
extern s32 gDebugCamEnabled;
|
||||
#endif
|
||||
|
||||
extern GameStateOverlay gGameStateOverlayTable[6];
|
||||
extern GameStateOverlay gGameStateOverlayTable[GAMESTATE_ID_MAX];
|
||||
extern u8 gWeatherMode;
|
||||
extern u8 gLightConfigAfterUnderwater;
|
||||
extern u8 gInterruptSongOfStorms;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "ultra64.h"
|
||||
#include "ultra64/gs2dex.h"
|
||||
#include "attributes.h"
|
||||
#include "z64save.h"
|
||||
#include "z64light.h"
|
||||
#include "z64bgcheck.h"
|
||||
@@ -34,6 +35,7 @@
|
||||
#include "z64skybox.h"
|
||||
#include "z64sram.h"
|
||||
#include "z64view.h"
|
||||
#include "z64vis.h"
|
||||
#include "alignment.h"
|
||||
#include "seqcmd.h"
|
||||
#include "sequence.h"
|
||||
@@ -414,7 +416,7 @@ typedef struct PlayState {
|
||||
/* 0x11D44 */ s32 (*isPlayerDroppingFish)(struct PlayState* play);
|
||||
/* 0x11D48 */ s32 (*startPlayerFishing)(struct PlayState* play);
|
||||
/* 0x11D4C */ s32 (*grabPlayer)(struct PlayState* play, Player* player);
|
||||
/* 0x11D50 */ s32 (*startPlayerCutscene)(struct PlayState* play, Actor* actor, s32 csMode);
|
||||
/* 0x11D50 */ s32 (*startPlayerCutscene)(struct PlayState* play, Actor* actor, s32 csAction);
|
||||
/* 0x11D54 */ void (*func_11D54)(Player* player, struct PlayState* play);
|
||||
/* 0x11D58 */ s32 (*damagePlayer)(struct PlayState* play, s32 damage);
|
||||
/* 0x11D5C */ void (*talkWithPlayer)(struct PlayState* play, Actor* actor);
|
||||
@@ -808,29 +810,4 @@ typedef struct {
|
||||
/* 0x84 */ u32 unk_84;
|
||||
} ViMode; // size = 0x88
|
||||
|
||||
// Vis...
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 type;
|
||||
/* 0x04 */ u32 setScissor;
|
||||
/* 0x08 */ Color_RGBA8_u32 color;
|
||||
/* 0x0C */ Color_RGBA8_u32 envColor;
|
||||
} struct_801664F0; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 unk_00;
|
||||
/* 0x04 */ u32 setScissor;
|
||||
/* 0x08 */ Color_RGBA8_u32 primColor;
|
||||
/* 0x0C */ Color_RGBA8_u32 envColor;
|
||||
/* 0x10 */ u16* tlut;
|
||||
/* 0x14 */ Gfx* dList;
|
||||
} VisMono; // size = 0x18
|
||||
|
||||
// Vis...
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 useRgba;
|
||||
/* 0x04 */ u32 setScissor;
|
||||
/* 0x08 */ Color_RGBA8_u32 primColor;
|
||||
/* 0x08 */ Color_RGBA8_u32 envColor;
|
||||
} struct_80166500; // size = 0x10
|
||||
|
||||
#endif
|
||||
|
||||
@@ -199,7 +199,7 @@ typedef struct Actor {
|
||||
/* 0x004 */ u32 flags; // Flags used for various purposes
|
||||
/* 0x008 */ PosRot home; // Initial position/rotation when spawned. Can be used for other purposes
|
||||
/* 0x01C */ s16 params; // Configurable variable set by the actor's spawn data; original name: "args_data"
|
||||
/* 0x01E */ s8 objBankIndex; // Object bank index of the actor's object dependency; original name: "bank"
|
||||
/* 0x01E */ s8 objectSlot; // Object slot (in ObjectContext) corresponding to the actor's object; original name: "bank"
|
||||
/* 0x01F */ s8 targetMode; // Controls how far the actor can be targeted from and how far it can stay locked on
|
||||
/* 0x020 */ u16 sfx; // SFX ID to play. Sfx plays when value is set, then is cleared the following update cycle
|
||||
/* 0x024 */ PosRot world; // Position/rotation in the world
|
||||
@@ -287,14 +287,14 @@ typedef struct DynaPolyActor {
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ MtxF* matrices;
|
||||
/* 0x04 */ s16* objectIds;
|
||||
/* 0x04 */ s16* objectSlots;
|
||||
/* 0x08 */ s16 count;
|
||||
/* 0x0C */ Gfx** dLists;
|
||||
/* 0x10 */ s32 val; // used for various purposes: both a status indicator and counter
|
||||
/* 0x14 */ s32 prevLimbIndex;
|
||||
} BodyBreak;
|
||||
|
||||
#define BODYBREAK_OBJECT_DEFAULT -1 // use the same object as the actor
|
||||
#define BODYBREAK_OBJECT_SLOT_DEFAULT -1 // use the same object as the actor
|
||||
#define BODYBREAK_STATUS_READY -1
|
||||
#define BODYBREAK_STATUS_FINISHED 0
|
||||
|
||||
|
||||
@@ -1256,7 +1256,7 @@ typedef enum {
|
||||
#define ONEPOINT_CS_INIT_FIELD_NONE 0xFF
|
||||
#define ONEPOINT_CS_INIT_FIELD_ACTORCAT(actorCat) (0x80 | ((actorCat) & 0x0F))
|
||||
#define ONEPOINT_CS_INIT_FIELD_HUD_VISIBILITY(camHudVisibility) (0xC0 | ((camHudVisibility) & 0x0F))
|
||||
#define ONEPOINT_CS_INIT_FIELD_PLAYER_CS(csMode) ((csMode) & 0x7F)
|
||||
#define ONEPOINT_CS_INIT_FIELD_PLAYER_CS(csAction) ((csAction) & 0x7F)
|
||||
|
||||
#define ONEPOINT_CS_INIT_FIELD_IS_TYPE_ACTORCAT(field) ((field & 0xF0) == 0x80)
|
||||
#define ONEPOINT_CS_INIT_FIELD_IS_TYPE_HUD_VISIBILITY(field) ((field & 0xF0) == 0xC0)
|
||||
|
||||
@@ -246,7 +246,7 @@ typedef struct {
|
||||
#define rgEnvColorG regs[8]
|
||||
#define rgEnvColorB regs[9]
|
||||
#define rgEnvColorA regs[10]
|
||||
#define rgObjBankIdx regs[11]
|
||||
#define rgObjectSlot regs[11]
|
||||
|
||||
#define DEFINE_EFFECT_SS(_0, enum) enum,
|
||||
#define DEFINE_EFFECT_SS_UNSET(enum) enum,
|
||||
|
||||
@@ -4,24 +4,22 @@
|
||||
#include "ultra64.h"
|
||||
#include "z64dma.h"
|
||||
|
||||
#define OBJECT_EXCHANGE_BANK_MAX 19
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 id;
|
||||
/* 0x04 */ void* segment;
|
||||
/* 0x08 */ DmaRequest dmaRequest;
|
||||
/* 0x00 */ s16 id;
|
||||
/* 0x04 */ void* segment;
|
||||
/* 0x08 */ DmaRequest dmaRequest;
|
||||
/* 0x28 */ OSMesgQueue loadQueue;
|
||||
/* 0x40 */ OSMesg loadMsg;
|
||||
} ObjectStatus; // size = 0x44
|
||||
/* 0x40 */ OSMesg loadMsg;
|
||||
} ObjectEntry; // size = 0x44
|
||||
|
||||
typedef struct {
|
||||
/* 0x0000 */ void* spaceStart;
|
||||
/* 0x0004 */ void* spaceEnd; // original name: "endSegment"
|
||||
/* 0x0008 */ u8 num; // number of objects in bank
|
||||
/* 0x0009 */ u8 unk_09;
|
||||
/* 0x000A */ u8 mainKeepIndex; // "gameplay_keep" index in bank
|
||||
/* 0x000B */ u8 subKeepIndex; // "gameplay_field_keep" or "gameplay_dangeon_keep" index in bank
|
||||
/* 0x000C */ ObjectStatus status[OBJECT_EXCHANGE_BANK_MAX];
|
||||
/* 0x0000 */ void* spaceStart;
|
||||
/* 0x0004 */ void* spaceEnd; // original name: "endSegment"
|
||||
/* 0x0008 */ u8 numEntries; // total amount of used entries
|
||||
/* 0x0009 */ u8 numPersistentEntries; // amount of entries that won't be reused when loading a new object list (when loading a new room)
|
||||
/* 0x000A */ u8 mainKeepSlot; // "gameplay_keep" slot
|
||||
/* 0x000B */ u8 subKeepSlot; // "gameplay_field_keep" or "gameplay_dangeon_keep" slot
|
||||
/* 0x000C */ ObjectEntry slots[19];
|
||||
} ObjectContext; // size = 0x518
|
||||
|
||||
#define DEFINE_OBJECT(_0, enum) enum,
|
||||
@@ -31,7 +29,7 @@ typedef struct {
|
||||
typedef enum {
|
||||
#include "tables/object_table.h"
|
||||
/* 0x0192 */ OBJECT_ID_MAX
|
||||
} ObjectID;
|
||||
} ObjectId;
|
||||
|
||||
#undef DEFINE_OBJECT
|
||||
#undef DEFINE_OBJECT_NULL
|
||||
|
||||
@@ -28,6 +28,54 @@ typedef enum {
|
||||
#define PAUSE_EQUIP_BUFFER_SIZE sizeof(u16[PAUSE_EQUIP_PLAYER_HEIGHT][PAUSE_EQUIP_PLAYER_WIDTH])
|
||||
#define PAUSE_PLAYER_SEGMENT_GAMEPLAY_KEEP_BUFFER_SIZE 0x5000
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ PAUSE_STATE_OFF,
|
||||
/* 1 */ PAUSE_STATE_WAIT_LETTERBOX, // Request no letterboxing and wait for it.
|
||||
/* 2 */ PAUSE_STATE_WAIT_BG_PRERENDER, // Wait for the pause background prerender to be done.
|
||||
/* 3 */ PAUSE_STATE_INIT, // Load data and initialize/setup various things.
|
||||
/* 4 */ PAUSE_STATE_OPENING_1, // Animate the pause menu coming together with rotations and other animations.
|
||||
/* 5 */ PAUSE_STATE_OPENING_2, // Finish some animations for opening the menu.
|
||||
/* 6 */ PAUSE_STATE_MAIN, // Pause menu ready for player inputs.
|
||||
/* 7 */ PAUSE_STATE_SAVE_PROMPT, // Save prompt in the pause menu
|
||||
/* 8 */ PAUSE_STATE_8,
|
||||
/* 9 */ PAUSE_STATE_9,
|
||||
/* 10 */ PAUSE_STATE_10,
|
||||
/* 11 */ PAUSE_STATE_11,
|
||||
/* 12 */ PAUSE_STATE_12,
|
||||
/* 13 */ PAUSE_STATE_13,
|
||||
/* 14 */ PAUSE_STATE_14,
|
||||
/* 15 */ PAUSE_STATE_15,
|
||||
/* 16 */ PAUSE_STATE_16,
|
||||
/* 17 */ PAUSE_STATE_17,
|
||||
/* 18 */ PAUSE_STATE_CLOSING, // Animate the pause menu closing
|
||||
/* 19 */ PAUSE_STATE_RESUME_GAMEPLAY // Handles returning to normal gameplay once the pause menu is visually closed
|
||||
} PauseState;
|
||||
|
||||
#define IS_PAUSE_STATE_GAMEOVER(pauseCtx) \
|
||||
(((pauseCtx)->state >= PAUSE_STATE_8) && ((pauseCtx)->state <= PAUSE_STATE_17))
|
||||
|
||||
#if (defined ENABLE_INV_EDITOR || defined ENABLE_EVENT_EDITOR)
|
||||
#define IS_PAUSED(pauseCtx) \
|
||||
(((pauseCtx)->state != PAUSE_STATE_OFF) || ((pauseCtx)->debugState != 0))
|
||||
#else
|
||||
#define IS_PAUSED(pauseCtx) \
|
||||
((pauseCtx)->state != PAUSE_STATE_OFF)
|
||||
#endif
|
||||
|
||||
// Sub-states of PAUSE_STATE_MAIN
|
||||
typedef enum {
|
||||
/* 0 */ PAUSE_MAIN_STATE_IDLE,
|
||||
/* 1 */ PAUSE_MAIN_STATE_1,
|
||||
/* 2 */ PAUSE_MAIN_STATE_2,
|
||||
/* 3 */ PAUSE_MAIN_STATE_3,
|
||||
/* 4 */ PAUSE_MAIN_STATE_4,
|
||||
/* 5 */ PAUSE_MAIN_STATE_5,
|
||||
/* 6 */ PAUSE_MAIN_STATE_6,
|
||||
/* 7 */ PAUSE_MAIN_STATE_7,
|
||||
/* 8 */ PAUSE_MAIN_STATE_8,
|
||||
/* 9 */ PAUSE_MAIN_STATE_9
|
||||
} PauseMainState;
|
||||
|
||||
typedef struct {
|
||||
/* 0x0000 */ View view;
|
||||
/* 0x0128 */ u8* iconItemSegment;
|
||||
@@ -58,7 +106,7 @@ typedef struct {
|
||||
/* 0x01D6 */ u16 debugState;
|
||||
#endif
|
||||
/* 0x01D8 */ Vec3f eye;
|
||||
/* 0x01E4 */ u16 unk_1E4;
|
||||
/* 0x01E4 */ u16 mainState;
|
||||
/* 0x01E6 */ u16 mode;
|
||||
/* 0x01E8 */ u16 pageIndex; // "kscp_pos"
|
||||
/* 0x01EA */ u16 unk_1EA;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -329,6 +329,18 @@ typedef enum {
|
||||
/* 0x06 */ HS_DAMPE_RACE
|
||||
} HighScores;
|
||||
|
||||
// the score value for the fishing minigame also stores many flags.
|
||||
#define HS_FISH_LENGTH_CHILD 0x7F // mask for record length of catch as child.
|
||||
#define HS_FISH_LENGTH_ADULT 0x7F000000 // mask for record length of catch as adult.
|
||||
#define HS_FISH_PLAYED_CHILD 0x100 // set when first talking to owner as child
|
||||
#define HS_FISH_PLAYED_ADULT 0x200 // set when first talking to owner as adult
|
||||
#define HS_FISH_PRIZE_CHILD 0x400 // won the Piece of Heart
|
||||
#define HS_FISH_PRIZE_ADULT 0x800 // won the Golden Scale
|
||||
#define HS_FISH_STOLE_HAT 0x1000 // Pond owner is visibly bald as Adult Link.
|
||||
#define HS_FISH_CHEAT_CHILD 0x80 // used Sinking Lure as child to catch record fish
|
||||
#define HS_FISH_CHEAT_ADULT 0x80000000 // used Sinking Lure as adult to catch record fish
|
||||
#define HS_FISH_PLAYED 0x10000 // incremented for every play. controls weather.
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ SUNSSONG_INACTIVE,
|
||||
/* 1 */ SUNSSONG_START, // the suns ocarina effect signals that the song has finished playing
|
||||
@@ -573,7 +585,7 @@ typedef enum {
|
||||
#define ITEMGETINF_08 0x08
|
||||
#define ITEMGETINF_09 0x09
|
||||
#define ITEMGETINF_0A 0x0A
|
||||
#define ITEMGETINF_0B 0x0B
|
||||
#define ITEMGETINF_DEKU_HEART_PIECE 0x0B
|
||||
#define ITEMGETINF_0C 0x0C
|
||||
#define ITEMGETINF_0D 0x0D
|
||||
#define ITEMGETINF_0E 0x0E
|
||||
@@ -743,8 +755,8 @@ typedef enum {
|
||||
#define INFTABLE_17F 0x17F
|
||||
#define INFTABLE_190 0x190
|
||||
#define INFTABLE_191 0x191
|
||||
#define INFTABLE_192 0x192
|
||||
#define INFTABLE_193 0x193
|
||||
#define INFTABLE_HAS_DEKU_STICK_UPGRADE 0x192
|
||||
#define INFTABLE_HAS_DEKU_NUT_UPGRADE 0x193
|
||||
#define INFTABLE_195 0x195
|
||||
#define INFTABLE_196 0x196
|
||||
#define INFTABLE_197 0x197
|
||||
|
||||
87
include/z64vis.h
Normal file
87
include/z64vis.h
Normal file
@@ -0,0 +1,87 @@
|
||||
#ifndef Z64_VIS_H
|
||||
#define Z64_VIS_H
|
||||
|
||||
#include "ultra64.h"
|
||||
#include "color.h"
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ FB_FILTER_NONE,
|
||||
/* 1 */ FB_FILTER_CVG_RGB,
|
||||
/* 2 */ FB_FILTER_CVG_RGB_UNIFORM,
|
||||
/* 3 */ FB_FILTER_CVG_ONLY,
|
||||
/* 4 */ FB_FILTER_CVG_RGB_FOG, // Not recommended, easily overflows blender
|
||||
/* 5 */ FB_FILTER_ZBUF_IA,
|
||||
/* 6 */ FB_FILTER_ZBUF_RGBA,
|
||||
/* 7 */ FB_FILTER_MONO
|
||||
} FramebufferFilterType;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ VIS_NO_SETSCISSOR,
|
||||
/* 1 */ VIS_SETSCISSOR
|
||||
} VisScissorType;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 type;
|
||||
/* 0x04 */ u32 scissorType;
|
||||
/* 0x08 */ Color_RGBA8_u32 primColor;
|
||||
/* 0x0C */ Color_RGBA8_u32 envColor;
|
||||
} Vis; // size = 0x10
|
||||
|
||||
|
||||
|
||||
/* Cvg: Coverage */
|
||||
|
||||
#define FB_FILTER_TO_CVG_TYPE(filter) (filter)
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ VIS_CVG_TYPE_NONE = FB_FILTER_TO_CVG_TYPE(FB_FILTER_NONE),
|
||||
/* 1 */ VIS_CVG_TYPE_CVG_RGB = FB_FILTER_TO_CVG_TYPE(FB_FILTER_CVG_RGB),
|
||||
/* 2 */ VIS_CVG_TYPE_CVG_RGB_UNIFORM = FB_FILTER_TO_CVG_TYPE(FB_FILTER_CVG_RGB_UNIFORM),
|
||||
/* 3 */ VIS_CVG_TYPE_CVG_ONLY = FB_FILTER_TO_CVG_TYPE(FB_FILTER_CVG_ONLY),
|
||||
/* 4 */ VIS_CVG_TYPE_CVG_RGB_FOG = FB_FILTER_TO_CVG_TYPE(FB_FILTER_CVG_RGB_FOG)
|
||||
} VisCvgType;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vis vis;
|
||||
} VisCvg; // size = 0x10
|
||||
|
||||
void VisCvg_Init(VisCvg* this);
|
||||
void VisCvg_Destroy(VisCvg* this);
|
||||
void VisCvg_Draw(VisCvg* this, Gfx** gfxP);
|
||||
|
||||
|
||||
|
||||
/* Mono: Desaturation */
|
||||
|
||||
// Only one type
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vis vis;
|
||||
/* 0x10 */ u16* tlut;
|
||||
/* 0x14 */ Gfx* dList;
|
||||
} VisMono; // size = 0x18
|
||||
|
||||
void VisMono_Init(VisMono* this);
|
||||
void VisMono_Destroy(VisMono* this);
|
||||
void VisMono_Draw(VisMono* this, Gfx** gfxP);
|
||||
|
||||
|
||||
|
||||
/* ZBuf: Z-Buffer */
|
||||
|
||||
#define FB_FILTER_TO_ZBUF_TYPE(filter) ((filter) - FB_FILTER_ZBUF_IA)
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ VIS_ZBUF_TYPE_IA = FB_FILTER_TO_ZBUF_TYPE(FB_FILTER_ZBUF_IA),
|
||||
/* 1 */ VIS_ZBUF_TYPE_RGBA = FB_FILTER_TO_ZBUF_TYPE(FB_FILTER_ZBUF_RGBA)
|
||||
} VisZBufType;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vis vis;
|
||||
} VisZBuf; // size = 0x10
|
||||
|
||||
void VisZBuf_Init(VisZBuf* this);
|
||||
void VisZBuf_Destroy(VisZBuf* this);
|
||||
void VisZBuf_Draw(VisZBuf* this, Gfx** gfxP);
|
||||
|
||||
#endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user