Skip to content

Commit

Permalink
sort pause menu into sub menus
Browse files Browse the repository at this point in the history
  • Loading branch information
Pheenoh committed Sep 2, 2024
1 parent 084b1a9 commit 49ea336
Show file tree
Hide file tree
Showing 14 changed files with 673 additions and 421 deletions.
7 changes: 5 additions & 2 deletions modules/boot/include/menus/menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ enum MenuIndex {
MN_ITEM_WHELL_INDEX,
MN_PAUSE_INDEX,
MN_AMOUNTS_INDEX,
// Pause menu's sub menus
MN_EQUIPMENT_INDEX,
MN_GOLDEN_BUGS_INDEX,
MN_HIDDEN_SKILLS_INDEX,
// Memory menu's sub menus
MN_WATCHES_INDEX,
MN_MEMORY_EDITOR_INDEX,
Expand All @@ -71,8 +75,7 @@ enum MenuIndex {
// Tools menu's sub menus
MN_CHECKERS_INDEX,

// Pause menu's sub menus
MN_GOLDEN_BUGS_INDEX,


// This entry is used only to get a count of the number of valid entries.
MN_COUNT
Expand Down
5 changes: 3 additions & 2 deletions modules/boot/src/menus/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ const char* g_menuPaths[MN_COUNT] = {
"warp", "general_flags", "dungeon_flags",
"portal_flags", "rupee_flags", "flag_records",
"flag_log", "item_wheel", "pause",
"amounts",
"amounts", "equipment", "golden_bugs",
"hidden_skills",
"watches", "memory_editor", "memfiles",
"any_saves", "any_bite_saves", "hundo_saves",
"ad_saves", "nosq_saves", "glitchless_saves",
"actor_spawn", "actor_list", "collision_view",
"projection_view", "trigger_view", "sound_test",
"pos_settings", "credits", "combo",
"checkers", "golden_bugs"
"checkers",
};

KEEP_FUNC Menu::Menu(Cursor& cursor) : cursor(cursor) {}
5 changes: 5 additions & 0 deletions modules/menus/menu_equipment/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
file(GLOB_RECURSE srcs CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
file(GLOB_RECURSE asms CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/*.s")
list(APPEND srcs ${asms})
get_filename_component(rel_name ${CMAKE_CURRENT_SOURCE_DIR} NAME)
tpgz_add_module(${rel_name} "${srcs}" "${CMAKE_CURRENT_SOURCE_DIR}/include")
45 changes: 45 additions & 0 deletions modules/menus/menu_equipment/include/equipment_menu.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#include "menus/menu.h"

struct EquipmentData {
uint8_t l_ordonSword_idx;
uint8_t l_masterSword_idx;
uint8_t l_woodShield_idx;
uint8_t l_hyShield_idx;
uint8_t l_tunic_idx;
uint8_t l_zoraArmor_idx;
uint8_t l_magicArmor_idx;
uint8_t l_bombCap_idx;
uint8_t l_wallet_idx;
uint8_t l_arrowCap_idx;
};

enum EquipmentIndex {
ORDON_SWORD_INDEX,
MASTER_SWORD_INDEX,
WOOD_SHIELD_INDEX,
HYLIAN_SHIELD_INDEX,
HERO_TUNIC_INDEX,
ZORA_ARMOR_INDEX,
MAGIC_ARMOR_INDEX,
BOMB_CAPACITY_INDEX,
WALLET_INDEX,
ARROW_CAPACITY_INDEX,

EQUIPMENT_INDEX_COUNT
};

extern EquipmentData* equipmentData;

class EquipmentMenu : public Menu {
public:
EquipmentMenu(Cursor&);
virtual ~EquipmentMenu();
virtual void draw();

private:
Line lines[EQUIPMENT_INDEX_COUNT];

void resetIndex();
void getEquipment();
void setEquipment();
};
6 changes: 6 additions & 0 deletions modules/menus/menu_equipment/include/main.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#pragma once

namespace tpgz::modules {
void main();
void exit();
} // namespace tpgz::modules
Loading

0 comments on commit 49ea336

Please sign in to comment.