mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-13 05:47:34 -05:00
Drop 49 unneeded util.h includes from generated headers
The landing script added `#include "util.h"` to every header it generated, across this whole branch. That was never necessary for most of them: u8/u32/s32 and the rest of the base types are typedef'd in lib/include/nitro/types.h, which every translation unit already has through `-prefix global.mch`. 283 of the 460 headers in the tree that name u32 do not include util.h and build fine. util.h owns bool8, bool32, fx32_8, ufx32_8 and struct fixed_point/rgba/vec2_16 -- a header naming any of those genuinely needs it, and 61 of the 110 do. The other 49 carried it for nothing and are cleaned up here. Removal is .c-aware: util.h is kept wherever the header's paired source names a util.h-owned symbol and does not include util.h itself, so nothing loses it transitively. No functional change; verified byte-identical. Authored by Claude (Opus 5) under human direction. Confirmed by a matching build: build/pmdsky.us/pmdsky.us.nds: OK. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#ifndef PMDSKY_MAIN_02008194_H
|
||||
#define PMDSKY_MAIN_02008194_H
|
||||
|
||||
#include "util.h"
|
||||
#include "file.h"
|
||||
|
||||
struct unk_020AF360 {
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef PMDSKY_MAIN_02009BE8_H
|
||||
#define PMDSKY_MAIN_02009BE8_H
|
||||
|
||||
#include "util.h"
|
||||
|
||||
void sub_02009BE8(u32 value, s32 flag);
|
||||
void sub_02009C10(u32 value, s32 flag);
|
||||
void sub_02009C38(u32 value);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef PMDSKY_MAIN_0200CA54_H
|
||||
#define PMDSKY_MAIN_0200CA54_H
|
||||
|
||||
#include "util.h"
|
||||
#include "item.h"
|
||||
|
||||
s16 GetDamageSource(s32 a, enum item_id item_id);
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef PMDSKY_MAIN_02017C80_H
|
||||
#define PMDSKY_MAIN_02017C80_H
|
||||
|
||||
#include "util.h"
|
||||
|
||||
void PlaySeByIdVolumeWrapper(s32 se_id);
|
||||
void sub_02017C90(s32 a, s32 b, s32 c, s32 d);
|
||||
void sub_02017C9C(s32 a, s32 b, s32 c);
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef PMDSKY_MAIN_0201E380_H
|
||||
#define PMDSKY_MAIN_0201E380_H
|
||||
|
||||
#include "util.h"
|
||||
|
||||
struct unk_0201E380 {
|
||||
u8 field_0x0[0x18];
|
||||
u16* field_0x18;
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef PMDSKY_MAIN_0202613C_H
|
||||
#define PMDSKY_MAIN_0202613C_H
|
||||
|
||||
#include "util.h"
|
||||
|
||||
struct unk_02026130 {
|
||||
u8 field_0x0[4];
|
||||
u8 field_0x4[4];
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef PMDSKY_MAIN_02026174_H
|
||||
#define PMDSKY_MAIN_02026174_H
|
||||
|
||||
#include "util.h"
|
||||
#include "main_0202613C.h"
|
||||
|
||||
void sub_02026174(struct unk_02026130* p);
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef PMDSKY_MAIN_02027A80_H
|
||||
#define PMDSKY_MAIN_02027A80_H
|
||||
|
||||
#include "util.h"
|
||||
|
||||
void sub_02027A08(s32 window_id, s32 value);
|
||||
void SetScreenWindowsColor(s32 color, s32 screen);
|
||||
void SetBothScreensWindowsColor(s32 color);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef PMDSKY_MAIN_02028284_H
|
||||
#define PMDSKY_MAIN_02028284_H
|
||||
|
||||
#include "util.h"
|
||||
#include "window.h"
|
||||
|
||||
void sub_0202825C(s32 index, u16 value);
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef PMDSKY_MAIN_02029EC8_H
|
||||
#define PMDSKY_MAIN_02029EC8_H
|
||||
|
||||
#include "util.h"
|
||||
|
||||
extern u8 PREV_MENU_ITEMS[0x18];
|
||||
|
||||
u32 Arm9LoadUnkFieldNa0x2029EC8(u32 i, u8 *unused);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef PMDSKY_MAIN_0202C5E0_H
|
||||
#define PMDSKY_MAIN_0202C5E0_H
|
||||
|
||||
#include "util.h"
|
||||
#include "main_0202AAA8.h"
|
||||
|
||||
struct unk_0202C5E0 {
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef PMDSKY_MAIN_0202C748_H
|
||||
#define PMDSKY_MAIN_0202C748_H
|
||||
|
||||
#include "util.h"
|
||||
|
||||
s32 GetWindowIdSelectedMenuItemIdx(s32 window_id);
|
||||
s32 sub_0202C75C(s32 window_id);
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef PMDSKY_MAIN_0203083C_H
|
||||
#define PMDSKY_MAIN_0203083C_H
|
||||
|
||||
#include "util.h"
|
||||
|
||||
void SetAdvancedTextBoxField0x1C2(s32 window_id);
|
||||
void CloseAdvancedTextBox2(s32 window_id);
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef PMDSKY_MAIN_02030A18_H
|
||||
#define PMDSKY_MAIN_02030A18_H
|
||||
|
||||
#include "util.h"
|
||||
|
||||
s32 GetWindowIdPageStart(s32 window_id);
|
||||
void SetWindowTitle(s32 window_id, u16 title);
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@ struct unk_02030A50 {
|
||||
s32 field_0xC0;
|
||||
};
|
||||
|
||||
#include "util.h"
|
||||
|
||||
s32 GetAdvancedTextBoxFlags2(s32 window_id);
|
||||
void sub_02030A50(s32 window_id, s32 value);
|
||||
s32 sub_02030A64(s32 window_id);
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef PMDSKY_MAIN_02032558_H
|
||||
#define PMDSKY_MAIN_02032558_H
|
||||
|
||||
#include "util.h"
|
||||
|
||||
struct unk_02032558 {
|
||||
u8 field_0x0[0xBC];
|
||||
s32 field_0xBC;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef PMDSKY_MAIN_02043148_H
|
||||
#define PMDSKY_MAIN_02043148_H
|
||||
|
||||
#include "util.h"
|
||||
#include "main_02042AF8.h"
|
||||
|
||||
void sub_02043148(s32 index);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef PMDSKY_MAIN_02043218_H
|
||||
#define PMDSKY_MAIN_02043218_H
|
||||
|
||||
#include "util.h"
|
||||
#include "main_02042AF8.h"
|
||||
|
||||
void sub_02043218(void);
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef PMDSKY_MAIN_0204F9B8_H
|
||||
#define PMDSKY_MAIN_0204F9B8_H
|
||||
|
||||
#include "util.h"
|
||||
|
||||
void sub_0204F9B8(void);
|
||||
void sub_0204F9CC(void);
|
||||
s32 sub_0204F9E0(void);
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
#define PMDSKY_MAIN_0204FA24_H
|
||||
|
||||
#include "adventure_log.h"
|
||||
#include "util.h"
|
||||
|
||||
void SetAdventureLogStructLocation(void);
|
||||
void SetAdventureLogDungeonFloor(struct dungeon_floor_pair* floor);
|
||||
struct dungeon_floor_pair* GetAdventureLogDungeonFloor(void);
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
#define PMDSKY_MAIN_0204FD3C_H
|
||||
|
||||
#include "adventure_log.h"
|
||||
#include "util.h"
|
||||
|
||||
void IncrementNbEggsHatched(void);
|
||||
u32 GetNbEggsHatched(void);
|
||||
u32 GetNbPokemonJoined(void);
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
#define PMDSKY_MAIN_0204FEB4_H
|
||||
|
||||
#include "adventure_log.h"
|
||||
#include "util.h"
|
||||
|
||||
u32 GetNbPokemonBattled(void);
|
||||
void IncrementNbBigTreasureWins(void);
|
||||
void SetNbBigTreasureWins(s32 value);
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
#define PMDSKY_MAIN_020502B0_H
|
||||
|
||||
#include "adventure_log.h"
|
||||
#include "util.h"
|
||||
|
||||
void IncrementNbFainted(void);
|
||||
u32 GetNbFainted(void);
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
#define PMDSKY_MAIN_020503CC_H
|
||||
|
||||
#include "adventure_log.h"
|
||||
#include "util.h"
|
||||
|
||||
u32 GetNbItemAcquired(void);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
#define PMDSKY_MAIN_020504A4_H
|
||||
|
||||
#include "adventure_log.h"
|
||||
#include "util.h"
|
||||
|
||||
u32 GetSentryDutyGamePoints(s32 index);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef PMDSKY_MAIN_020568A4_H
|
||||
#define PMDSKY_MAIN_020568A4_H
|
||||
|
||||
#include "util.h"
|
||||
|
||||
u32 GetAppointedLeaderMemberIdx(void);
|
||||
s16 sub_020568DC(s32 team);
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef PMDSKY_MAIN_02065C48_H
|
||||
#define PMDSKY_MAIN_02065C48_H
|
||||
|
||||
#include "util.h"
|
||||
|
||||
struct unk_020A68C8 {
|
||||
s16 field_0x0;
|
||||
s16 field_0x2;
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef PMDSKY_MAIN_020663C8_H
|
||||
#define PMDSKY_MAIN_020663C8_H
|
||||
|
||||
#include "util.h"
|
||||
|
||||
void sub_020663C8(s32 a, s32 b, s32 c, s32 d, s8 e);
|
||||
void sub_020663DC(s32 a, s32 b, s32 c, s32 d, s32 e, u16 f);
|
||||
void sub_02066408(s32 a, s32 b, s32 c, s32 d, s32 e, u16 f, s32 g);
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef PMDSKY_MAIN_0206C0D8_H
|
||||
#define PMDSKY_MAIN_0206C0D8_H
|
||||
|
||||
#include "util.h"
|
||||
|
||||
struct unk_020B0B70 {
|
||||
s16 field_0x0;
|
||||
s16 field_0x2;
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef PMDSKY_OVERLAY_00_0230E3E8_H
|
||||
#define PMDSKY_OVERLAY_00_0230E3E8_H
|
||||
|
||||
#include "util.h"
|
||||
|
||||
struct unk_0230E3E8 {
|
||||
u32 field_0x0;
|
||||
u16 field_0x4;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef PMDSKY_OVERLAY_01_0233755C_H
|
||||
#define PMDSKY_OVERLAY_01_0233755C_H
|
||||
|
||||
#include "util.h"
|
||||
#include "main_020348E4.h"
|
||||
|
||||
void ov01_0233755C(void);
|
||||
|
||||
@@ -9,8 +9,6 @@ struct unk_0233F660 {
|
||||
u8 field_0xD[3];
|
||||
};
|
||||
|
||||
#include "util.h"
|
||||
|
||||
void ov04_0233CA80(void);
|
||||
void ov04_0233CA98(s32 a);
|
||||
s32 ov04_0233CAA8(void);
|
||||
|
||||
@@ -6,8 +6,6 @@ struct unk_0233EEE0 {
|
||||
u8 field_0x4[8];
|
||||
};
|
||||
|
||||
#include "util.h"
|
||||
|
||||
void ov06_0233CA80(void);
|
||||
void ov06_0233CA98(s32 a);
|
||||
s32 ov06_0233CAA8(void);
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef PMDSKY_OVERLAY_11_022E96E4_H
|
||||
#define PMDSKY_OVERLAY_11_022E96E4_H
|
||||
|
||||
#include "util.h"
|
||||
|
||||
u8 ov11_022E96E4(void);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef PMDSKY_OVERLAY_11_0230CD48_H
|
||||
#define PMDSKY_OVERLAY_11_0230CD48_H
|
||||
|
||||
#include "util.h"
|
||||
#include "main_020348E4.h"
|
||||
|
||||
u32 LoadCroagunkSwapShopOverlay(void);
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef PMDSKY_OVERLAY_16_0238CC94_H
|
||||
#define PMDSKY_OVERLAY_16_0238CC94_H
|
||||
|
||||
#include "util.h"
|
||||
|
||||
struct unk_0238CE40 {
|
||||
u8 field_0x0[0xD8];
|
||||
s32 field_0xD8;
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef PMDSKY_OVERLAY_29_022E9FC0_H
|
||||
#define PMDSKY_OVERLAY_29_022E9FC0_H
|
||||
|
||||
#include "util.h"
|
||||
|
||||
u8 ov29_022E9FC0(void);
|
||||
void ov29_022E9FD0(u8 value);
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef PMDSKY_OVERLAY_29_022EA968_H
|
||||
#define PMDSKY_OVERLAY_29_022EA968_H
|
||||
|
||||
#include "util.h"
|
||||
|
||||
void SetDungeonRngPreseed23Bit(u32 preseed);
|
||||
u32 GenerateDungeonRngSeed(void);
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef PMDSKY_OVERLAY_29_022EA9CC_H
|
||||
#define PMDSKY_OVERLAY_29_022EA9CC_H
|
||||
|
||||
#include "util.h"
|
||||
|
||||
u32 GetDungeonRngPreseed(void);
|
||||
void SetDungeonRngPreseed(u32 preseed);
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef PMDSKY_OVERLAY_29_022EAC34_H
|
||||
#define PMDSKY_OVERLAY_29_022EAC34_H
|
||||
|
||||
#include "util.h"
|
||||
|
||||
void DungeonRngUnsetSecondary(void);
|
||||
void DungeonRngSetSecondary(s32 idx);
|
||||
void DungeonRngSetPrimary(void);
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef PMDSKY_OVERLAY_29_022EAC7C_H
|
||||
#define PMDSKY_OVERLAY_29_022EAC7C_H
|
||||
|
||||
#include "util.h"
|
||||
|
||||
void PlayLevelUpSound(void);
|
||||
void PlayDungeonTipSound__022EB63C(void);
|
||||
void ov29_022EAC9C(void);
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
#define PMDSKY_OVERLAY_29_022EAE14_H
|
||||
|
||||
#include "dungeon.h"
|
||||
#include "util.h"
|
||||
|
||||
void ChangeDungeonMusic(enum music_id music);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
#define PMDSKY_OVERLAY_29_022ED01C_H
|
||||
|
||||
#include "dungeon.h"
|
||||
#include "util.h"
|
||||
|
||||
void SetForcedLossReason(enum forced_loss_reason reason);
|
||||
enum forced_loss_reason GetForcedLossReason(void);
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
#define PMDSKY_OVERLAY_29_022ED868_H
|
||||
|
||||
#include "dungeon.h"
|
||||
#include "util.h"
|
||||
|
||||
s32 AreLateGameTrapsEnabledWrapper(void);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
#define PMDSKY_OVERLAY_29_02338850_H
|
||||
|
||||
#include "dungeon.h"
|
||||
#include "util.h"
|
||||
|
||||
enum hidden_stairs_type GetHiddenStairsField(void);
|
||||
void SetHiddenStairsField(enum hidden_stairs_type value);
|
||||
enum hidden_stairs_type GetHiddenFloorField(void);
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
#define PMDSKY_OVERLAY_29_02339118_H
|
||||
|
||||
#include "dungeon.h"
|
||||
#include "util.h"
|
||||
|
||||
struct minimap_display_data* GetMinimapData(void);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef PMDSKY_OVERLAY_29_0234396C_H
|
||||
#define PMDSKY_OVERLAY_29_0234396C_H
|
||||
|
||||
#include "util.h"
|
||||
|
||||
u8 FixedRoomActionParamToDirection(u8 action_param);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef PMDSKY_OVERLAY_29_02344B9C_H
|
||||
#define PMDSKY_OVERLAY_29_02344B9C_H
|
||||
|
||||
#include "util.h"
|
||||
|
||||
void ov29_02344B9C(s32 idx, u32 val);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef PMDSKY_OVERLAY_29_02344BE4_H
|
||||
#define PMDSKY_OVERLAY_29_02344BE4_H
|
||||
|
||||
#include "util.h"
|
||||
|
||||
#include "dungeon_mode.h"
|
||||
#include "item.h"
|
||||
#include "move.h"
|
||||
|
||||
Reference in New Issue
Block a user