forked from Roman971/OoT-Randomizer
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'new_flags' into dev-fenhl
# Conflicts: # ASM/build/asm_symbols.txt # ASM/build/bundle.o # ASM/build/c_symbols.txt # ASM/c/item_draw_functions.c # ASM/c/item_draw_functions.h # ASM/c/item_draw_table.c # ASM/c/item_table.c # ASM/c/save.h # ASM/src/build.asm # ASM/src/hacks.asm # CI.py # Patches.py # Plandomizer.py # data/generated/rom_patch.txt # data/generated/symbols.json # data/presets_default.json
- Loading branch information
Showing
39 changed files
with
40,365 additions
and
40,058 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#include "z64.h" | ||
#include "util.h" | ||
#include "demo_effect.h" | ||
#include "models.h" | ||
|
||
extern void DemoEffect_DrawJewel(z64_actor_t* this, z64_game_t* globalCtx, void* func); | ||
extern void* DemoEffect_DrawJewel_AfterHook; | ||
|
||
extern override_key_t CFG_BIGOCTO_OVERRIDE_KEY; | ||
|
||
// Overrides the item model for the dungeon reward shown before the Big Octo fight | ||
void DemoEffect_DrawJewel_Hook(DemoEffect* this, z64_game_t* globalCtx) { | ||
if (!this->override_initialized) { | ||
if (globalCtx->scene_index == 0x02) { | ||
if (CFG_BIGOCTO_OVERRIDE_KEY.all) { | ||
this->override = lookup_override_by_key(CFG_BIGOCTO_OVERRIDE_KEY); | ||
} | ||
if (this->override.key.all) { | ||
this->actor.rot_2.x = 0; | ||
this->actor.scale = (z64_xyzf_t) { 0.02f, 0.02f, 0.02f }; | ||
} | ||
} | ||
|
||
this->override_initialized = true; | ||
} | ||
if (this->override.key.all) { | ||
model_t model; | ||
lookup_model_by_override(&model, this->override); | ||
draw_model(model, &this->actor, globalCtx, 5.0); | ||
} else { | ||
DemoEffect_DrawJewel(this, globalCtx, resolve_overlay_addr(&DemoEffect_DrawJewel_AfterHook, 0x008B)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
#ifndef _DEMO_EFFECT_H_ | ||
#define _DEMO_EFFECT_H_ | ||
#include "z64.h" | ||
#include "get_items.h" | ||
|
||
typedef struct { | ||
/* 0x00 */ uint8_t timer; | ||
} DemoEffectFireBall; | ||
|
||
typedef struct { | ||
/* 0x00 */ uint8_t alpha; | ||
/* 0x01 */ uint8_t scale; | ||
/* 0x02 */ uint8_t pad; | ||
/* 0x04 */ int16_t rotation; | ||
} DemoEffectBlueOrb; | ||
|
||
typedef struct { | ||
/* 0x00 */ uint8_t alpha; | ||
/* 0x01 */ uint8_t scaleFlag; | ||
/* 0x02 */ uint8_t flicker; | ||
/* 0x04 */ int16_t rotation; | ||
} DemoEffectLight; | ||
|
||
typedef struct { | ||
/* 0x00 */ uint8_t alpha; | ||
} DemoEffectLgtShower; | ||
|
||
typedef struct { | ||
/* 0x00 */ uint8_t type; | ||
/* 0x01 */ uint8_t lightRingSpawnDelay; | ||
/* 0x02 */ uint8_t rotation; | ||
/* 0x04 */ int16_t lightRingSpawnTimer; | ||
} DemoEffectGodLgt; | ||
|
||
typedef struct { | ||
/* 0x00 */ uint8_t timerIncrement; | ||
/* 0x01 */ uint8_t alpha; | ||
/* 0x02 */ uint8_t pad; | ||
/* 0x04 */ int16_t timer; | ||
} DemoEffectLightRing; | ||
|
||
typedef struct { | ||
/* 0x00 */ uint8_t triforceSpotOpacity; | ||
/* 0x01 */ uint8_t lightColumnOpacity; | ||
/* 0x02 */ uint8_t crystalLightOpacity; | ||
/* 0x04 */ int16_t rotation; | ||
} DemoEffectTriforceSpot; | ||
|
||
typedef struct { | ||
/* 0x00 */ uint8_t isPositionInit; | ||
/* 0x01 */ uint8_t isLoaded; | ||
/* 0x02 */ uint8_t drawId; | ||
/* 0x04 */ int16_t rotation; | ||
} DemoEffectGetItem; | ||
|
||
typedef struct { | ||
/* 0x00 */ uint8_t pad; | ||
/* 0x01 */ uint8_t pad2; | ||
/* 0x02 */ uint8_t pad3; | ||
/* 0x04 */ int16_t shrinkTimer; | ||
} DemoEffectTimeWarp; | ||
|
||
typedef struct { | ||
/* 0x00 */ uint8_t type; | ||
/* 0x01 */ uint8_t isPositionInit; | ||
/* 0x02 */ uint8_t alpha; | ||
/* 0x04 */ int16_t timer; | ||
} DemoEffectJewel; | ||
|
||
typedef struct { | ||
/* 0x00 */ uint8_t timer; | ||
} DemoEffectDust; | ||
|
||
typedef void (*DemoEffectFunc)(struct DemoEffect*, z64_game_t*); | ||
|
||
typedef struct DemoEffect { | ||
/* 0x0000 */ z64_actor_t actor; | ||
/* 0x013C */ uint8_t skelCurve[0x20]; // size = 0x20 | ||
/* 0x015C */ uint8_t requiredObjectSlot; | ||
/* 0x0160 */ Gfx* jewelDisplayList; | ||
/* 0x0164 */ Gfx* jewelHolderDisplayList; | ||
/* 0x0168 */ uint8_t primXluColor[3]; | ||
/* 0x016B */ uint8_t envXluColor[3]; | ||
/* 0x016E */ uint8_t primOpaColor[3]; | ||
/* 0x0171 */ uint8_t envOpaColor[3]; | ||
/* 0x0174 */ union { | ||
DemoEffectFireBall fireBall; | ||
DemoEffectBlueOrb blueOrb; | ||
DemoEffectLight light; | ||
DemoEffectLgtShower lgtShower; | ||
DemoEffectGodLgt godLgt; | ||
DemoEffectLightRing lightRing; | ||
DemoEffectTriforceSpot triforceSpot; | ||
DemoEffectGetItem getItem; | ||
DemoEffectTimeWarp timeWarp; | ||
DemoEffectJewel jewel; | ||
DemoEffectDust dust; | ||
}; | ||
/* 0x017A */ int16_t effectFlags; | ||
/* 0x017C */ int16_t cueChannel; | ||
/* 0x017E */ z64_xyz_t jewelCsRotation; | ||
/* 0x0184 */ DemoEffectFunc initUpdateFunc; | ||
/* 0x0188 */ ActorFunc initDrawFunc; | ||
/* 0x018C */ DemoEffectFunc updateFunc; | ||
// original size = 0x0190 | ||
/* 0x0190 */ override_t override; | ||
/* 0x0xxx*/ bool override_initialized; | ||
} DemoEffect; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.