Skip to content

Commit

Permalink
Add extern declarations to headers for all global variables
Browse files Browse the repository at this point in the history
  • Loading branch information
LagoLunatic committed Jul 12, 2024
1 parent 1cd3788 commit 61d9f47
Show file tree
Hide file tree
Showing 12 changed files with 523 additions and 506 deletions.
4 changes: 4 additions & 0 deletions include/d/d_meter.h
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,10 @@ class sub_meter_class : public msg_class {
/* 0x3027 */ u8 field_0x3027;
};

extern dMeter_map_HIO_c g_meter_mapHIO;
extern dMeter_HIO_c g_meterHIO;
extern dMeter_menuHIO_c g_menuHIO;
extern dMeter_msg_HIO_c g_msgHIO;
extern dMeter_message_HIO_c g_messageHIO;

#endif /* D_METER_H */
2 changes: 2 additions & 0 deletions include/d/d_metronome.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,6 @@ class dMetronome_c : public dDlst_base_c {
/* 0xE3B */ u8 mbOpen;
};

extern dMn_HIO_c g_mnHIO;

#endif /* D_METRONOME_H */
2 changes: 2 additions & 0 deletions include/d/d_s_name.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,6 @@ class dScnName_c : public scene_class {
/* 0x1BBC */ int field_0x1bbc;
};

extern dSn_HIO_c g_snHIO;

#endif /* D_S_NAME */
4 changes: 2 additions & 2 deletions include/d/d_s_play.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ class dScnPly_msg_HIO_c : public JORReflexible {
/* 0x10 */ u32 field_0x10;
};

extern dScnPly_msg_HIO_c g_msgDHIO;

class dScnPly_preLoad_HIO_c : public mDoHIO_entry_c {
public:
virtual ~dScnPly_preLoad_HIO_c() {}
Expand All @@ -141,8 +139,10 @@ class dScnPly_reg_HIO_c {
/* 0x8 */ dScnPly_reg_childHIO_c mChild[22];
};

extern dScnPly_dark_HIO_c g_darkHIO;
extern dScnPly_reg_HIO_c g_regHIO;
extern dScnPly_env_HIO_c g_envHIO;
extern dScnPly_msg_HIO_c g_msgDHIO;

// Based on Twilight Princess debug, each g_envHIO child here was likely named after a specific developer.
// However, the developer name for each child isn't known here, so the below macro names are all unofficial.
Expand Down
1 change: 1 addition & 0 deletions include/f_op/f_op_actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ STATIC_ASSERT(sizeof(fopEn_enemy_c) == 0x2AC);

s32 fopAc_IsActor(void* actor);

extern int g_fopAc_type;
extern actor_method_class g_fopAc_Method;

#endif
1 change: 0 additions & 1 deletion include/f_op/f_op_actor_tag.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ u32 fopAcTg_ActorQTo(create_tag_class* pTag);
u32 fopAcTg_Init(create_tag_class* pTag, void* data);
u32 fopAcTg_ToActorQ(create_tag_class* c);

// f_op_actor_tag::g_fopAcTg_Queue
extern node_list_class g_fopAcTg_Queue;

#endif
2 changes: 2 additions & 0 deletions include/f_op/f_op_camera.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@ struct camera_process_profile_definition {
/* 0x3C */ leafdraw_method_class* sub_method; // Subclass methods
};

extern leafdraw_method_class g_fopCam_Method;

#endif
2 changes: 2 additions & 0 deletions include/f_op/f_op_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,6 @@ struct view_class : public leafdraw_class {
/* 0x1E0 */ Mtx mViewMtxNoTrans;
};

extern leafdraw_method_class g_fopVw_Method;

#endif
505 changes: 505 additions & 0 deletions include/f_pc/f_pc_profile_lst.h

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions include/m_Do/m_Do_graphic.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,6 @@ class mDoGph_gInf_c {
static u8 mCurrentHeap;
};

extern mDoGph_gInf_c g_mDoGph_graphicInfo;

#endif /* M_DO_M_DO_GRAPHIC_H */
1 change: 1 addition & 0 deletions include/m_Do/m_Do_machine.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
bool mDoMch_Create();
void mDoMch_HeapCheckAll();

extern GXRenderModeObj g_ntscZeldaIntDf;
extern GXRenderModeObj g_ntscZeldaProg;

class mDoMch_render_c {
Expand Down
503 changes: 0 additions & 503 deletions src/f_pc/f_pc_profile_lst.cpp

Large diffs are not rendered by default.

0 comments on commit 61d9f47

Please sign in to comment.