Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upstream window IDs from dx #1214

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/effect_shims.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ b32 shim_npc_raycast_down_sides(s32, f32*, f32*, f32*, f32*);
s32 shim_load_effect(s32 effectIndex);
float shim_sqrtf(float value);
void shim_mdl_draw_hidden_panel_surface(Gfx**, u16 treeIndex);
s32 shim_is_point_visible(f32, f32, f32, s32, f32*, f32*);
b32 shim_is_point_visible(f32, f32, f32, s32, f32*, f32*);
void shim_guPerspectiveF(f32 mf[4][4], u16* perspNorm, f32 fovy, f32 aspect, f32 near, f32 far, f32 scale);
void shim_transform_point(Matrix4f mtx, f32 inX, f32 inY, f32 inZ, f32 inS, f32* outX, f32* outY, f32* outZ, f32* outW);
void shim_guPositionF(float mf[4][4], float r, float p, float h, float s, float x, float y, float z);
Expand Down
144 changes: 72 additions & 72 deletions include/enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -5236,75 +5236,75 @@ enum DictionaryIndex {
DICTIONARY_SIZE,
};

enum WindowId {
WINDOW_ID_NONE = -1,
WINDOW_ID_0 = 0,
WINDOW_ID_1 = 1,
WINDOW_ID_2 = 2,
WINDOW_ID_3 = 3,
WINDOW_ID_4 = 4,
WINDOW_ID_5 = 5,
WINDOW_ID_6 = 6,
WINDOW_ID_7 = 7,
WINDOW_ID_8 = 8, // battle main?
WINDOW_ID_BATTLE_POPUP = 9,
WINDOW_ID_ITEM_INFO_NAME = 10,
WINDOW_ID_ITEM_INFO_DESC = 11,
WINDOW_ID_12 = 12,
WINDOW_ID_13 = 13,
WINDOW_ID_14 = 14,
WINDOW_ID_15 = 15,
WINDOW_ID_16 = 16,
WINDOW_ID_17 = 17, // brown box used for "Throw away an item" and certain popup titles
WINDOW_ID_18 = 18,
WINDOW_ID_19 = 19,
WINDOW_ID_CURRENCY_COUNTER = 20,
WINDOW_ID_21 = 21,
WINDOW_ID_PAUSE_MAIN = 22,
WINDOW_ID_PAUSE_DECRIPTION = 23,
WINDOW_ID_FILEMENU_CURSOR = 23, // same as previous
WINDOW_ID_PAUSE_TUTORIAL = 24,
WINDOW_ID_FILEMENU_COPYARROW = 24, // same as previous
WINDOW_ID_PAUSE_TAB_STATS = 25,
WINDOW_ID_PAUSE_TAB_BADGES = 26,
WINDOW_ID_PAUSE_TAB_ITEMS = 27,
WINDOW_ID_PAUSE_TAB_PARTY = 28,
WINDOW_ID_PAUSE_TAB_SPIRITS = 29,
WINDOW_ID_PAUSE_TAB_MAP = 30,
WINDOW_ID_PAUSE_STATS = 31,
WINDOW_ID_PAUSE_BADGES = 32,
WINDOW_ID_PAUSE_ITEMS = 33,
WINDOW_ID_PAUSE_PARTNERS = 34,
WINDOW_ID_PAUSE_PARTNERS_TITLE = 35,
WINDOW_ID_PAUSE_PARTNERS_MOVELIST = 36,
WINDOW_ID_PAUSE_PARTNERS_MOVELIST_TITLE = 37,
WINDOW_ID_PAUSE_PARTNERS_MOVELIST_FLOWER = 38,
WINDOW_ID_PAUSE_SPIRITS = 39,
WINDOW_ID_PAUSE_SPIRITS_TITLE = 40,
WINDOW_ID_PAUSE_MAP = 41,
WINDOW_ID_PAUSE_MAP_TITLE = 42,
WINDOW_ID_PAUSE_TAB_INVIS = 43,
WINDOW_ID_PAUSE_CURSOR = 44,
WINDOW_ID_FILEMENU_MAIN = 44, // same as previous
WINDOW_ID_FILEMENU_TITLE = 45,
WINDOW_ID_FILEMENU_YESNO_PROMPT = 46,
WINDOW_ID_FILEMENU_INFO = 47,
WINDOW_ID_FILEMENU_CREATEFILE_HEADER = 48,
WINDOW_ID_FILEMENU_KEYBOARD = 49,
WINDOW_ID_FILEMENU_YESNO_OPTIONS = 50,
WINDOW_ID_FILEMENU_STEREO = 51,
WINDOW_ID_FILEMENU_MONO = 52,
WINDOW_ID_FILEMENU_OPTION_LEFT = 53,
WINDOW_ID_FILEMENU_OPTION_CENTER = 54,
WINDOW_ID_FILEMENU_OPTION_RIGHT = 55,
WINDOW_ID_FILEMENU_FILE0_INFO = 56,
WINDOW_ID_FILEMENU_FILE1_INFO = 57,
WINDOW_ID_FILEMENU_FILE2_INFO = 58,
WINDOW_ID_FILEMENU_FILE3_INFO = 59,
WINDOW_ID_FILEMENU_FILE0_TITLE = 60,
WINDOW_ID_FILEMENU_FILE1_TITLE = 61,
WINDOW_ID_FILEMENU_FILE2_TITLE = 62,
WINDOW_ID_FILEMENU_FILE3_TITLE = 63,
enum WindowID {
WIN_NONE = -1,
WIN_UNUSED_0 = 0,
WIN_BTL_MOVES_MENU = 1,
WIN_BTL_MOVES_TITLE = 2,
WIN_BTL_MOVES_ICON = 3,
WIN_BTL_SPIRITS_TITLE = 4,
WIN_BTL_SPIRITS_ICON = 5,
WIN_BTL_STRATS_MENU = 6,
WIN_BTL_STRATS_TITLE = 7,
WIN_BTL_DESC_BOX = 8, // strats and level up menus
WIN_BTL_POPUP = 9,
WIN_SHOP_ITEM_NAME = 10,
WIN_SHOP_ITEM_DESC = 11,
WIN_PICKUP_HEADER = 12,
WIN_UNUSED_13 = 13, // unused
WIN_POPUP_CONTENT = 14,
WIN_POPUP_TITLE_A = 15,
WIN_POPUP_COST = 16,
WIN_POPUP_TITLE_B = 17, // brown box used for "Throw away an item" and certain popup titles
WIN_PARTNER_COST = 18,
WIN_POPUP_DESC = 19,
WIN_CURRENCY_COUNTER = 20,
WIN_POPUP_PROMPT = 21,
WIN_PAUSE_MAIN = 22,
WIN_PAUSE_DECRIPTION = 23,
WIN_FILES_CURSOR = 23, // same as previous
WIN_PAUSE_TUTORIAL = 24,
WIN_FILES_COPYARROW = 24, // same as previous
WIN_PAUSE_TAB_STATS = 25,
WIN_PAUSE_TAB_BADGES = 26,
WIN_PAUSE_TAB_ITEMS = 27,
WIN_PAUSE_TAB_PARTY = 28,
WIN_PAUSE_TAB_SPIRITS = 29,
WIN_PAUSE_TAB_MAP = 30,
WIN_PAUSE_STATS = 31,
WIN_PAUSE_BADGES = 32,
WIN_PAUSE_ITEMS = 33,
WIN_PAUSE_PARTNERS = 34,
WIN_PAUSE_PARTNERS_TITLE = 35,
WIN_PAUSE_PARTNERS_MOVELIST = 36,
WIN_PAUSE_PARTNERS_MOVELIST_TITLE = 37,
WIN_PAUSE_PARTNERS_MOVELIST_FLOWER = 38,
WIN_PAUSE_SPIRITS = 39,
WIN_PAUSE_SPIRITS_TITLE = 40,
WIN_PAUSE_MAP = 41,
WIN_PAUSE_MAP_TITLE = 42,
WIN_PAUSE_TAB_INVIS = 43,
WIN_PAUSE_CURSOR = 44,
WIN_FILES_MAIN = 44, // same as previous
WIN_FILES_TITLE = 45,
WIN_FILES_CONFIRM_PROMPT = 46,
WIN_FILES_MESSAGE = 47,
WIN_FILES_INPUT_FIELD = 48,
WIN_FILES_INPUT_KEYBOARD = 49,
WIN_FILES_CONFIRM_OPTIONS = 50,
WIN_FILES_STEREO = 51,
WIN_FILES_MONO = 52,
WIN_FILES_OPTION_LEFT = 53,
WIN_FILES_OPTION_CENTER = 54,
WIN_FILES_OPTION_RIGHT = 55,
WIN_FILES_SLOT1_BODY = 56,
WIN_FILES_SLOT2_BODY = 57,
WIN_FILES_SLOT3_BODY = 58,
WIN_FILES_SLOT4_BODY = 59,
WIN_FILES_SLOT1_TITLE = 60,
WIN_FILES_SLOT2_TITLE = 61,
WIN_FILES_SLOT3_TITLE = 62,
WIN_FILES_SLOT4_TITLE = 63,
};

enum SimpleWindowUpdateId {
Expand All @@ -5321,9 +5321,9 @@ enum SimpleWindowUpdateId {

enum WindowGroupId {
WINDOW_GROUP_ALL = 0,
WINDOW_GROUP_1 = 1,
WINDOW_GROUP_PAUSE_MENU = 2,
WINDOW_GROUP_FILE_MENU = 3,
WINDOW_GROUP_BATTLE = 1,
WINDOW_GROUP_PAUSE = 2,
WINDOW_GROUP_FILES = 3,
};

enum RushFlags {
Expand Down
4 changes: 2 additions & 2 deletions include/functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ void imgfx_update_cache(void);
s32 imgfx_get_free_instances(s32);
void free_worker(s32);

s32 ai_check_fwd_collisions(Npc* npc, f32 arg1, f32* arg2, f32* arg3, f32* arg4, f32* arg5);
b32 ai_check_fwd_collisions(Npc* npc, f32 time, f32* outYaw, f32* outDistFwd, f32* outDistCW, f32* outDistCCW);
void basic_ai_loiter_init(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolume* territory);
void PatrolAI_LoiterInit(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolume* territory);

Expand All @@ -831,7 +831,7 @@ void* load_asset_by_name(const char* assetName, u32* decompressedSize);
Gfx* mdl_get_copied_gfx(s32 copyIndex);
void mdl_get_copied_vertices(s32 copyIndex, Vtx** firstVertex, Vtx** copiedVertices, s32* numCopied);
void mdl_draw_hidden_panel_surface(Gfx** arg0, u16 treeIndex);
s32 is_point_visible(f32 x, f32 y, f32 z, s32 depthQueryID, f32* screenX, f32* screenY);
b32 is_point_visible(f32 x, f32 y, f32 z, s32 depthQueryID, f32* screenX, f32* screenY);
void set_screen_overlay_center_worldpos(s32 idx, s32 posIdx, s32 x, s32 y, s32 z);
void* mdl_get_next_texture_address(s32);
s32 cancel_current_message(void);
Expand Down
4 changes: 2 additions & 2 deletions src/25AF0.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void basic_ai_suspend(Evt* script) {
}
}

s32 ai_check_fwd_collisions(Npc* npc, f32 time, f32* outYaw, f32* outDistFwd, f32* outDistCW, f32* outDistCCW) {
b32 ai_check_fwd_collisions(Npc* npc, f32 time, f32* outYaw, f32* outDistFwd, f32* outDistCW, f32* outDistCCW) {
f32 x1, y1, z1;
f32 x2, y2, z2;
f32 x3, y3, z3;
Expand All @@ -41,7 +41,7 @@ s32 ai_check_fwd_collisions(Npc* npc, f32 time, f32* outYaw, f32* outDistFwd, f3
npc->collisionHeight,
npc->collisionDiameter);

if (fwdHit != 0) {
if (fwdHit) {
fwdHitDist = dist2D(npc->pos.x, npc->pos.z, x1, z1);

x2 = npc->pos.x;
Expand Down
Loading
Loading