Move HEAP_SIZE to malloc and use void instead of empty argument list

This commit is contained in:
DizzyEggg 2018-10-14 20:00:14 +02:00
parent e0bc3fd59c
commit c3113db931
11 changed files with 14 additions and 15 deletions

View File

@ -155,7 +155,7 @@ void sub_80AEDBC(void);
void SetSav1WeatherFromCurrMapHeader(void); void SetSav1WeatherFromCurrMapHeader(void);
// ... // ...
void DoCurrentWeather(void); void DoCurrentWeather(void);
void sub_8080750(); void sub_8080750(void);
bool8 IsWeatherNotFadingIn(void); bool8 IsWeatherNotFadingIn(void);
bool8 IsWeatherChangeComplete(void); bool8 IsWeatherChangeComplete(void);

View File

@ -61,8 +61,6 @@
#define min(a, b) ((a) < (b) ? (a) : (b)) #define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) >= (b) ? (a) : (b)) #define max(a, b) ((a) >= (b) ? (a) : (b))
#define HEAP_SIZE 0x1C000
extern u8 gStringVar1[]; extern u8 gStringVar1[];
extern u8 gStringVar2[]; extern u8 gStringVar2[];
extern u8 gStringVar3[]; extern u8 gStringVar3[];

View File

@ -13,6 +13,7 @@
} }
extern u8 gHeap[]; extern u8 gHeap[];
void *Alloc(u32 size); void *Alloc(u32 size);
void *AllocZeroed(u32 size); void *AllocZeroed(u32 size);
void Free(void *pointer); void Free(void *pointer);

View File

@ -55,7 +55,7 @@ bool8 unref_sub_8073D3C(u32, u8, u8, u8, u16);
void unref_sub_8073D84(u8, u32 *); void unref_sub_8073D84(u8, u32 *);
void ResetPaletteStructByUid(u16); void ResetPaletteStructByUid(u16);
void ResetPaletteStruct(u8); void ResetPaletteStruct(u8);
void ResetPaletteFadeControl(); void ResetPaletteFadeControl(void);
void unref_sub_8074168(u16); void unref_sub_8074168(u16);
void unref_sub_8074194(u16); void unref_sub_8074194(u16);
void InvertPlttBuffer(u32); void InvertPlttBuffer(u32);

View File

@ -50,8 +50,8 @@ void sub_81B1370(u8 taskId);
void display_pokemon_menu_message(u8 windowId); void display_pokemon_menu_message(u8 windowId);
void sub_81B1F18(u8 taskId, u8 pokemonIdx, s8 a, s16 hp, TaskFunc func); void sub_81B1F18(u8 taskId, u8 pokemonIdx, s8 a, s16 hp, TaskFunc func);
void sub_81B1B5C(void *a, u8 b); void sub_81B1B5C(void *a, u8 b);
u8 sub_81B1BD4(); u8 sub_81B1BD4(void);
void sub_81B8448(); void sub_81B8448(void);
void sub_81B8518(u8 unused); void sub_81B8518(u8 unused);
u8 sub_81B1360(void); u8 sub_81B1360(void);
void sub_81B8904(u8 arg0, void (*callback)(void)); void sub_81B8904(u8 arg0, void (*callback)(void));

View File

@ -2,7 +2,7 @@
#define GUARD_ROTATING_GATE_H #define GUARD_ROTATING_GATE_H
void RotatingGatePuzzleCameraUpdate(s16, s16); void RotatingGatePuzzleCameraUpdate(s16, s16);
void RotatingGate_InitPuzzleAndGraphics(); void RotatingGate_InitPuzzleAndGraphics(void);
u32 CheckForRotatingGatePuzzleCollision(u8, s16, s16); u32 CheckForRotatingGatePuzzleCollision(u8, s16, s16);
bool32 CheckForRotatingGatePuzzleCollisionWithoutAnimation(u8, s16, s16); bool32 CheckForRotatingGatePuzzleCollisionWithoutAnimation(u8, s16, s16);

View File

@ -860,7 +860,7 @@ bool8 IsBattlerSpritePresent(u8 battlerId)
return FALSE; return FALSE;
} }
bool8 IsDoubleBattle() bool8 IsDoubleBattle(void)
{ {
return IS_DOUBLE_BATTLE(); return IS_DOUBLE_BATTLE();
} }

View File

@ -285,7 +285,7 @@ void MovementType_Player(struct Sprite *sprite)
UpdateEventObjectCurrentMovement(&gEventObjects[sprite->data[0]], sprite, EventObjectCB2_NoMovement2); UpdateEventObjectCurrentMovement(&gEventObjects[sprite->data[0]], sprite, EventObjectCB2_NoMovement2);
} }
static u8 EventObjectCB2_NoMovement2() static u8 EventObjectCB2_NoMovement2(void)
{ {
return 0; return 0;
} }
@ -375,7 +375,7 @@ static void PlayerAllowForcedMovementIfMovingSameDirection(void)
gPlayerAvatar.flags &= ~PLAYER_AVATAR_FLAG_5; gPlayerAvatar.flags &= ~PLAYER_AVATAR_FLAG_5;
} }
static bool8 TryDoMetatileBehaviorForcedMovement() static bool8 TryDoMetatileBehaviorForcedMovement(void)
{ {
return gUnknown_08497444[GetForcedMovementByMetatileBehavior()](); return gUnknown_08497444[GetForcedMovementByMetatileBehavior()]();
} }

View File

@ -35,7 +35,7 @@ void hm2_sweet_scent(void)
gFieldEffectArguments[0] = GetCursorSelectionMonId(); gFieldEffectArguments[0] = GetCursorSelectionMonId();
} }
bool8 FldEff_SweetScent() bool8 FldEff_SweetScent(void)
{ {
u8 taskId; u8 taskId;

View File

@ -203,7 +203,7 @@ u8 CheckIfItemIsTMHMOrEvolutionStone(u16 itemId)
return 0; return 0;
} }
void sub_80FD254() void sub_80FD254(void)
{ {
struct MailStruct mail; struct MailStruct mail;
mail.itemId = gSpecialVar_ItemId; mail.itemId = gSpecialVar_ItemId;
@ -249,7 +249,7 @@ void ItemUseOnFieldCB_Bike(u8 taskId)
DestroyTask(taskId); DestroyTask(taskId);
} }
bool32 CanFish() bool32 CanFish(void)
{ {
s16 x, y; s16 x, y;
u16 tileBehavior; u16 tileBehavior;

View File

@ -7,7 +7,7 @@
struct Task gTasks[NUM_TASKS]; struct Task gTasks[NUM_TASKS];
static void InsertTask(u8 newTaskId); static void InsertTask(u8 newTaskId);
static u8 FindFirstActiveTask(); static u8 FindFirstActiveTask(void);
void ResetTasks(void) void ResetTasks(void)
{ {
@ -124,7 +124,7 @@ void RunTasks(void)
} }
} }
static u8 FindFirstActiveTask() static u8 FindFirstActiveTask(void)
{ {
u8 taskId; u8 taskId;