forked from PhlexPlexico/mm3dr
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Import GearScreen and identify value of the index update. Need to work on using L to go back in items. * Full L and R rotation of items in the deed slot now working. * Finalize trade item swap logic. TODO: Include ext item collection in itemeffect calls. * Complete work for keeping trade items over cycle and cycling through trade items. Update some fields in common data to match mm decomp. Hopefully fix bottle issues once and for all. * Formatting change. Debug changes as well. * Update bottle logic. Update mask base items to be a mask so they get mask fanfare. Update drawing items for refill items. * Minor decomp work. Find blast mask timer. * WIP: Attempt a new way of giving items from chests. * Update more bottle conditions. Update chest conditions to give items back if the user lacks them. * Bring in rough chest content matching for future purposes. * Attempt at breaking up inventory space and moving it to its own hooks. WIP: removing items if the user gives them away. * Fix item swapping and deletion of items on giving items. * Change chest function to be more reflective of what it does. * Finish adjusting Kafei letter in mail. Last to do it pendant. * Formatting fixes. * Revert mask changes as we cannot override animations on pickup just yet.
- Loading branch information
1 parent
d5283f5
commit 892d905
Showing
26 changed files
with
888 additions
and
115 deletions.
There are no files selected for viewing
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,55 @@ | ||
#ifndef _GAME_ACTORS_CHEST_H | ||
#define _GAME_ACTORS_CHEST_H | ||
|
||
#include "game/actor.h" | ||
#include "game/as.h" | ||
#include "game/collision.h" | ||
#include "game/skelanime.h" | ||
#include "rnd/item_override.h" | ||
|
||
namespace game::actors { | ||
enum class EnBoxType : u8 { | ||
ENBOX_TYPE_BIG = 0, // E.g. Hookshot Chest | ||
ENBOX_TYPE_BIG_ROOM_CLEAR = 1, | ||
ENBOX_TYPE_BIG_ORNATE = 2, // E.g. Boss Key Chests | ||
ENBOX_TYPE_BIG_SWITCH_FLAG_FALL = 3, | ||
ENBOX_TYPE_BIG_INVISIBLE = 4, | ||
ENBOX_TYPE_SMALL = 5, | ||
ENBOX_TYPE_SMALL_INVISIBLE = 6, | ||
ENBOX_TYPE_SMALL_ROOM_CLEAR = 7, | ||
ENBOX_TYPE_SMALL_SWITCH_FLAG_FALL = 8, | ||
ENBOX_TYPE_BIG_SONG_ZELDAS_LULLABY = 9, | ||
ENBOX_TYPE_BIG_SONG_SUNS = 10, | ||
ENBOX_TYPE_BIG_SWITCH_FLAG = 11, | ||
ENBOX_TYPE_SMALL_SWITCH_FLAG = 12 | ||
}; | ||
|
||
struct En_Box { | ||
game::act::DynaPolyActor dyna; | ||
SkelAnime* skel_anime; | ||
u8 gap_210[52]; | ||
CollisionInfoCylinder* collision_cylinder; | ||
u8 gap_248[84]; | ||
int field_29C; | ||
u8 gap_2A0[8]; | ||
void* some_fn; | ||
u8 gap_2AC[312]; | ||
u16 some_item_check; | ||
u8 movement_flags; | ||
u8 alpha; | ||
u8 switch_flag; | ||
EnBoxType chest_type; | ||
u8 iceSmokeTImer; | ||
s8 field_3EB; | ||
u8 gap_3EC[16]; | ||
void* field_3fc; | ||
u8 gap_400[16]; | ||
game::act::Actor* field_410; | ||
int csId2; | ||
rnd::GetItemID GetItemID; | ||
s32 collectableFlag; | ||
u8 gap_420[8]; | ||
}; | ||
} // namespace game::actors | ||
|
||
#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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#ifndef _GAME_SKELANIME_H | ||
#define _GAME_SKELANIME_H | ||
|
||
#include "common/types.h" | ||
#include "game/context.h" | ||
#include "z3d/z3DVec.h" | ||
|
||
namespace game { | ||
|
||
struct SkelAnime { | ||
u8 limb_count; | ||
u8 mode; | ||
u8 d_list_count; | ||
s8 taper; | ||
void** skeleton; /* An array of pointers to limbs. Can be StandardLimb, LodLimb, or SkinLimb. */ | ||
void* animation; /* Can be an AnimationHeader or PlayerAnimationHeader. */ | ||
float start_frame; | ||
float end_frame; | ||
float animation_length; | ||
float cur_frame; | ||
float play_speed; | ||
z3dVec3s* joint_table; | ||
z3dVec3s* morph_table; | ||
float morph_weight; | ||
float morph_rate; | ||
union { | ||
s32 (*normal)(struct SkelAnime*); // Can be Loop, Partial loop, Play once, Morph, or Tapered morph | ||
s32 (*player)(struct game::GlobalContext*, struct SkelAnime*); // Loop, Play once, and Morph | ||
} update; | ||
s8 init_flags; | ||
u8 move_flags; | ||
s16 prev_yaw; | ||
z3dVec3s prev_transl; | ||
z3dVec3s base_transl; | ||
}; | ||
|
||
} // namespace game | ||
|
||
#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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#include "common/utils.h" | ||
#include "game/message.h" | ||
#include "game/ui.h" | ||
|
||
#ifndef _GAME_UI_GEARSCREEN_H | ||
#define _GAME_UI_GEARSCREEN_H | ||
|
||
namespace game::ui::screens { | ||
struct GearScreen { | ||
Screen* screen; | ||
int press_handler; | ||
u16 field_8; | ||
u16 field_A; | ||
void* subMenuTitle; | ||
void* subMenuUpCollect; | ||
void* menuCollect; | ||
void* commonBottomBg; | ||
void* btn_return_top_l; | ||
void* btn_return; | ||
void* btn_option_l; | ||
void* main_player; | ||
void* in_menu_collect_anim; | ||
void* out_menu_collect_anim; | ||
u8 gap_34[240]; | ||
int field_124; | ||
int field_128; | ||
int field_12C; | ||
ItemIcon* cursorItemCollect; | ||
ItemIcon* icon_event00_l; | ||
ItemIcon* icon_event01_l; | ||
ItemIcon* icon_event02_l; | ||
ItemIcon* icon_event03_l; | ||
ItemIcon* icon_shadowgraph_box_l; | ||
ItemIcon* icon_purse_l; | ||
ItemIcon* icon_bomb_bag_l; | ||
ItemIcon* icon_arrow_l; | ||
ItemIcon* icon_sword_l; | ||
ItemIcon* icon_shield_l; | ||
ItemIcon* icon_boss00_l; | ||
ItemIcon* icon_boss02_l; | ||
ItemIcon* icon_boss01_l; | ||
ItemIcon* icon_boss03_l; | ||
ItemIcon* icon_schedule_l; | ||
ItemIcon* icon_okarina_l; | ||
ItemIcon* icon_trumpet_l; | ||
ItemIcon* icon_drum_l; | ||
ItemIcon* icon_guitar_l; | ||
ItemIcon* icon_f_tickets_l; | ||
ItemIcon* heart_pieces_l; | ||
void* frame_deformation_player; | ||
void* blink_picture_g; | ||
void* small_picture_g; | ||
u8 field_194; | ||
u8 cursorIndex; // Possible Index For Selected Item on Gear Screen | ||
u8 field_196; | ||
u8 field_197; | ||
int pressed_btn_option; | ||
int field_19C; | ||
int field_1A0; | ||
u8 has_opened_option_menu; | ||
u8 gap_1a5[3]; | ||
}; | ||
static_assert(sizeof(GearScreen) == 0x1A8); | ||
static_assert(offsetof(GearScreen, press_handler) == 0x00004); | ||
|
||
GearScreen* GetGearScreen(); | ||
} // namespace game::ui::screens | ||
|
||
#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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#ifndef _RND_CUSTOM_SCREEN_H_ | ||
#define _RND_CUSTOM_SCREEN_H_ | ||
|
||
#include "common/advanced_context.h" | ||
#include "common/types.h" | ||
#include "game/ui/screens/gearscreen.h" | ||
#include "rnd/savefile.h" | ||
#if defined ENABLE_DEBUG || defined DEBUG_PRINT | ||
#include "common/debug.h" | ||
extern "C" { | ||
#include <3ds/svc.h> | ||
} | ||
#endif | ||
|
||
namespace rnd { | ||
namespace gearscreen { | ||
extern "C" void GearScreen_GetStoredTradeItem(game::ui::screens::GearScreen*); | ||
void GearScreen_DrawAndShowItem(game::ItemId, game::ui::Anim*, u16, int); | ||
bool GearScreen_LoopTradeItemsForward(game::ui::Anim*, int, game::ItemId, game::ItemId, int); | ||
bool GearScreen_LoopTradeItemsBackward(game::ui::Anim*, int, game::ItemId, game::ItemId, int); | ||
int GearScreen_GetTextIdFromItemId(game::ItemId); | ||
int GearScreen_GetModelIdFromItemId(game::ItemId); | ||
} // namespace gearscreen | ||
} // namespace rnd | ||
|
||
#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
Oops, something went wrong.