void pointer standarized

This commit is contained in:
Eduardo Quezada 2022-07-29 10:52:35 -04:00
parent aa93af4083
commit 13672680b0
41 changed files with 245 additions and 245 deletions

View File

@ -33,7 +33,7 @@ struct BgConfig2
u32 basePalette:4;
u32 unk_3:18;
void* tilemap;
void *tilemap;
s32 bg_x;
s32 bg_y;
};
@ -183,14 +183,14 @@ u8 LoadBgVram(u8 bg, const void *src, u16 size, u16 destOffset, u8 mode)
case 0x1:
offset = sGpuBgConfigs.configs[bg].charBaseIndex * BG_CHAR_SIZE;
offset = destOffset + offset;
cursor = RequestDma3Copy(src, (void*)(offset + BG_VRAM), size, 0);
cursor = RequestDma3Copy(src, (void *)(offset + BG_VRAM), size, 0);
if (cursor == -1)
return -1;
break;
case 0x2:
offset = sGpuBgConfigs.configs[bg].mapBaseIndex * BG_SCREEN_SIZE;
offset = destOffset + offset;
cursor = RequestDma3Copy(src, (void*)(offset + BG_VRAM), size, 0);
cursor = RequestDma3Copy(src, (void *)(offset + BG_VRAM), size, 0);
if (cursor == -1)
return -1;
break;
@ -372,7 +372,7 @@ void SetBgMode(u8 bgMode)
SetBgModeInternal(bgMode);
}
u16 LoadBgTiles(u8 bg, const void* src, u16 size, u16 destOffset)
u16 LoadBgTiles(u8 bg, const void *src, u16 size, u16 destOffset)
{
u16 tileOffset;
u8 cursor;
@ -422,7 +422,7 @@ u16 Unused_LoadBgPalette(u8 bg, const void *src, u16 size, u16 destOffset)
if (!IsInvalidBg32(bg))
{
u16 paletteOffset = (sGpuBgConfigs2[bg].basePalette * 0x20) + (destOffset * 2);
cursor = RequestDma3Copy(src, (void*)(paletteOffset + BG_PLTT), size, 0);
cursor = RequestDma3Copy(src, (void *)(paletteOffset + BG_PLTT), size, 0);
if (cursor == -1)
{
@ -863,7 +863,7 @@ void UnsetBgTilemapBuffer(u8 bg)
}
}
void* GetBgTilemapBuffer(u8 bg)
void *GetBgTilemapBuffer(u8 bg)
{
if (IsInvalidBg32(bg))
return NULL;
@ -906,7 +906,7 @@ void CopyBgTilemapBufferToVram(u8 bg)
}
}
void CopyToBgTilemapBufferRect(u8 bg, const void* src, u8 destX, u8 destY, u8 width, u8 height)
void CopyToBgTilemapBufferRect(u8 bg, const void *src, u8 destX, u8 destY, u8 width, u8 height)
{
u16 destX16;
u16 destY16;
@ -1240,7 +1240,7 @@ bool32 IsInvalidBg32(u8 bg)
bool32 IsTileMapOutsideWram(u8 bg)
{
if (sGpuBgConfigs2[bg].tilemap > (void*)IWRAM_END)
if (sGpuBgConfigs2[bg].tilemap > (void *)IWRAM_END)
return TRUE;
else if (sGpuBgConfigs2[bg].tilemap == NULL)
return TRUE;

View File

@ -62,7 +62,7 @@ void ResetBgsAndClearDma3BusyFlags(u32 leftoverFireRedLeafGreenVariable);
void InitBgsFromTemplates(u8 bgMode, const struct BgTemplate *templates, u8 numTemplates);
void InitBgFromTemplate(const struct BgTemplate *template);
void SetBgMode(u8 bgMode);
u16 LoadBgTiles(u8 bg, const void* src, u16 size, u16 destOffset);
u16 LoadBgTiles(u8 bg, const void *src, u16 size, u16 destOffset);
u16 LoadBgTilemap(u8 bg, const void *src, u16 size, u16 destOffset);
u16 Unused_LoadBgPalette(u8 bg, const void *src, u16 size, u16 destOffset);
bool8 IsDma3ManagerBusyWithBgCopy(void);
@ -79,10 +79,10 @@ void SetBgAffine(u8 bg, s32 srcCenterX, s32 srcCenterY, s16 dispCenterX, s16 dis
u8 Unused_AdjustBgMosaic(u8 val, u8 mode);
void SetBgTilemapBuffer(u8 bg, void *tilemap);
void UnsetBgTilemapBuffer(u8 bg);
void* GetBgTilemapBuffer(u8 bg);
void *GetBgTilemapBuffer(u8 bg);
void CopyToBgTilemapBuffer(u8 bg, const void *src, u16 mode, u16 destOffset);
void CopyBgTilemapBufferToVram(u8 bg);
void CopyToBgTilemapBufferRect(u8 bg, const void* src, u8 destX, u8 destY, u8 width, u8 height);
void CopyToBgTilemapBufferRect(u8 bg, const void *src, u8 destX, u8 destY, u8 width, u8 height);
void CopyToBgTilemapBufferRect_ChangePalette(u8 bg, const void *src, u8 destX, u8 destY, u8 rectWidth, u8 rectHeight, u8 palette);
void CopyRectToBgTilemapBufferRect(u8 bg, const void *src, u8 srcX, u8 srcY, u8 srcWidth, u8 srcHeight, u8 destX, u8 destY, u8 rectWidth, u8 rectHeight, u8 palette1, s16 tileOffset, s16 palette2);
void FillBgTilemapBufferRect_Palette0(u8 bg, u16 tileNum, u8 x, u8 y, u8 width, u8 height);

View File

@ -73,7 +73,7 @@ void BlitBitmapRectToWindow4BitTo8Bit(u8 windowId, const u8 *pixels, u16 srcX, u
void CopyWindowToVram8Bit(u8 windowId, u8 mode);
extern struct Window gWindows[];
extern void* gWindowBgTilemapBuffers[];
extern void *gWindowBgTilemapBuffers[];
extern u32 gUnusedWindowVar1;
extern u32 gUnusedWindowVar2;
extern u32 gUnusedWindowVar3;

View File

@ -588,9 +588,9 @@ struct BattleSpriteData
struct MonSpritesGfx
{
void* firstDecompressed; // ptr to the decompressed sprite of the first pokemon
void *firstDecompressed; // ptr to the decompressed sprite of the first pokemon
union {
void* ptr[MAX_BATTLERS_COUNT];
void *ptr[MAX_BATTLERS_COUNT];
u8 *byte[MAX_BATTLERS_COUNT];
} sprites;
struct SpriteTemplate templates[MAX_BATTLERS_COUNT];

View File

@ -124,7 +124,7 @@ u8 AnimDummyReturnArg(u8 battler);
s16 CloneBattlerSpriteWithBlend(u8);
void DestroySpriteWithActiveSheet(struct Sprite*);
u8 CreateInvisibleSpriteCopy(int, u8, int);
void AnimLoadCompressedBgTilemapHandleContest(struct BattleAnimBgData*, const void*, bool32);
void AnimLoadCompressedBgTilemapHandleContest(struct BattleAnimBgData*, const void *, bool32);
void AnimLoadCompressedBgGfx(u32, const u32 *, u32);
void UpdateAnimBg3ScreenSize(bool8);
void TranslateSpriteInGrowingCircle(struct Sprite *);

View File

@ -16,9 +16,9 @@ void LoadCompressedSpritePalette(const struct CompressedSpritePalette *src);
void LoadCompressedSpritePaletteOverrideBuffer(const struct CompressedSpritePalette *src, void *buffer);
bool8 LoadCompressedSpritePaletteUsingHeap(const struct CompressedSpritePalette *src);
void DecompressPicFromTable(const struct CompressedSpriteSheet *src, void* buffer, s32 species);
void DecompressPicFromTable_2(const struct CompressedSpriteSheet *src, void* buffer, s32 species);
void DecompressPicFromTable_DontHandleDeoxys(const struct CompressedSpriteSheet *src, void* buffer, s32 species);
void DecompressPicFromTable(const struct CompressedSpriteSheet *src, void *buffer, s32 species);
void DecompressPicFromTable_2(const struct CompressedSpriteSheet *src, void *buffer, s32 species);
void DecompressPicFromTable_DontHandleDeoxys(const struct CompressedSpriteSheet *src, void *buffer, s32 species);
void HandleLoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality);
void HandleLoadSpecialPokePic_2(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality);

View File

@ -23,14 +23,14 @@ void AGBAssert(const char *pFile, int nLine, const char *pExpression, int nStopP
#ifdef NDEBUG
#define AGB_ASSERT(exp)
#else
#define AGB_ASSERT(exp) (exp) ? ((void*)0) : AGBAssert(__FILE__, __LINE__, #exp, 1);
#define AGB_ASSERT(exp) (exp) ? ((void *)0) : AGBAssert(__FILE__, __LINE__, #exp, 1);
#endif
#undef AGB_WARNING
#ifdef NDEBUG
#define AGB_WARNING(exp)
#else
#define AGB_WARNING(exp) (exp) ? ((void*)0) : AGBAssert(__FILE__, __LINE__, #exp, 0);
#define AGB_WARNING(exp) (exp) ? ((void *)0) : AGBAssert(__FILE__, __LINE__, #exp, 0);
#endif
// for matching purposes
@ -38,13 +38,13 @@ void AGBAssert(const char *pFile, int nLine, const char *pExpression, int nStopP
#ifdef NDEBUG
#define AGB_ASSERT_EX(exp, file, line)
#else
#define AGB_ASSERT_EX(exp, file, line) (exp) ? ((void*)0) : AGBAssert(file, line, #exp, 1);
#define AGB_ASSERT_EX(exp, file, line) (exp) ? ((void *)0) : AGBAssert(file, line, #exp, 1);
#endif
#ifdef NDEBUG
#define AGB_WARNING_EX(exp, file, line)
#else
#define AGB_WARNING_EX(exp, file, line) (exp) ? ((void*)0) : AGBAssert(file, line, #exp, 0);
#define AGB_WARNING_EX(exp, file, line) (exp) ? ((void *)0) : AGBAssert(file, line, #exp, 0);
#endif
#endif // GUARD_GBA_ISAGBPRINT_H

View File

@ -108,7 +108,7 @@
#define T2_READ_8(ptr) ((ptr)[0])
#define T2_READ_16(ptr) ((ptr)[0] + ((ptr)[1] << 8))
#define T2_READ_32(ptr) ((ptr)[0] + ((ptr)[1] << 8) + ((ptr)[2] << 16) + ((ptr)[3] << 24))
#define T2_READ_PTR(ptr) (void*) T2_READ_32(ptr)
#define T2_READ_PTR(ptr) (void *) T2_READ_32(ptr)
// Macros for checking the joypad
#define TEST_BUTTON(field, button) ((field) & (button))

View File

@ -1289,7 +1289,7 @@ static void Task_ExecuteFuncAfterButtonPress(u8 taskId)
{
if (JOY_NEW(A_BUTTON) || JOY_NEW(B_BUTTON))
{
gApprenticeFunc = (void*)(u32)(((u16)gTasks[taskId].data[0] | (gTasks[taskId].data[1] << 16)));
gApprenticeFunc = (void *)(u32)(((u16)gTasks[taskId].data[0] | (gTasks[taskId].data[1] << 16)));
gApprenticeFunc();
DestroyTask(taskId);
}

View File

@ -676,13 +676,13 @@ void MoveBattlerSpriteToBG(u8 battlerId, bool8 toBG_2, bool8 setSpriteInvisible)
if (IsContest() == TRUE)
{
RequestDma3Fill(0, (void*)(BG_SCREEN_ADDR(16)), 0x2000, 1);
RequestDma3Fill(0xFF, (void*)(BG_SCREEN_ADDR(30)), 0x1000, 0);
RequestDma3Fill(0, (void *)(BG_SCREEN_ADDR(16)), 0x2000, 1);
RequestDma3Fill(0xFF, (void *)(BG_SCREEN_ADDR(30)), 0x1000, 0);
}
else
{
RequestDma3Fill(0, (void*)(BG_SCREEN_ADDR(8)), 0x2000, 1);
RequestDma3Fill(0xFF, (void*)(BG_SCREEN_ADDR(28)), 0x1000, 0);
RequestDma3Fill(0, (void *)(BG_SCREEN_ADDR(8)), 0x2000, 1);
RequestDma3Fill(0xFF, (void *)(BG_SCREEN_ADDR(28)), 0x1000, 0);
}
GetBattleAnimBg1Data(&animBg);
@ -707,7 +707,7 @@ void MoveBattlerSpriteToBG(u8 battlerId, bool8 toBG_2, bool8 setSpriteInvisible)
SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y);
LoadPalette(&gPlttBufferUnfaded[0x100 + battlerId * 16], animBg.paletteId * 16, 0x20);
CpuCopy32(&gPlttBufferUnfaded[0x100 + battlerId * 16], (void*)(BG_PLTT + animBg.paletteId * 32), 0x20);
CpuCopy32(&gPlttBufferUnfaded[0x100 + battlerId * 16], (void *)(BG_PLTT + animBg.paletteId * 32), 0x20);
if (IsContest())
battlerPosition = 0;
@ -721,8 +721,8 @@ void MoveBattlerSpriteToBG(u8 battlerId, bool8 toBG_2, bool8 setSpriteInvisible)
}
else
{
RequestDma3Fill(0, (void*)(BG_SCREEN_ADDR(12)), 0x2000, 1);
RequestDma3Fill(0, (void*)(BG_SCREEN_ADDR(30)), 0x1000, 1);
RequestDma3Fill(0, (void *)(BG_SCREEN_ADDR(12)), 0x2000, 1);
RequestDma3Fill(0, (void *)(BG_SCREEN_ADDR(30)), 0x1000, 1);
GetBattleAnimBgData(&animBg, 2);
CpuFill16(0, animBg.bgTiles + 0x1000, 0x1000);
CpuFill16(0, animBg.bgTilemap + 0x400, 0x800);
@ -742,7 +742,7 @@ void MoveBattlerSpriteToBG(u8 battlerId, bool8 toBG_2, bool8 setSpriteInvisible)
SetGpuReg(REG_OFFSET_BG2VOFS, gBattle_BG2_Y);
LoadPalette(&gPlttBufferUnfaded[0x100 + battlerId * 16], 0x90, 0x20);
CpuCopy32(&gPlttBufferUnfaded[0x100 + battlerId * 16], (void*)(BG_PLTT + 0x120), 0x20);
CpuCopy32(&gPlttBufferUnfaded[0x100 + battlerId * 16], (void *)(BG_PLTT + 0x120), 0x20);
DrawBattlerOnBg(2, 0, 0, GetBattlerPosition(battlerId), animBg.paletteId, animBg.bgTiles + 0x1000, animBg.bgTilemap + 0x400, animBg.tilesOffset);
}
@ -1203,7 +1203,7 @@ static void LoadMoveBg(u16 bgId)
void *dmaDest;
LZDecompressWram(tilemap, gDecompressionBuffer);
RelocateBattleBgPal(GetBattleBgPaletteNum(), (void*)gDecompressionBuffer, 0x100, FALSE);
RelocateBattleBgPal(GetBattleBgPaletteNum(), (void *)gDecompressionBuffer, 0x100, FALSE);
dmaSrc = gDecompressionBuffer;
dmaDest = (void *)BG_SCREEN_ADDR(26);
DmaCopy32(3, dmaSrc, dmaDest, 0x800);

View File

@ -5015,7 +5015,7 @@ void AnimTask_MoonlightEndFade(u8 taskId)
gTasks[taskId].data[9] = 15;
b = GetBattleMonSpritePalettesMask(1, 1, 1, 1);
c = a | b;
StorePointerInVars(&gTasks[taskId].data[14], &gTasks[taskId].data[15], (void*)c);
StorePointerInVars(&gTasks[taskId].data[14], &gTasks[taskId].data[15], (void *)c);
b = b | (0x10000 << IndexOfSpritePaletteTag(ANIM_TAG_MOON));
d = IndexOfSpritePaletteTag(ANIM_TAG_GREEN_SPARKLE);
BeginNormalPaletteFade((0x10000 << d) | b, 0, 0, 16, RGB(27, 29, 31));

View File

@ -760,26 +760,26 @@ void DrawMainBattleBackground(void)
{
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_FRONTIER | BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_RECORDED_LINK))
{
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Building, (void*)(BG_SCREEN_ADDR(26)));
LZDecompressVram(gBattleTerrainTiles_Building, (void *)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Building, (void *)(BG_SCREEN_ADDR(26)));
LoadCompressedPalette(gBattleTerrainPalette_Frontier, 0x20, 0x60);
}
else if (gBattleTypeFlags & BATTLE_TYPE_GROUDON)
{
LZDecompressVram(gBattleTerrainTiles_Cave, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Cave, (void*)(BG_SCREEN_ADDR(26)));
LZDecompressVram(gBattleTerrainTiles_Cave, (void *)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Cave, (void *)(BG_SCREEN_ADDR(26)));
LoadCompressedPalette(gBattleTerrainPalette_Groudon, 0x20, 0x60);
}
else if (gBattleTypeFlags & BATTLE_TYPE_KYOGRE)
{
LZDecompressVram(gBattleTerrainTiles_Water, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Water, (void*)(BG_SCREEN_ADDR(26)));
LZDecompressVram(gBattleTerrainTiles_Water, (void *)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Water, (void *)(BG_SCREEN_ADDR(26)));
LoadCompressedPalette(gBattleTerrainPalette_Kyogre, 0x20, 0x60);
}
else if (gBattleTypeFlags & BATTLE_TYPE_RAYQUAZA)
{
LZDecompressVram(gBattleTerrainTiles_Rayquaza, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Rayquaza, (void*)(BG_SCREEN_ADDR(26)));
LZDecompressVram(gBattleTerrainTiles_Rayquaza, (void *)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Rayquaza, (void *)(BG_SCREEN_ADDR(26)));
LoadCompressedPalette(gBattleTerrainPalette_Rayquaza, 0x20, 0x60);
}
else
@ -789,15 +789,15 @@ void DrawMainBattleBackground(void)
u8 trainerClass = gTrainers[gTrainerBattleOpponent_A].trainerClass;
if (trainerClass == TRAINER_CLASS_LEADER)
{
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Building, (void*)(BG_SCREEN_ADDR(26)));
LZDecompressVram(gBattleTerrainTiles_Building, (void *)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Building, (void *)(BG_SCREEN_ADDR(26)));
LoadCompressedPalette(gBattleTerrainPalette_BuildingLeader, 0x20, 0x60);
return;
}
else if (trainerClass == TRAINER_CLASS_CHAMPION)
{
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26)));
LZDecompressVram(gBattleTerrainTiles_Stadium, (void *)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void *)(BG_SCREEN_ADDR(26)));
LoadCompressedPalette(gBattleTerrainPalette_StadiumWallace, 0x20, 0x60);
return;
}
@ -807,48 +807,48 @@ void DrawMainBattleBackground(void)
{
default:
case MAP_BATTLE_SCENE_NORMAL:
LZDecompressVram(sBattleTerrainTable[gBattleTerrain].tileset, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(sBattleTerrainTable[gBattleTerrain].tilemap, (void*)(BG_SCREEN_ADDR(26)));
LZDecompressVram(sBattleTerrainTable[gBattleTerrain].tileset, (void *)(BG_CHAR_ADDR(2)));
LZDecompressVram(sBattleTerrainTable[gBattleTerrain].tilemap, (void *)(BG_SCREEN_ADDR(26)));
LoadCompressedPalette(sBattleTerrainTable[gBattleTerrain].palette, 0x20, 0x60);
break;
case MAP_BATTLE_SCENE_GYM:
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Building, (void*)(BG_SCREEN_ADDR(26)));
LZDecompressVram(gBattleTerrainTiles_Building, (void *)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Building, (void *)(BG_SCREEN_ADDR(26)));
LoadCompressedPalette(gBattleTerrainPalette_BuildingGym, 0x20, 0x60);
break;
case MAP_BATTLE_SCENE_MAGMA:
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26)));
LZDecompressVram(gBattleTerrainTiles_Stadium, (void *)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void *)(BG_SCREEN_ADDR(26)));
LoadCompressedPalette(gBattleTerrainPalette_StadiumMagma, 0x20, 0x60);
break;
case MAP_BATTLE_SCENE_AQUA:
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26)));
LZDecompressVram(gBattleTerrainTiles_Stadium, (void *)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void *)(BG_SCREEN_ADDR(26)));
LoadCompressedPalette(gBattleTerrainPalette_StadiumAqua, 0x20, 0x60);
break;
case MAP_BATTLE_SCENE_SIDNEY:
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26)));
LZDecompressVram(gBattleTerrainTiles_Stadium, (void *)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void *)(BG_SCREEN_ADDR(26)));
LoadCompressedPalette(gBattleTerrainPalette_StadiumSidney, 0x20, 0x60);
break;
case MAP_BATTLE_SCENE_PHOEBE:
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26)));
LZDecompressVram(gBattleTerrainTiles_Stadium, (void *)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void *)(BG_SCREEN_ADDR(26)));
LoadCompressedPalette(gBattleTerrainPalette_StadiumPhoebe, 0x20, 0x60);
break;
case MAP_BATTLE_SCENE_GLACIA:
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26)));
LZDecompressVram(gBattleTerrainTiles_Stadium, (void *)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void *)(BG_SCREEN_ADDR(26)));
LoadCompressedPalette(gBattleTerrainPalette_StadiumGlacia, 0x20, 0x60);
break;
case MAP_BATTLE_SCENE_DRAKE:
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26)));
LZDecompressVram(gBattleTerrainTiles_Stadium, (void *)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void *)(BG_SCREEN_ADDR(26)));
LoadCompressedPalette(gBattleTerrainPalette_StadiumDrake, 0x20, 0x60);
break;
case MAP_BATTLE_SCENE_FRONTIER:
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Building, (void*)(BG_SCREEN_ADDR(26)));
LZDecompressVram(gBattleTerrainTiles_Building, (void *)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Building, (void *)(BG_SCREEN_ADDR(26)));
LoadCompressedPalette(gBattleTerrainPalette_Frontier, 0x20, 0x60);
break;
}
@ -857,7 +857,7 @@ void DrawMainBattleBackground(void)
void LoadBattleTextboxAndBackground(void)
{
LZDecompressVram(gBattleTextboxTiles, (void*)(BG_CHAR_ADDR(0)));
LZDecompressVram(gBattleTextboxTiles, (void *)(BG_CHAR_ADDR(0)));
CopyToBgTilemapBuffer(0, gBattleTextboxTilemap, 0, 0);
CopyBgTilemapBufferToVram(0);
LoadCompressedPalette(gBattleTextboxPalette, 0, 0x40);
@ -1124,8 +1124,8 @@ void DrawBattleEntryBackground(void)
{
if (gBattleTypeFlags & BATTLE_TYPE_LINK)
{
LZDecompressVram(gBattleVSFrame_Gfx, (void*)(BG_CHAR_ADDR(1)));
LZDecompressVram(gVsLettersGfx, (void*)OBJ_VRAM0);
LZDecompressVram(gBattleVSFrame_Gfx, (void *)(BG_CHAR_ADDR(1)));
LZDecompressVram(gVsLettersGfx, (void *)OBJ_VRAM0);
LoadCompressedPalette(gBattleVSFrame_Pal, 0x60, 0x20);
SetBgAttribute(1, BG_ATTR_SCREENSIZE, 1);
SetGpuReg(REG_OFFSET_BG1CNT, 0x5C04);
@ -1143,8 +1143,8 @@ void DrawBattleEntryBackground(void)
{
if (!(gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER) || gPartnerTrainerId == TRAINER_STEVEN_PARTNER)
{
LZDecompressVram(gBattleTerrainAnimTiles_Building, (void*)(BG_CHAR_ADDR(1)));
LZDecompressVram(gBattleTerrainAnimTilemap_Building, (void*)(BG_SCREEN_ADDR(28)));
LZDecompressVram(gBattleTerrainAnimTiles_Building, (void *)(BG_CHAR_ADDR(1)));
LZDecompressVram(gBattleTerrainAnimTilemap_Building, (void *)(BG_SCREEN_ADDR(28)));
}
else
{
@ -1160,18 +1160,18 @@ void DrawBattleEntryBackground(void)
}
else if (gBattleTypeFlags & BATTLE_TYPE_GROUDON)
{
LZDecompressVram(gBattleTerrainAnimTiles_Cave, (void*)(BG_CHAR_ADDR(1)));
LZDecompressVram(gBattleTerrainAnimTilemap_Cave, (void*)(BG_SCREEN_ADDR(28)));
LZDecompressVram(gBattleTerrainAnimTiles_Cave, (void *)(BG_CHAR_ADDR(1)));
LZDecompressVram(gBattleTerrainAnimTilemap_Cave, (void *)(BG_SCREEN_ADDR(28)));
}
else if (gBattleTypeFlags & BATTLE_TYPE_KYOGRE)
{
LZDecompressVram(gBattleTerrainAnimTiles_Underwater, (void*)(BG_CHAR_ADDR(1)));
LZDecompressVram(gBattleTerrainAnimTilemap_Underwater, (void*)(BG_SCREEN_ADDR(28)));
LZDecompressVram(gBattleTerrainAnimTiles_Underwater, (void *)(BG_CHAR_ADDR(1)));
LZDecompressVram(gBattleTerrainAnimTilemap_Underwater, (void *)(BG_SCREEN_ADDR(28)));
}
else if (gBattleTypeFlags & BATTLE_TYPE_RAYQUAZA)
{
LZDecompressVram(gBattleTerrainAnimTiles_Rayquaza, (void*)(BG_CHAR_ADDR(1)));
LZDecompressVram(gBattleTerrainAnimTilemap_Rayquaza, (void*)(BG_SCREEN_ADDR(28)));
LZDecompressVram(gBattleTerrainAnimTiles_Rayquaza, (void *)(BG_CHAR_ADDR(1)));
LZDecompressVram(gBattleTerrainAnimTilemap_Rayquaza, (void *)(BG_SCREEN_ADDR(28)));
}
else
{
@ -1180,27 +1180,27 @@ void DrawBattleEntryBackground(void)
u8 trainerClass = gTrainers[gTrainerBattleOpponent_A].trainerClass;
if (trainerClass == TRAINER_CLASS_LEADER)
{
LZDecompressVram(gBattleTerrainAnimTiles_Building, (void*)(BG_CHAR_ADDR(1)));
LZDecompressVram(gBattleTerrainAnimTilemap_Building, (void*)(BG_SCREEN_ADDR(28)));
LZDecompressVram(gBattleTerrainAnimTiles_Building, (void *)(BG_CHAR_ADDR(1)));
LZDecompressVram(gBattleTerrainAnimTilemap_Building, (void *)(BG_SCREEN_ADDR(28)));
return;
}
else if (trainerClass == TRAINER_CLASS_CHAMPION)
{
LZDecompressVram(gBattleTerrainAnimTiles_Building, (void*)(BG_CHAR_ADDR(1)));
LZDecompressVram(gBattleTerrainAnimTilemap_Building, (void*)(BG_SCREEN_ADDR(28)));
LZDecompressVram(gBattleTerrainAnimTiles_Building, (void *)(BG_CHAR_ADDR(1)));
LZDecompressVram(gBattleTerrainAnimTilemap_Building, (void *)(BG_SCREEN_ADDR(28)));
return;
}
}
if (GetCurrentMapBattleScene() == MAP_BATTLE_SCENE_NORMAL)
{
LZDecompressVram(sBattleTerrainTable[gBattleTerrain].entryTileset, (void*)(BG_CHAR_ADDR(1)));
LZDecompressVram(sBattleTerrainTable[gBattleTerrain].entryTilemap, (void*)(BG_SCREEN_ADDR(28)));
LZDecompressVram(sBattleTerrainTable[gBattleTerrain].entryTileset, (void *)(BG_CHAR_ADDR(1)));
LZDecompressVram(sBattleTerrainTable[gBattleTerrain].entryTilemap, (void *)(BG_SCREEN_ADDR(28)));
}
else
{
LZDecompressVram(gBattleTerrainAnimTiles_Building, (void*)(BG_CHAR_ADDR(1)));
LZDecompressVram(gBattleTerrainAnimTilemap_Building, (void*)(BG_SCREEN_ADDR(28)));
LZDecompressVram(gBattleTerrainAnimTiles_Building, (void *)(BG_CHAR_ADDR(1)));
LZDecompressVram(gBattleTerrainAnimTilemap_Building, (void *)(BG_SCREEN_ADDR(28)));
}
}
}
@ -1212,7 +1212,7 @@ bool8 LoadChosenBattleElement(u8 caseId)
switch (caseId)
{
case 0:
LZDecompressVram(gBattleTextboxTiles, (void*)(BG_CHAR_ADDR(0)));
LZDecompressVram(gBattleTextboxTiles, (void *)(BG_CHAR_ADDR(0)));
break;
case 1:
CopyToBgTilemapBuffer(0, gBattleTextboxTilemap, 0, 0);
@ -1224,11 +1224,11 @@ bool8 LoadChosenBattleElement(u8 caseId)
case 3:
if (gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK | BATTLE_TYPE_EREADER_TRAINER))
{
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTiles_Building, (void *)(BG_CHAR_ADDR(2)));
}
else if (gBattleTypeFlags & BATTLE_TYPE_GROUDON)
{
LZDecompressVram(gBattleTerrainTiles_Cave, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTiles_Cave, (void *)(BG_CHAR_ADDR(2)));
}
else
{
@ -1237,12 +1237,12 @@ bool8 LoadChosenBattleElement(u8 caseId)
u8 trainerClass = gTrainers[gTrainerBattleOpponent_A].trainerClass;
if (trainerClass == TRAINER_CLASS_LEADER)
{
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTiles_Building, (void *)(BG_CHAR_ADDR(2)));
break;
}
else if (trainerClass == TRAINER_CLASS_CHAMPION)
{
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTiles_Stadium, (void *)(BG_CHAR_ADDR(2)));
break;
}
}
@ -1251,31 +1251,31 @@ bool8 LoadChosenBattleElement(u8 caseId)
{
default:
case MAP_BATTLE_SCENE_NORMAL:
LZDecompressVram(sBattleTerrainTable[gBattleTerrain].tileset, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(sBattleTerrainTable[gBattleTerrain].tileset, (void *)(BG_CHAR_ADDR(2)));
break;
case MAP_BATTLE_SCENE_GYM:
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTiles_Building, (void *)(BG_CHAR_ADDR(2)));
break;
case MAP_BATTLE_SCENE_MAGMA:
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTiles_Stadium, (void *)(BG_CHAR_ADDR(2)));
break;
case MAP_BATTLE_SCENE_AQUA:
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTiles_Stadium, (void *)(BG_CHAR_ADDR(2)));
break;
case MAP_BATTLE_SCENE_SIDNEY:
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTiles_Stadium, (void *)(BG_CHAR_ADDR(2)));
break;
case MAP_BATTLE_SCENE_PHOEBE:
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTiles_Stadium, (void *)(BG_CHAR_ADDR(2)));
break;
case MAP_BATTLE_SCENE_GLACIA:
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTiles_Stadium, (void *)(BG_CHAR_ADDR(2)));
break;
case MAP_BATTLE_SCENE_DRAKE:
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTiles_Stadium, (void *)(BG_CHAR_ADDR(2)));
break;
case MAP_BATTLE_SCENE_FRONTIER:
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTiles_Building, (void *)(BG_CHAR_ADDR(2)));
break;
}
}
@ -1283,14 +1283,14 @@ bool8 LoadChosenBattleElement(u8 caseId)
case 4:
if (gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK | BATTLE_TYPE_EREADER_TRAINER))
{
LZDecompressVram(gBattleTerrainTilemap_Building, (void*)(BG_SCREEN_ADDR(26)));
LZDecompressVram(gBattleTerrainTilemap_Building, (void *)(BG_SCREEN_ADDR(26)));
}
else if (gBattleTypeFlags & BATTLE_TYPE_KYOGRE_GROUDON)
{
if (gGameVersion == VERSION_RUBY)
LZDecompressVram(gBattleTerrainTilemap_Cave, (void*)(BG_SCREEN_ADDR(26)));
LZDecompressVram(gBattleTerrainTilemap_Cave, (void *)(BG_SCREEN_ADDR(26)));
else
LZDecompressVram(gBattleTerrainTilemap_Water, (void*)(BG_SCREEN_ADDR(26)));
LZDecompressVram(gBattleTerrainTilemap_Water, (void *)(BG_SCREEN_ADDR(26)));
}
else
{
@ -1299,12 +1299,12 @@ bool8 LoadChosenBattleElement(u8 caseId)
u8 trainerClass = gTrainers[gTrainerBattleOpponent_A].trainerClass;
if (trainerClass == TRAINER_CLASS_LEADER)
{
LZDecompressVram(gBattleTerrainTilemap_Building, (void*)(BG_SCREEN_ADDR(26)));
LZDecompressVram(gBattleTerrainTilemap_Building, (void *)(BG_SCREEN_ADDR(26)));
break;
}
else if (trainerClass == TRAINER_CLASS_CHAMPION)
{
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26)));
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void *)(BG_SCREEN_ADDR(26)));
break;
}
}
@ -1313,31 +1313,31 @@ bool8 LoadChosenBattleElement(u8 caseId)
{
default:
case MAP_BATTLE_SCENE_NORMAL:
LZDecompressVram(sBattleTerrainTable[gBattleTerrain].tilemap, (void*)(BG_SCREEN_ADDR(26)));
LZDecompressVram(sBattleTerrainTable[gBattleTerrain].tilemap, (void *)(BG_SCREEN_ADDR(26)));
break;
case MAP_BATTLE_SCENE_GYM:
LZDecompressVram(gBattleTerrainTilemap_Building, (void*)(BG_SCREEN_ADDR(26)));
LZDecompressVram(gBattleTerrainTilemap_Building, (void *)(BG_SCREEN_ADDR(26)));
break;
case MAP_BATTLE_SCENE_MAGMA:
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26)));
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void *)(BG_SCREEN_ADDR(26)));
break;
case MAP_BATTLE_SCENE_AQUA:
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26)));
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void *)(BG_SCREEN_ADDR(26)));
break;
case MAP_BATTLE_SCENE_SIDNEY:
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26)));
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void *)(BG_SCREEN_ADDR(26)));
break;
case MAP_BATTLE_SCENE_PHOEBE:
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26)));
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void *)(BG_SCREEN_ADDR(26)));
break;
case MAP_BATTLE_SCENE_GLACIA:
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26)));
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void *)(BG_SCREEN_ADDR(26)));
break;
case MAP_BATTLE_SCENE_DRAKE:
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26)));
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void *)(BG_SCREEN_ADDR(26)));
break;
case MAP_BATTLE_SCENE_FRONTIER:
LZDecompressVram(gBattleTerrainTilemap_Building, (void*)(BG_SCREEN_ADDR(26)));
LZDecompressVram(gBattleTerrainTilemap_Building, (void *)(BG_SCREEN_ADDR(26)));
break;
}
}

View File

@ -2473,7 +2473,7 @@ static void Swap_Task_HandleYesNo(u8 taskId)
gTasks[taskId].tSaidYes = TRUE;
hiPtr = gTasks[taskId].tFollowUpTaskPtrHi;
loPtr = gTasks[taskId].tFollowUpTaskPtrLo;
gTasks[taskId].func = (void*)((hiPtr << 16) | loPtr);
gTasks[taskId].func = (void *)((hiPtr << 16) | loPtr);
}
else
{
@ -2482,7 +2482,7 @@ static void Swap_Task_HandleYesNo(u8 taskId)
Swap_ErasePopupMenu(SWAP_WIN_YES_NO);
hiPtr = gTasks[taskId].tFollowUpTaskPtrHi;
loPtr = gTasks[taskId].tFollowUpTaskPtrLo;
gTasks[taskId].func = (void*)((hiPtr << 16) | loPtr);
gTasks[taskId].func = (void *)((hiPtr << 16) | loPtr);
}
}
else if (JOY_NEW(B_BUTTON))
@ -2492,7 +2492,7 @@ static void Swap_Task_HandleYesNo(u8 taskId)
Swap_ErasePopupMenu(SWAP_WIN_YES_NO);
hiPtr = gTasks[taskId].tFollowUpTaskPtrHi;
loPtr = gTasks[taskId].tFollowUpTaskPtrLo;
gTasks[taskId].func = (void*)((hiPtr << 16) | loPtr);
gTasks[taskId].func = (void *)((hiPtr << 16) | loPtr);
}
else if (JOY_REPEAT(DPAD_UP))
{

View File

@ -908,7 +908,7 @@ u8 CreateBattlerHealthboxSprites(u8 battlerId)
healthBarSpritePtr->subspriteMode = SUBSPRITES_IGNORE_PRIORITY;
healthBarSpritePtr->oam.priority = 1;
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_1), (void*)(OBJ_VRAM0 + healthBarSpritePtr->oam.tileNum * TILE_SIZE_4BPP), 64);
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_1), (void *)(OBJ_VRAM0 + healthBarSpritePtr->oam.tileNum * TILE_SIZE_4BPP), 64);
gSprites[healthboxLeftSpriteId].hMain_HealthBarSpriteId = healthbarSpriteId;
gSprites[healthboxLeftSpriteId].hMain_Battler = battlerId;
@ -1094,7 +1094,7 @@ static void UpdateLvlInHealthbox(u8 healthboxSpriteId, u8 lvl)
if (GetBattlerSide(gSprites[healthboxSpriteId].hMain_Battler) == B_SIDE_PLAYER)
{
objVram = (void*)(OBJ_VRAM0);
objVram = (void *)(OBJ_VRAM0);
if (!IsDoubleBattle())
objVram += spriteTileNum + 0x820;
else
@ -1102,7 +1102,7 @@ static void UpdateLvlInHealthbox(u8 healthboxSpriteId, u8 lvl)
}
else
{
objVram = (void*)(OBJ_VRAM0);
objVram = (void *)(OBJ_VRAM0);
objVram += spriteTileNum + 0x400;
}
TextIntoHealthboxObject(objVram, windowTileData, 3);
@ -1123,7 +1123,7 @@ void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent)
{
ConvertIntToDecimalStringN(text, value, STR_CONV_MODE_RIGHT_ALIGN, 3);
windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, 0, 5, 2, &windowId);
objVram = (void*)(OBJ_VRAM0);
objVram = (void *)(OBJ_VRAM0);
objVram += spriteTileNum + 0xB40;
HpTextIntoHealthboxObject(objVram, windowTileData, 2);
RemoveWindowOnHealthbox(windowId);
@ -1134,10 +1134,10 @@ void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent)
text[3] = CHAR_SLASH;
text[4] = EOS;
windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, 4, 5, 2, &windowId);
objVram = (void*)(OBJ_VRAM0);
objVram = (void *)(OBJ_VRAM0);
objVram += spriteTileNum + 0x3E0;
HpTextIntoHealthboxObject(objVram, windowTileData, 1);
objVram = (void*)(OBJ_VRAM0);
objVram = (void *)(OBJ_VRAM0);
objVram += spriteTileNum + 0xB00;
HpTextIntoHealthboxObject(objVram, windowTileData + 0x20, 2);
RemoveWindowOnHealthbox(windowId);
@ -1179,7 +1179,7 @@ void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent)
for (i = 0; i < 3; i++)
{
CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[i * 64 + 32],
(void*)((OBJ_VRAM0) + TILE_SIZE_4BPP * (gSprites[healthboxSpriteId].oam.tileNum + var + i)),
(void *)((OBJ_VRAM0) + TILE_SIZE_4BPP * (gSprites[healthboxSpriteId].oam.tileNum + var + i)),
0x20);
}
}
@ -1198,16 +1198,16 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8
if (gBattleSpritesDataPtr->battlerData[gSprites[healthboxSpriteId].data[6]].hpNumbersNoBars) // don't print text if only bars are visible
{
spriteTileNum = gSprites[gSprites[healthboxSpriteId].data[5]].oam.tileNum * TILE_SIZE_4BPP;
objVram = (void*)(OBJ_VRAM0) + spriteTileNum;
objVram = (void *)(OBJ_VRAM0) + spriteTileNum;
if (maxOrCurrent != HP_CURRENT) // doubles, max hp
{
ConvertIntToDecimalStringN(text, value, STR_CONV_MODE_RIGHT_ALIGN, 3);
windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, 0, 5, 0, &windowId);
HpTextIntoHealthboxObject((void*)(OBJ_VRAM0) + spriteTileNum + 0xC0, windowTileData, 2);
HpTextIntoHealthboxObject((void *)(OBJ_VRAM0) + spriteTileNum + 0xC0, windowTileData, 2);
RemoveWindowOnHealthbox(windowId);
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_FRAME_END),
(void*)(OBJ_VRAM0 + 0x680) + (gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP),
(void *)(OBJ_VRAM0 + 0x680) + (gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP),
0x20);
}
else
@ -1217,7 +1217,7 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8
text[4] = EOS;
windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, 4, 5, 0, &windowId);
FillHealthboxObject(objVram, 0, 3); // Erases HP bar leftover.
HpTextIntoHealthboxObject((void*)(OBJ_VRAM0 + 0x60) + spriteTileNum, windowTileData, 3);
HpTextIntoHealthboxObject((void *)(OBJ_VRAM0 + 0x60) + spriteTileNum, windowTileData, 3);
RemoveWindowOnHealthbox(windowId);
}
}
@ -1250,13 +1250,13 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8
if (i < 3)
{
CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[((i - var) * 64) + 32],
(void*)((OBJ_VRAM0) + 32 * (1 + gSprites[r7].oam.tileNum + i)),
(void *)((OBJ_VRAM0) + 32 * (1 + gSprites[r7].oam.tileNum + i)),
0x20);
}
else
{
CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[((i - var) * 64) + 32],
(void*)((OBJ_VRAM0 + 0x20) + 32 * (i + gSprites[r7].oam.tileNum)),
(void *)((OBJ_VRAM0 + 0x20) + 32 * (i + gSprites[r7].oam.tileNum)),
0x20);
}
}
@ -1264,16 +1264,16 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8
if (maxOrCurrent == HP_CURRENT)
{
CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[224],
(void*)((OBJ_VRAM0) + ((gSprites[r7].oam.tileNum + 4) * TILE_SIZE_4BPP)),
(void *)((OBJ_VRAM0) + ((gSprites[r7].oam.tileNum + 4) * TILE_SIZE_4BPP)),
0x20);
CpuFill32(0, (void*)((OBJ_VRAM0) + (gSprites[r7].oam.tileNum * TILE_SIZE_4BPP)), 0x20);
CpuFill32(0, (void *)((OBJ_VRAM0) + (gSprites[r7].oam.tileNum * TILE_SIZE_4BPP)), 0x20);
}
else
{
if (GetBattlerSide(battlerId) == B_SIDE_PLAYER) // Impossible to reach part, because the battlerId is from the opponent's side.
{
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_FRAME_END),
(void*)(OBJ_VRAM0) + ((gSprites[healthboxSpriteId].oam.tileNum + 52) * TILE_SIZE_4BPP),
(void *)(OBJ_VRAM0) + ((gSprites[healthboxSpriteId].oam.tileNum + 52) * TILE_SIZE_4BPP),
0x20);
}
}
@ -1313,11 +1313,11 @@ static void PrintSafariMonInfo(u8 healthboxSpriteId, struct Pokemon *mon)
for (j = 1; j < var + 1; j++)
{
spriteTileNum = (gSprites[healthboxSpriteId].oam.tileNum + (j - (j / 8 * 8)) + (j / 8 * 64)) * TILE_SIZE_4BPP;
CpuCopy32(barFontGfx, (void*)(OBJ_VRAM0) + (spriteTileNum), 0x20);
CpuCopy32(barFontGfx, (void *)(OBJ_VRAM0) + (spriteTileNum), 0x20);
barFontGfx += 0x20;
spriteTileNum = (8 + gSprites[healthboxSpriteId].oam.tileNum + (j - (j / 8 * 8)) + (j / 8 * 64)) * TILE_SIZE_4BPP;
CpuCopy32(barFontGfx, (void*)(OBJ_VRAM0) + (spriteTileNum), 0x20);
CpuCopy32(barFontGfx, (void *)(OBJ_VRAM0) + (spriteTileNum), 0x20);
barFontGfx += 0x20;
}
@ -1334,13 +1334,13 @@ static void PrintSafariMonInfo(u8 healthboxSpriteId, struct Pokemon *mon)
if (j <= 1)
{
CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[0x40 * j + 0x20],
(void*)(OBJ_VRAM0) + (gSprites[healthBarSpriteId].oam.tileNum + 2 + j) * TILE_SIZE_4BPP,
(void *)(OBJ_VRAM0) + (gSprites[healthBarSpriteId].oam.tileNum + 2 + j) * TILE_SIZE_4BPP,
32);
}
else
{
CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[0x40 * j + 0x20],
(void*)(OBJ_VRAM0 + 0xC0) + (j + gSprites[healthBarSpriteId].oam.tileNum) * TILE_SIZE_4BPP,
(void *)(OBJ_VRAM0 + 0xC0) + (j + gSprites[healthBarSpriteId].oam.tileNum) * TILE_SIZE_4BPP,
32);
}
}
@ -1372,7 +1372,7 @@ void SwapHpBarsWithHpText(void)
{
healthBarSpriteId = gSprites[gHealthboxSpriteIds[i]].hMain_HealthBarSpriteId;
CpuFill32(0, (void*)(OBJ_VRAM0 + gSprites[healthBarSpriteId].oam.tileNum * TILE_SIZE_4BPP), 0x100);
CpuFill32(0, (void *)(OBJ_VRAM0 + gSprites[healthBarSpriteId].oam.tileNum * TILE_SIZE_4BPP), 0x100);
UpdateHpTextInHealthboxInDoubles(gHealthboxSpriteIds[i], GetMonData(&gPlayerParty[gBattlerPartyIndexes[i]], MON_DATA_HP), HP_CURRENT);
UpdateHpTextInHealthboxInDoubles(gHealthboxSpriteIds[i], GetMonData(&gPlayerParty[gBattlerPartyIndexes[i]], MON_DATA_MAX_HP), HP_MAX);
}
@ -1380,7 +1380,7 @@ void SwapHpBarsWithHpText(void)
{
UpdateStatusIconInHealthbox(gHealthboxSpriteIds[i]);
UpdateHealthboxAttribute(gHealthboxSpriteIds[i], &gPlayerParty[gBattlerPartyIndexes[i]], HEALTHBOX_HEALTH_BAR);
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_FRAME_END_BAR), (void*)(OBJ_VRAM0 + 0x680 + gSprites[gHealthboxSpriteIds[i]].oam.tileNum * TILE_SIZE_4BPP), 32);
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_FRAME_END_BAR), (void *)(OBJ_VRAM0 + 0x680 + gSprites[gHealthboxSpriteIds[i]].oam.tileNum * TILE_SIZE_4BPP), 32);
}
}
else
@ -1924,8 +1924,8 @@ static void UpdateNickInHealthbox(u8 healthboxSpriteId, struct Pokemon *mon)
if (GetBattlerSide(gSprites[healthboxSpriteId].data[6]) == B_SIDE_PLAYER)
{
TextIntoHealthboxObject((void*)(OBJ_VRAM0 + 0x40 + spriteTileNum), windowTileData, 6);
ptr = (void*)(OBJ_VRAM0);
TextIntoHealthboxObject((void *)(OBJ_VRAM0 + 0x40 + spriteTileNum), windowTileData, 6);
ptr = (void *)(OBJ_VRAM0);
if (!IsDoubleBattle())
ptr += spriteTileNum + 0x800;
else
@ -1934,7 +1934,7 @@ static void UpdateNickInHealthbox(u8 healthboxSpriteId, struct Pokemon *mon)
}
else
{
TextIntoHealthboxObject((void*)(OBJ_VRAM0 + 0x20 + spriteTileNum), windowTileData, 7);
TextIntoHealthboxObject((void *)(OBJ_VRAM0 + 0x20 + spriteTileNum), windowTileData, 7);
}
RemoveWindowOnHealthbox(windowId);
@ -1958,9 +1958,9 @@ static void TryAddPokeballIconToHealthbox(u8 healthboxSpriteId, bool8 noStatus)
healthBarSpriteId = gSprites[healthboxSpriteId].hMain_HealthBarSpriteId;
if (noStatus)
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_STATUS_BALL_CAUGHT), (void*)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 8) * TILE_SIZE_4BPP), 32);
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_STATUS_BALL_CAUGHT), (void *)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 8) * TILE_SIZE_4BPP), 32);
else
CpuFill32(0, (void*)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 8) * TILE_SIZE_4BPP), 32);
CpuFill32(0, (void *)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 8) * TILE_SIZE_4BPP), 32);
}
static void UpdateStatusIconInHealthbox(u8 healthboxSpriteId)
@ -2018,7 +2018,7 @@ static void UpdateStatusIconInHealthbox(u8 healthboxSpriteId)
statusGfxPtr = GetHealthboxElementGfxPtr(HEALTHBOX_GFX_39);
for (i = 0; i < 3; i++)
CpuCopy32(statusGfxPtr, (void*)(OBJ_VRAM0 + (gSprites[healthboxSpriteId].oam.tileNum + tileNumAdder + i) * TILE_SIZE_4BPP), 32);
CpuCopy32(statusGfxPtr, (void *)(OBJ_VRAM0 + (gSprites[healthboxSpriteId].oam.tileNum + tileNumAdder + i) * TILE_SIZE_4BPP), 32);
if (!gBattleSpritesDataPtr->battlerData[battlerId].hpNumbersNoBars)
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_1), (void *)(OBJ_VRAM0 + gSprites[healthBarSpriteId].oam.tileNum * TILE_SIZE_4BPP), 64);
@ -2031,14 +2031,14 @@ static void UpdateStatusIconInHealthbox(u8 healthboxSpriteId)
pltAdder += battlerId + 12;
FillPalette(sStatusIconColors[statusPalId], pltAdder + 0x100, 2);
CpuCopy16(gPlttBufferUnfaded + 0x100 + pltAdder, (void*)(OBJ_PLTT + pltAdder * 2), 2);
CpuCopy32(statusGfxPtr, (void*)(OBJ_VRAM0 + (gSprites[healthboxSpriteId].oam.tileNum + tileNumAdder) * TILE_SIZE_4BPP), 96);
CpuCopy16(gPlttBufferUnfaded + 0x100 + pltAdder, (void *)(OBJ_PLTT + pltAdder * 2), 2);
CpuCopy32(statusGfxPtr, (void *)(OBJ_VRAM0 + (gSprites[healthboxSpriteId].oam.tileNum + tileNumAdder) * TILE_SIZE_4BPP), 96);
if (IsDoubleBattle() == TRUE || GetBattlerSide(battlerId) == B_SIDE_OPPONENT)
{
if (!gBattleSpritesDataPtr->battlerData[battlerId].hpNumbersNoBars)
{
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_0), (void*)(OBJ_VRAM0 + gSprites[healthBarSpriteId].oam.tileNum * TILE_SIZE_4BPP), 32);
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_65), (void*)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 1) * TILE_SIZE_4BPP), 32);
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_0), (void *)(OBJ_VRAM0 + gSprites[healthBarSpriteId].oam.tileNum * TILE_SIZE_4BPP), 32);
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_65), (void *)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 1) * TILE_SIZE_4BPP), 32);
}
}
TryAddPokeballIconToHealthbox(healthboxSpriteId, FALSE);
@ -2111,8 +2111,8 @@ static void UpdateSafariBallsTextOnHealthbox(u8 healthboxSpriteId)
windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(gText_SafariBalls, 0, 3, 2, &windowId);
spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP;
TextIntoHealthboxObject((void*)(OBJ_VRAM0 + 0x40) + spriteTileNum, windowTileData, 6);
TextIntoHealthboxObject((void*)(OBJ_VRAM0 + 0x800) + spriteTileNum, windowTileData + 0xC0, 2);
TextIntoHealthboxObject((void *)(OBJ_VRAM0 + 0x40) + spriteTileNum, windowTileData, 6);
TextIntoHealthboxObject((void *)(OBJ_VRAM0 + 0x800) + spriteTileNum, windowTileData + 0xC0, 2);
RemoveWindowOnHealthbox(windowId);
}
@ -2128,8 +2128,8 @@ static void UpdateLeftNoOfBallsTextOnHealthbox(u8 healthboxSpriteId)
windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, GetStringRightAlignXOffset(FONT_SMALL, text, 0x2F), 3, 2, &windowId);
spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP;
SafariTextIntoHealthboxObject((void*)(OBJ_VRAM0 + 0x2C0) + spriteTileNum, windowTileData, 2);
SafariTextIntoHealthboxObject((void*)(OBJ_VRAM0 + 0xA00) + spriteTileNum, windowTileData + 0x40, 4);
SafariTextIntoHealthboxObject((void *)(OBJ_VRAM0 + 0x2C0) + spriteTileNum, windowTileData, 2);
SafariTextIntoHealthboxObject((void *)(OBJ_VRAM0 + 0xA00) + spriteTileNum, windowTileData + 0x40, 4);
RemoveWindowOnHealthbox(windowId);
}
@ -2273,10 +2273,10 @@ static void MoveBattleBarGraphically(u8 battlerId, u8 whichBar)
u8 healthbarSpriteId = gSprites[gBattleSpritesDataPtr->battleBars[battlerId].healthboxSpriteId].hMain_HealthBarSpriteId;
if (i < 2)
CpuCopy32(GetHealthboxElementGfxPtr(barElementId) + array[i] * 32,
(void*)(OBJ_VRAM0 + (gSprites[healthbarSpriteId].oam.tileNum + 2 + i) * TILE_SIZE_4BPP), 32);
(void *)(OBJ_VRAM0 + (gSprites[healthbarSpriteId].oam.tileNum + 2 + i) * TILE_SIZE_4BPP), 32);
else
CpuCopy32(GetHealthboxElementGfxPtr(barElementId) + array[i] * 32,
(void*)(OBJ_VRAM0 + 64 + (i + gSprites[healthbarSpriteId].oam.tileNum) * TILE_SIZE_4BPP), 32);
(void *)(OBJ_VRAM0 + 64 + (i + gSprites[healthbarSpriteId].oam.tileNum) * TILE_SIZE_4BPP), 32);
}
break;
case EXP_BAR:
@ -2295,10 +2295,10 @@ static void MoveBattleBarGraphically(u8 battlerId, u8 whichBar)
{
if (i < 4)
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_12) + array[i] * 32,
(void*)(OBJ_VRAM0 + (gSprites[gBattleSpritesDataPtr->battleBars[battlerId].healthboxSpriteId].oam.tileNum + 0x24 + i) * TILE_SIZE_4BPP), 32);
(void *)(OBJ_VRAM0 + (gSprites[gBattleSpritesDataPtr->battleBars[battlerId].healthboxSpriteId].oam.tileNum + 0x24 + i) * TILE_SIZE_4BPP), 32);
else
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_12) + array[i] * 32,
(void*)(OBJ_VRAM0 + 0xB80 + (i + gSprites[gBattleSpritesDataPtr->battleBars[battlerId].healthboxSpriteId].oam.tileNum) * TILE_SIZE_4BPP), 32);
(void *)(OBJ_VRAM0 + 0xB80 + (i + gSprites[gBattleSpritesDataPtr->battleBars[battlerId].healthboxSpriteId].oam.tileNum) * TILE_SIZE_4BPP), 32);
}
break;
}

View File

@ -606,7 +606,7 @@ static void CB2_InitBattleInternal(void)
SetHBlankCallback(NULL);
SetVBlankCallback(NULL);
CpuFill32(0, (void*)(VRAM), VRAM_SIZE);
CpuFill32(0, (void *)(VRAM), VRAM_SIZE);
SetGpuReg(REG_OFFSET_MOSAIC, 0);
SetGpuReg(REG_OFFSET_WIN0H, DISPLAY_WIDTH);
@ -2178,7 +2178,7 @@ void CB2_InitEndLinkBattle(void)
}
else
{
CpuFill32(0, (void*)(VRAM), VRAM_SIZE);
CpuFill32(0, (void *)(VRAM), VRAM_SIZE);
SetGpuReg(REG_OFFSET_MOSAIC, 0);
SetGpuReg(REG_OFFSET_WIN0H, DISPLAY_WIDTH);
SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(DISPLAY_HEIGHT / 2, DISPLAY_HEIGHT / 2 + 1));
@ -2319,7 +2319,7 @@ static void EndLinkBattleInSteps(void)
}
break;
case 3:
CpuFill32(0, (void*)VRAM, VRAM_SIZE);
CpuFill32(0, (void *)VRAM, VRAM_SIZE);
for (i = 0; i < 2; i++)
LoadChosenBattleElement(i);
@ -2406,7 +2406,7 @@ static void CB2_InitAskRecordBattle(void)
SetHBlankCallback(NULL);
SetVBlankCallback(NULL);
CpuFill32(0, (void*)(VRAM), VRAM_SIZE);
CpuFill32(0, (void *)(VRAM), VRAM_SIZE);
ResetPaletteFade();
gBattle_BG0_X = 0;
gBattle_BG0_Y = 0;

View File

@ -388,7 +388,7 @@ static void RemoveTrainerHillRecordsWindow(u8 windowId)
static void ClearVramOamPlttRegs(void)
{
DmaClearLarge16(3, (void*)(VRAM), VRAM_SIZE, 0x1000);
DmaClearLarge16(3, (void *)(VRAM), VRAM_SIZE, 0x1000);
DmaClear32(3, OAM, OAM_SIZE);
DmaClear16(3, PLTT, PLTT_SIZE);

View File

@ -7963,7 +7963,7 @@ static void Cmd_painsplitdmgcalc(void)
{
s32 hpDiff = (gBattleMons[gBattlerAttacker].hp + gBattleMons[gBattlerTarget].hp) / 2;
s32 painSplitHp = gBattleMoveDamage = gBattleMons[gBattlerTarget].hp - hpDiff;
u8 *storeLoc = (void*)(&gBattleScripting.painSplitHp);
u8 *storeLoc = (void *)(&gBattleScripting.painSplitHp);
storeLoc[0] = (painSplitHp);
storeLoc[1] = (painSplitHp & 0x0000FF00) >> 8;

View File

@ -600,7 +600,7 @@ void StartRegiBattle(void)
static void CB2_EndWildBattle(void)
{
CpuFill16(0, (void*)(BG_PLTT), BG_PLTT_SIZE);
CpuFill16(0, (void *)(BG_PLTT), BG_PLTT_SIZE);
ResetOamRange(0, 128);
if (IsPlayerDefeated(gBattleOutcome) == TRUE && !InBattlePyramid() && !InBattlePike())
@ -616,7 +616,7 @@ static void CB2_EndWildBattle(void)
static void CB2_EndScriptedWildBattle(void)
{
CpuFill16(0, (void*)(BG_PLTT), BG_PLTT_SIZE);
CpuFill16(0, (void *)(BG_PLTT), BG_PLTT_SIZE);
ResetOamRange(0, 128);
if (IsPlayerDefeated(gBattleOutcome) == TRUE)
@ -1050,9 +1050,9 @@ static inline void SetU32(void *ptr, u32 value)
*(u32 *)(ptr) = value;
}
static inline void SetPtr(const void *ptr, const void* value)
static inline void SetPtr(const void *ptr, const void *value)
{
*(const void**)(ptr) = value;
*(const void **)(ptr) = value;
}
static void TrainerBattleLoadArgs(const struct TrainerBattleParameter *specs, const u8 *data)

View File

@ -874,7 +874,7 @@ static const struct DigitObjUtilTemplate sDigitObjTemplates[] =
.xDelta = 8,
.x = 156,
.y = 0,
.spriteSheet = (void*) &sSpriteSheets[3],
.spriteSheet = (void *) &sSpriteSheets[3],
.spritePal = &sSpritePals[2],
},
{ // Seconds
@ -886,7 +886,7 @@ static const struct DigitObjUtilTemplate sDigitObjTemplates[] =
.xDelta = 8,
.x = 180,
.y = 0,
.spriteSheet = (void*) &sSpriteSheets[3],
.spriteSheet = (void *) &sSpriteSheets[3],
.spritePal = &sSpritePals[2],
},
{ // 1/60ths of a second
@ -898,7 +898,7 @@ static const struct DigitObjUtilTemplate sDigitObjTemplates[] =
.xDelta = 8,
.x = 204,
.y = 0,
.spriteSheet = (void*) &sSpriteSheets[3],
.spriteSheet = (void *) &sSpriteSheets[3],
.spritePal = &sSpritePals[2],
}
};

View File

@ -1196,7 +1196,7 @@ static s32 DrawResultsTextWindow(const u8 *text, u8 spriteId)
spriteTilePtrs[0] = (u8 *)(sprite->oam.tileNum * 32 + OBJ_VRAM0);
for (i = 1; i < (int)ARRAY_COUNT(spriteTilePtrs); i++)
spriteTilePtrs[i] = (void*)(gSprites[sprite->data[i - 1]].oam.tileNum * 32 + OBJ_VRAM0);
spriteTilePtrs[i] = (void *)(gSprites[sprite->data[i - 1]].oam.tileNum * 32 + OBJ_VRAM0);
for (i = 0; i < (int)ARRAY_COUNT(spriteTilePtrs); i++)
CpuFill32(0, spriteTilePtrs[i], 0x400);

View File

@ -46,7 +46,7 @@ void LoadCompressedSpritePalette(const struct CompressedSpritePalette *src)
struct SpritePalette dest;
LZ77UnCompWram(src->data, gDecompressionBuffer);
dest.data = (void*) gDecompressionBuffer;
dest.data = (void *) gDecompressionBuffer;
dest.tag = src->tag;
LoadSpritePalette(&dest);
}
@ -61,7 +61,7 @@ void LoadCompressedSpritePaletteOverrideBuffer(const struct CompressedSpritePale
LoadSpritePalette(&dest);
}
void DecompressPicFromTable(const struct CompressedSpriteSheet *src, void* buffer, s32 species)
void DecompressPicFromTable(const struct CompressedSpriteSheet *src, void *buffer, s32 species)
{
if (species > NUM_SPECIES)
LZ77UnCompWram(gMonFrontPicTable[0].data, buffer);
@ -266,7 +266,7 @@ u32 GetDecompressedDataSize(const u32 *ptr)
bool8 LoadCompressedSpriteSheetUsingHeap(const struct CompressedSpriteSheet* src)
{
struct SpriteSheet dest;
void* buffer;
void *buffer;
buffer = AllocZeroed(*((u32 *)(&src->data[0])) >> 8);
LZ77UnCompWram(src->data, buffer);
@ -283,7 +283,7 @@ bool8 LoadCompressedSpriteSheetUsingHeap(const struct CompressedSpriteSheet* src
bool8 LoadCompressedSpritePaletteUsingHeap(const struct CompressedSpritePalette *src)
{
struct SpritePalette dest;
void* buffer;
void *buffer;
buffer = AllocZeroed(*((u32 *)(&src->data[0])) >> 8);
LZ77UnCompWram(src->data, buffer);
@ -295,7 +295,7 @@ bool8 LoadCompressedSpritePaletteUsingHeap(const struct CompressedSpritePalette
return FALSE;
}
void DecompressPicFromTable_2(const struct CompressedSpriteSheet *src, void* buffer, s32 species) // a copy of DecompressPicFromTable
void DecompressPicFromTable_2(const struct CompressedSpriteSheet *src, void *buffer, s32 species) // a copy of DecompressPicFromTable
{
if (species > NUM_SPECIES)
LZ77UnCompWram(gMonFrontPicTable[0].data, buffer);
@ -342,7 +342,7 @@ void HandleLoadSpecialPokePic_2(const struct CompressedSpriteSheet *src, void *d
LoadSpecialPokePic_2(src, dest, species, personality, isFrontPic);
}
void DecompressPicFromTable_DontHandleDeoxys(const struct CompressedSpriteSheet *src, void* buffer, s32 species)
void DecompressPicFromTable_DontHandleDeoxys(const struct CompressedSpriteSheet *src, void *buffer, s32 species)
{
if (species > NUM_SPECIES)
LZ77UnCompWram(gMonFrontPicTable[0].data, buffer);

View File

@ -216,7 +216,7 @@ void EvolutionScene(struct Pokemon* mon, u16 postEvoSpecies, bool8 canStopEvo, u
SetHBlankCallback(NULL);
SetVBlankCallback(NULL);
CpuFill32(0, (void*)(VRAM), VRAM_SIZE);
CpuFill32(0, (void *)(VRAM), VRAM_SIZE);
SetGpuReg(REG_OFFSET_MOSAIC, 0);
SetGpuReg(REG_OFFSET_WIN0H, 0);
@ -322,7 +322,7 @@ static void CB2_EvolutionSceneLoadGraphics(void)
SetHBlankCallback(NULL);
SetVBlankCallback(NULL);
CpuFill32(0, (void*)(VRAM), VRAM_SIZE);
CpuFill32(0, (void *)(VRAM), VRAM_SIZE);
SetGpuReg(REG_OFFSET_MOSAIC, 0);
SetGpuReg(REG_OFFSET_WIN0H, 0);
@ -761,7 +761,7 @@ static void Task_EvolutionScene(u8 taskId)
BattlePutTextOnWindow(gStringVar4, B_WIN_MSG);
PlayBGM(MUS_EVOLVED);
gTasks[taskId].tState++;
SetMonData(mon, MON_DATA_SPECIES, (void*)(&gTasks[taskId].tPostEvoSpecies));
SetMonData(mon, MON_DATA_SPECIES, (void *)(&gTasks[taskId].tPostEvoSpecies));
CalculateMonStats(mon);
EvolutionRenameMon(mon, gTasks[taskId].tPreEvoSpecies, gTasks[taskId].tPostEvoSpecies);
GetSetPokedexFlag(SpeciesToNationalPokedexNum(gTasks[taskId].tPostEvoSpecies), FLAG_SET_SEEN);

View File

@ -2947,7 +2947,7 @@ static void Debug_PrintStatus(void)
if ((gRfuLinkStatus->getNameFlag >> i) & 1)
{
Debug_PrintNum(gRfuLinkStatus->partner[i].serialNo, 1, i + 3, 4);
Debug_PrintString((void*)gRfuLinkStatus->partner[i].gname, 6, i + 3);
Debug_PrintString((void *)gRfuLinkStatus->partner[i].gname, 6, i + 3);
Debug_PrintString(gRfuLinkStatus->partner[i].uname, 22, i + 3);
}
}
@ -2967,7 +2967,7 @@ static void Debug_PrintStatus(void)
Debug_PrintString(sASCII_8Spaces, 22, i + 3);
}
Debug_PrintNum(gRfuLinkStatus->partner[gRfu.childSlot].serialNo, 1, 3, 4);
Debug_PrintString((void*)gRfuLinkStatus->partner[gRfu.childSlot].gname, 6, 3);
Debug_PrintString((void *)gRfuLinkStatus->partner[gRfu.childSlot].gname, 6, 3);
Debug_PrintString(gRfuLinkStatus->partner[gRfu.childSlot].uname, 22, 3);
}
else

View File

@ -408,7 +408,7 @@ u8 ListMenuInitInRect(struct ListMenuTemplate *listMenuTemplate, struct ListMenu
s32 ListMenu_ProcessInput(u8 listTaskId)
{
struct ListMenu *list = (void*) gTasks[listTaskId].data;
struct ListMenu *list = (void *) gTasks[listTaskId].data;
if (JOY_NEW(A_BUTTON))
{
@ -469,7 +469,7 @@ s32 ListMenu_ProcessInput(u8 listTaskId)
void DestroyListMenuTask(u8 listTaskId, u16 *scrollOffset, u16 *selectedRow)
{
struct ListMenu *list = (void*) gTasks[listTaskId].data;
struct ListMenu *list = (void *) gTasks[listTaskId].data;
if (scrollOffset != NULL)
*scrollOffset = list->scrollOffset;
@ -484,7 +484,7 @@ void DestroyListMenuTask(u8 listTaskId, u16 *scrollOffset, u16 *selectedRow)
void RedrawListMenu(u8 listTaskId)
{
struct ListMenu *list = (void*) gTasks[listTaskId].data;
struct ListMenu *list = (void *) gTasks[listTaskId].data;
FillWindowPixelBuffer(list->template.windowId, PIXEL_FILL(list->template.fillValue));
ListMenuPrintEntries(list, list->scrollOffset, 0, list->template.maxShowed);
@ -495,7 +495,7 @@ void RedrawListMenu(u8 listTaskId)
// unused
void ChangeListMenuPals(u8 listTaskId, u8 cursorPal, u8 fillValue, u8 cursorShadowPal)
{
struct ListMenu *list = (void*) gTasks[listTaskId].data;
struct ListMenu *list = (void *) gTasks[listTaskId].data;
list->template.cursorPal = cursorPal;
list->template.fillValue = fillValue;
@ -505,7 +505,7 @@ void ChangeListMenuPals(u8 listTaskId, u8 cursorPal, u8 fillValue, u8 cursorShad
// unused
void ChangeListMenuCoords(u8 listTaskId, u8 x, u8 y)
{
struct ListMenu *list = (void*) gTasks[listTaskId].data;
struct ListMenu *list = (void *) gTasks[listTaskId].data;
SetWindowAttribute(list->template.windowId, WINDOW_TILEMAP_LEFT, x);
SetWindowAttribute(list->template.windowId, WINDOW_TILEMAP_TOP, y);
@ -537,7 +537,7 @@ s32 ListMenuTestInput(struct ListMenuTemplate *template, u32 scrollOffset, u32 s
void ListMenuGetCurrentItemArrayId(u8 listTaskId, u16 *arrayId)
{
struct ListMenu *list = (void*) gTasks[listTaskId].data;
struct ListMenu *list = (void *) gTasks[listTaskId].data;
if (arrayId != NULL)
*arrayId = list->scrollOffset + list->selectedRow;
@ -545,7 +545,7 @@ void ListMenuGetCurrentItemArrayId(u8 listTaskId, u16 *arrayId)
void ListMenuGetScrollAndRow(u8 listTaskId, u16 *scrollOffset, u16 *selectedRow)
{
struct ListMenu *list = (void*) gTasks[listTaskId].data;
struct ListMenu *list = (void *) gTasks[listTaskId].data;
if (scrollOffset != NULL)
*scrollOffset = list->scrollOffset;
@ -555,7 +555,7 @@ void ListMenuGetScrollAndRow(u8 listTaskId, u16 *scrollOffset, u16 *selectedRow)
u16 ListMenuGetYCoordForPrintingArrowCursor(u8 listTaskId)
{
struct ListMenu *list = (void*) gTasks[listTaskId].data;
struct ListMenu *list = (void *) gTasks[listTaskId].data;
u8 yMultiplier = GetFontAttribute(list->template.fontId, FONTATTR_MAX_LETTER_HEIGHT) + list->template.itemVerticalPadding;
return list->selectedRow * yMultiplier + list->template.upText_Y;
@ -564,7 +564,7 @@ u16 ListMenuGetYCoordForPrintingArrowCursor(u8 listTaskId)
static u8 ListMenuInitInternal(struct ListMenuTemplate *listMenuTemplate, u16 scrollOffset, u16 selectedRow)
{
u8 listTaskId = CreateTask(ListMenuDummyTask, 0);
struct ListMenu *list = (void*) gTasks[listTaskId].data;
struct ListMenu *list = (void *) gTasks[listTaskId].data;
list->template = *listMenuTemplate;
list->scrollOffset = scrollOffset;
@ -902,7 +902,7 @@ void ListMenuDefaultCursorMoveFunc(s32 itemIndex, bool8 onInit, struct ListMenu
// unused
s32 ListMenuGetUnkIndicatorsStructFields(u8 taskId, u8 field)
{
struct UnkIndicatorsStruct *data = (void*) gTasks[taskId].data;
struct UnkIndicatorsStruct *data = (void *) gTasks[taskId].data;
switch (field)
{
@ -946,13 +946,13 @@ s32 ListMenuGetUnkIndicatorsStructFields(u8 taskId, u8 field)
void ListMenuSetUnkIndicatorsStructField(u8 taskId, u8 field, s32 value)
{
struct UnkIndicatorsStruct *data = (void*) &gTasks[taskId].data;
struct UnkIndicatorsStruct *data = (void *) &gTasks[taskId].data;
switch (field)
{
case 0:
case 1:
data->field_4 = (void*)(value);
data->field_4 = (void *)(value);
break;
case 2:
data->field_C = value;
@ -1088,7 +1088,7 @@ u8 AddScrollIndicatorArrowPair(const struct ScrollArrowsTemplate *arrowInfo, u16
}
taskId = CreateTask(Task_ScrollIndicatorArrowPair, 0);
data = (void*) gTasks[taskId].data;
data = (void *) gTasks[taskId].data;
data->field_0 = 0;
data->scrollOffset = scrollOffset;
@ -1140,7 +1140,7 @@ u8 AddScrollIndicatorArrowPairParameterized(u32 arrowType, s32 commonPos, s32 fi
static void Task_ScrollIndicatorArrowPair(u8 taskId)
{
struct ScrollIndicatorPair *data = (void*) gTasks[taskId].data;
struct ScrollIndicatorPair *data = (void *) gTasks[taskId].data;
u16 currItem = (*data->scrollOffset);
if (currItem == data->fullyUpThreshold && currItem != 0xFFFF)
@ -1159,7 +1159,7 @@ static void Task_ScrollIndicatorArrowPair(u8 taskId)
void Task_ScrollIndicatorArrowPairOnMainMenu(u8 taskId)
{
s16 *data = gTasks[taskId].data;
struct ScrollIndicatorPair *scrollData = (void*) data;
struct ScrollIndicatorPair *scrollData = (void *) data;
if (tIsScrolled)
{
@ -1177,7 +1177,7 @@ void Task_ScrollIndicatorArrowPairOnMainMenu(u8 taskId)
void RemoveScrollIndicatorArrowPair(u8 taskId)
{
struct ScrollIndicatorPair *data = (void*) gTasks[taskId].data;
struct ScrollIndicatorPair *data = (void *) gTasks[taskId].data;
if (data->tileTag != TAG_NONE)
FreeSpriteTilesByTag(data->tileTag);
@ -1334,7 +1334,7 @@ static u8 ListMenuAddRedOutlineCursorObject(struct CursorStruct *cursor)
}
taskId = CreateTask(Task_RedOutlineCursor, 0);
data = (void*) gTasks[taskId].data;
data = (void *) gTasks[taskId].data;
data->tileTag = cursor->tileTag;
data->palTag = cursor->palTag;
@ -1362,7 +1362,7 @@ static u8 ListMenuAddRedOutlineCursorObject(struct CursorStruct *cursor)
static void ListMenuUpdateRedOutlineCursorObject(u8 taskId, u16 x, u16 y)
{
struct RedOutlineCursor *data = (void*) gTasks[taskId].data;
struct RedOutlineCursor *data = (void *) gTasks[taskId].data;
gSprites[data->spriteId].x = x + 120;
gSprites[data->spriteId].y = y + 120;
@ -1370,7 +1370,7 @@ static void ListMenuUpdateRedOutlineCursorObject(u8 taskId, u16 x, u16 y)
static void ListMenuRemoveRedOutlineCursorObject(u8 taskId)
{
struct RedOutlineCursor *data = (void*) gTasks[taskId].data;
struct RedOutlineCursor *data = (void *) gTasks[taskId].data;
Free(data->subspritesPtr);
@ -1419,7 +1419,7 @@ static u8 ListMenuAddRedArrowCursorObject(struct CursorStruct *cursor)
}
taskId = CreateTask(Task_RedArrowCursor, 0);
data = (void*) gTasks[taskId].data;
data = (void *) gTasks[taskId].data;
data->tileTag = cursor->tileTag;
data->palTag = cursor->palTag;
@ -1442,7 +1442,7 @@ static u8 ListMenuAddRedArrowCursorObject(struct CursorStruct *cursor)
static void ListMenuUpdateRedArrowCursorObject(u8 taskId, u16 x, u16 y)
{
struct RedArrowCursor *data = (void*) gTasks[taskId].data;
struct RedArrowCursor *data = (void *) gTasks[taskId].data;
gSprites[data->spriteId].x = x;
gSprites[data->spriteId].y = y;
@ -1450,7 +1450,7 @@ static void ListMenuUpdateRedArrowCursorObject(u8 taskId, u16 x, u16 y)
static void ListMenuRemoveRedArrowCursorObject(u8 taskId)
{
struct RedArrowCursor *data = (void*) gTasks[taskId].data;
struct RedArrowCursor *data = (void *) gTasks[taskId].data;
if (data->tileTag != TAG_NONE)
FreeSpriteTilesByTag(data->tileTag);

View File

@ -73,9 +73,9 @@ void SetSaveBlocksPointers(u16 offset)
offset = (offset + Random()) & (SAVEBLOCK_MOVE_RANGE - 4);
gSaveBlock2Ptr = (void*)(&gSaveblock2) + offset;
*sav1_LocalVar = (void*)(&gSaveblock1) + offset;
gPokemonStoragePtr = (void*)(&gPokemonStorage) + offset;
gSaveBlock2Ptr = (void *)(&gSaveblock2) + offset;
*sav1_LocalVar = (void *)(&gSaveblock1) + offset;
gPokemonStoragePtr = (void *)(&gPokemonStorage) + offset;
SetBagItemsPointers();
SetDecorationInventoriesPointers();

View File

@ -1272,8 +1272,8 @@ static void Task_NewGameBirchSpeech_Init(u8 taskId)
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
SetGpuReg(REG_OFFSET_BLDY, 0);
LZ77UnCompVram(sBirchSpeechShadowGfx, (void*)VRAM);
LZ77UnCompVram(sBirchSpeechBgMap, (void*)(BG_SCREEN_ADDR(7)));
LZ77UnCompVram(sBirchSpeechShadowGfx, (void *)VRAM);
LZ77UnCompVram(sBirchSpeechBgMap, (void *)(BG_SCREEN_ADDR(7)));
LoadPalette(sBirchSpeechBgPals, 0, 64);
LoadPalette(sBirchSpeechPlatformBlackPal, 1, 16);
ScanlineEffect_Stop();

View File

@ -2031,7 +2031,7 @@ static void UnusedBlitBitmapRect(const struct Bitmap *src, struct Bitmap *dst, u
for (loopSrcX = srcX, loopDstX = dstX; loopSrcX < xEnd; loopSrcX++, loopDstX++)
{
pixelsSrc = src->pixels + ((loopSrcX >> 1) & 3) + ((loopSrcX >> 3) << 5) + (((loopSrcY >> 3) * multiplierSrcY) << 5) + ((u32)(loopSrcY << 29) >> 27);
pixelsDst = (void*) dst->pixels + ((loopDstX >> 1) & 3) + ((loopDstX >> 3) << 5) + ((( loopDstY >> 3) * multiplierDstY) << 5) + ((u32)(loopDstY << 29) >> 27);
pixelsDst = (void *) dst->pixels + ((loopDstX >> 1) & 3) + ((loopDstX >> 3) << 5) + ((( loopDstY >> 3) * multiplierDstY) << 5) + ((u32)(loopDstY << 29) >> 27);
if ((uintptr_t)pixelsDst & 1)
{

View File

@ -98,9 +98,9 @@ void ResetVramOamAndBgCntRegs(void)
SetGpuReg(REG_OFFSET_BG2CNT, 0);
SetGpuReg(REG_OFFSET_BG1CNT, 0);
SetGpuReg(REG_OFFSET_BG0CNT, 0);
CpuFill16(0, (void*) VRAM, VRAM_SIZE);
CpuFill32(0, (void*) OAM, OAM_SIZE);
CpuFill16(0, (void*) PLTT, PLTT_SIZE);
CpuFill16(0, (void *) VRAM, VRAM_SIZE);
CpuFill32(0, (void *) OAM, OAM_SIZE);
CpuFill16(0, (void *) PLTT, PLTT_SIZE);
}
void ResetAllBgsCoordinates(void)

View File

@ -167,7 +167,7 @@ void CB2_InitOptionMenu(void)
gMain.state++;
break;
case 1:
DmaClearLarge16(3, (void*)(VRAM), VRAM_SIZE, 0x1000);
DmaClearLarge16(3, (void *)(VRAM), VRAM_SIZE, 0x1000);
DmaClear32(3, OAM, OAM_SIZE);
DmaClear16(3, PLTT, PLTT_SIZE);
SetGpuReg(REG_OFFSET_DISPCNT, 0);

View File

@ -667,7 +667,7 @@ static void Task_PlayCryWhenReleasedFromBall(u8 taskId)
u16 species = gTasks[taskId].tCryTaskSpecies;
u8 battlerId = gTasks[taskId].tCryTaskBattler;
u8 monSpriteId = gTasks[taskId].tCryTaskMonSpriteId;
struct Pokemon *mon = (void*)(u32)((gTasks[taskId].tCryTaskMonPtr1 << 16) | (u16)(gTasks[taskId].tCryTaskMonPtr2));
struct Pokemon *mon = (void *)(u32)((gTasks[taskId].tCryTaskMonPtr1 << 16) | (u16)(gTasks[taskId].tCryTaskMonPtr2));
switch (gTasks[taskId].tCryTaskState)
{

View File

@ -2154,7 +2154,7 @@ static void LoadPokedexBgPalette(bool8 isSearchResults)
static void FreeWindowAndBgBuffers(void)
{
void* tilemapBuffer;
void *tilemapBuffer;
FreeAllWindowBuffers();
tilemapBuffer = GetBgTilemapBuffer(0);
@ -4880,7 +4880,7 @@ static void Task_LoadSearchMenu(u8 taskId)
static void FreeSearchWindowAndBgBuffers(void)
{
void* tilemapBuffer;
void *tilemapBuffer;
FreeAllWindowBuffers();
tilemapBuffer = GetBgTilemapBuffer(0);

View File

@ -6675,7 +6675,7 @@ const u8 *GetTrainerPartnerName(void)
}
#define READ_PTR_FROM_TASK(taskId, dataId) \
(void*)( \
(void *)( \
((u16)(gTasks[taskId].data[dataId]) | \
((u16)(gTasks[taskId].data[dataId + 1]) << 16)))

View File

@ -3765,7 +3765,7 @@ static void InitDigitPrinters(void)
.xDelta = 8,
.x = 108,
.y = 6,
.spriteSheet = (void*) &sSpriteSheet_Digits,
.spriteSheet = (void *) &sSpriteSheet_Digits,
.spritePal = &sSpritePalette_Digits,
};

View File

@ -3871,7 +3871,7 @@ static void CreateMarkingComboSprite(void)
sStorage->markingComboSprite->subpriority = 1;
sStorage->markingComboSprite->x = 40;
sStorage->markingComboSprite->y = 150;
sStorage->markingComboTilesPtr = (void*) OBJ_VRAM0 + 32 * GetSpriteTileStartByTag(GFXTAG_MARKING_COMBO);
sStorage->markingComboTilesPtr = (void *) OBJ_VRAM0 + 32 * GetSpriteTileStartByTag(GFXTAG_MARKING_COMBO);
}
static void CreateWaveformSprites(void)
@ -3959,7 +3959,7 @@ static void CreateDisplayMonSprite(void)
sStorage->displayMonSprite = &gSprites[spriteId];
sStorage->displayMonPalOffset = palSlot * 16 + 0x100;
sStorage->displayMonTilePtr = (void*) OBJ_VRAM0 + tileStart * TILE_SIZE_4BPP;
sStorage->displayMonTilePtr = (void *) OBJ_VRAM0 + tileStart * TILE_SIZE_4BPP;
} while (0);
if (sStorage->displayMonSprite == NULL)
@ -5119,7 +5119,7 @@ static u16 TryLoadMonIconTiles(u16 species)
sStorage->iconSpeciesList[i] = species;
sStorage->numIconsPerSpecies[i]++;
offset = 16 * i;
CpuCopy32(GetMonIconTiles(species, TRUE), (void*)(OBJ_VRAM0) + offset * TILE_SIZE_4BPP, 0x200);
CpuCopy32(GetMonIconTiles(species, TRUE), (void *)(OBJ_VRAM0) + offset * TILE_SIZE_4BPP, 0x200);
return offset;
}
@ -8010,7 +8010,7 @@ static void AddMenu(void)
sStorage->menuWindowId = AddWindow(&sStorage->menuWindow);
ClearWindowTilemap(sStorage->menuWindowId);
DrawStdFrameWithCustomTileAndPalette(sStorage->menuWindowId, FALSE, 11, 14);
PrintMenuTable(sStorage->menuWindowId, sStorage->menuItemsCount, (void*)sStorage->menuItems);
PrintMenuTable(sStorage->menuWindowId, sStorage->menuItemsCount, (void *)sStorage->menuItems);
InitMenuInUpperLeftCornerNormal(sStorage->menuWindowId, sStorage->menuItemsCount, 0);
ScheduleBgCopyTilemapToVram(0);
sStorage->menuUnusedField = 0;
@ -8743,7 +8743,7 @@ static void CreateItemIconSprites(void)
{
spriteSheet.tag = GFXTAG_ITEM_ICON_0 + i;
LoadCompressedSpriteSheet(&spriteSheet);
sStorage->itemIcons[i].tiles = GetSpriteTileStartByTag(spriteSheet.tag) * TILE_SIZE_4BPP + (void*)(OBJ_VRAM0);
sStorage->itemIcons[i].tiles = GetSpriteTileStartByTag(spriteSheet.tag) * TILE_SIZE_4BPP + (void *)(OBJ_VRAM0);
sStorage->itemIcons[i].palIndex = AllocSpritePalette(PALTAG_ITEM_ICON_0 + i);
sStorage->itemIcons[i].palIndex *= 16;
sStorage->itemIcons[i].palIndex += 0x100;

View File

@ -826,7 +826,7 @@ static void CreateConditionMonPic(u8 id)
{
menu->monPicSpriteId = spriteId;
gSprites[menu->monPicSpriteId].callback = MonPicGfxSpriteCallback;
menu->monGfxPtr = (void*)VRAM + BG_VRAM_SIZE + (menu->monGfxTileStart * 32);
menu->monGfxPtr = (void *)VRAM + BG_VRAM_SIZE + (menu->monGfxTileStart * 32);
menu->monPalIndex = (menu->monPalIndex * 16) + 0x100;
}
}

View File

@ -1174,7 +1174,7 @@ static void ReceiveApprenticeData(struct Apprentice *records, size_t recordSize,
u32 apprenticeSaveId;
ShufflePlayerIndices(mixIndices);
mixApprentice = (void*)records + (recordSize * mixIndices[multiplayerId]);
mixApprentice = (void *)records + (recordSize * mixIndices[multiplayerId]);
numApprentices = 0;
apprenticeId = 0;
for (i = 0; i < 2; i++)

View File

@ -302,7 +302,7 @@ static bool32 IsRecordedBattleSaveValid(struct RecordedBattleSave *save)
return FALSE;
if (save->battleFlags & ILLEGAL_BATTLE_TYPES)
return FALSE;
if (CalcByteArraySum((void*)(save), sizeof(*save) - 4) != save->checksum)
if (CalcByteArraySum((void *)(save), sizeof(*save) - 4) != save->checksum)
return FALSE;
return TRUE;
@ -313,9 +313,9 @@ static bool32 RecordedBattleToSave(struct RecordedBattleSave *battleSave, struct
memset(saveSector, 0, SECTOR_SIZE);
memcpy(saveSector, battleSave, sizeof(*battleSave));
saveSector->checksum = CalcByteArraySum((void*)(saveSector), sizeof(*saveSector) - 4);
saveSector->checksum = CalcByteArraySum((void *)(saveSector), sizeof(*saveSector) - 4);
if (TryWriteSpecialSaveSector(SECTOR_ID_RECORDED_BATTLE, (void*)(saveSector)) != SAVE_STATUS_OK)
if (TryWriteSpecialSaveSector(SECTOR_ID_RECORDED_BATTLE, (void *)(saveSector)) != SAVE_STATUS_OK)
return FALSE;
else
return TRUE;
@ -481,7 +481,7 @@ bool32 MoveRecordedBattleToSaveData(void)
static bool32 TryCopyRecordedBattleSaveData(struct RecordedBattleSave *dst, struct SaveSector *saveBuffer)
{
if (TryReadSpecialSaveSector(SECTOR_ID_RECORDED_BATTLE, (void*)(saveBuffer)) != SAVE_STATUS_OK)
if (TryReadSpecialSaveSector(SECTOR_ID_RECORDED_BATTLE, (void *)(saveBuffer)) != SAVE_STATUS_OK)
return FALSE;
memcpy(dst, saveBuffer, sizeof(struct RecordedBattleSave));

View File

@ -63,7 +63,7 @@ static void CB2_ReshowBattleScreenAfterMenu(void)
gBattle_BG3_Y = 0;
break;
case 1:
CpuFastFill(0, (void*)(VRAM), VRAM_SIZE);
CpuFastFill(0, (void *)(VRAM), VRAM_SIZE);
break;
case 2:
LoadBattleTextboxAndBackground();

View File

@ -689,18 +689,18 @@ static u16 CalculateChecksum(void *data, u16 size)
static void UpdateSaveAddresses(void)
{
int i = SECTOR_ID_SAVEBLOCK2;
gRamSaveSectorLocations[i].data = (void*)(gSaveBlock2Ptr) + sSaveSlotLayout[i].offset;
gRamSaveSectorLocations[i].data = (void *)(gSaveBlock2Ptr) + sSaveSlotLayout[i].offset;
gRamSaveSectorLocations[i].size = sSaveSlotLayout[i].size;
for (i = SECTOR_ID_SAVEBLOCK1_START; i <= SECTOR_ID_SAVEBLOCK1_END; i++)
{
gRamSaveSectorLocations[i].data = (void*)(gSaveBlock1Ptr) + sSaveSlotLayout[i].offset;
gRamSaveSectorLocations[i].data = (void *)(gSaveBlock1Ptr) + sSaveSlotLayout[i].offset;
gRamSaveSectorLocations[i].size = sSaveSlotLayout[i].size;
}
for (; i <= SECTOR_ID_PKMN_STORAGE_END; i++) //setting i to SECTOR_ID_PKMN_STORAGE_START does not match
{
gRamSaveSectorLocations[i].data = (void*)(gPokemonStoragePtr) + sSaveSlotLayout[i].offset;
gRamSaveSectorLocations[i].data = (void *)(gPokemonStoragePtr) + sSaveSlotLayout[i].offset;
gRamSaveSectorLocations[i].size = sSaveSlotLayout[i].size;
}
}
@ -951,7 +951,7 @@ u32 TryWriteSpecialSaveSector(u8 sector, u8 *src)
s32 i;
s32 size;
u8 *savData;
void* savDataBuffer;
void *savDataBuffer;
if (sector != SECTOR_ID_TRAINER_HILL && sector != SECTOR_ID_RECORDED_BATTLE)
return SAVE_STATUS_ERROR;

View File

@ -378,7 +378,7 @@ void TryBecomeLinkLeader(void)
struct WirelessLink_Leader *data;
taskId = CreateTask(Task_TryBecomeLinkLeader, 0);
sWirelessLinkMain.leader = data = (void*)(gTasks[taskId].data);
sWirelessLinkMain.leader = data = (void *)(gTasks[taskId].data);
sLeader = data;
data->state = LL_STATE_INIT;
@ -971,7 +971,7 @@ void TryJoinLinkGroup(void)
struct WirelessLink_Group *data;
taskId = CreateTask(Task_TryJoinLinkGroup, 0);
sWirelessLinkMain.group = data = (void*)(gTasks[taskId].data);
sWirelessLinkMain.group = data = (void *)(gTasks[taskId].data);
sGroup = data;
data->state = LG_STATE_INIT;
@ -1297,7 +1297,7 @@ u8 CreateTask_ListenToWireless(void)
struct WirelessLink_Group *data;
taskId = CreateTask(Task_ListenToWireless, 0);
sWirelessLinkMain.group = data = (void*)(gTasks[taskId].data);
sWirelessLinkMain.group = data = (void *)(gTasks[taskId].data);
data->state = 0;
data->textState = 0;
@ -1869,7 +1869,7 @@ void CreateTask_SendMysteryGift(u32 activity)
struct WirelessLink_Leader *data;
taskId = CreateTask(Task_SendMysteryGift, 0);
sWirelessLinkMain.leader = data = (void*)(gTasks[taskId].data);
sWirelessLinkMain.leader = data = (void *)(gTasks[taskId].data);
data->state = 0;
data->textState = 0;
@ -2077,7 +2077,7 @@ void CreateTask_LinkMysteryGiftWithFriend(u32 activity)
struct WirelessLink_Group *data;
taskId = CreateTask(Task_CardOrNewsWithFriend, 0);
sWirelessLinkMain.group = data = (void*)(gTasks[taskId].data);
sWirelessLinkMain.group = data = (void *)(gTasks[taskId].data);
sGroup = data;
data->state = 0;
@ -2246,7 +2246,7 @@ void CreateTask_LinkMysteryGiftOverWireless(u32 activity)
struct WirelessLink_Group *data;
taskId = CreateTask(Task_CardOrNewsOverWireless, 0);
sWirelessLinkMain.group = data = (void*)(gTasks[taskId].data);
sWirelessLinkMain.group = data = (void *)(gTasks[taskId].data);
sGroup = data;
data->state = 0;
@ -3467,7 +3467,7 @@ static void Task_SearchForChildOrParent(u8 taskId)
{
s32 i, j;
struct RfuPlayerData rfu;
struct RfuIncomingPlayerList **list = (void*) gTasks[taskId].data;
struct RfuIncomingPlayerList **list = (void *) gTasks[taskId].data;
bool8 isParent;
for (i = 0; i < RFU_CHILD_MAX; i++)
@ -3510,7 +3510,7 @@ static u8 CreateTask_SearchForChildOrParent(struct RfuIncomingPlayerList * paren
static void Task_ListenForCompatiblePartners(u8 taskId)
{
s32 i, j;
struct RfuIncomingPlayerList **list = (void*) gTasks[taskId].data;
struct RfuIncomingPlayerList **list = (void *) gTasks[taskId].data;
for (i = 0; i < RFU_CHILD_MAX; i++)
{
@ -3553,7 +3553,7 @@ static bool32 HasWonderCardOrNewsByLinkGroup(struct RfuGameData *data, s16 linkG
static void Task_ListenForWonderDistributor(u8 taskId)
{
s32 i;
struct RfuIncomingPlayerList **list = (void*) gTasks[taskId].data;
struct RfuIncomingPlayerList **list = (void *) gTasks[taskId].data;
for (i = 0; i < RFU_CHILD_MAX; i++)
{
@ -3567,7 +3567,7 @@ static void Task_ListenForWonderDistributor(u8 taskId)
static u8 CreateTask_ListenForCompatiblePartners(struct RfuIncomingPlayerList * list, u32 linkGroup)
{
u8 taskId = CreateTask(Task_ListenForCompatiblePartners, 0);
struct RfuIncomingPlayerList **oldList = (void*) gTasks[taskId].data;
struct RfuIncomingPlayerList **oldList = (void *) gTasks[taskId].data;
oldList[0] = list;
gTasks[taskId].data[2] = linkGroup;
return taskId;
@ -3576,7 +3576,7 @@ static u8 CreateTask_ListenForCompatiblePartners(struct RfuIncomingPlayerList *
static u8 CreateTask_ListenForWonderDistributor(struct RfuIncomingPlayerList * list, u32 linkGroup)
{
u8 taskId = CreateTask(Task_ListenForWonderDistributor, 0);
struct RfuIncomingPlayerList **oldList = (void*) gTasks[taskId].data;
struct RfuIncomingPlayerList **oldList = (void *) gTasks[taskId].data;
oldList[0] = list;
gTasks[taskId].data[2] = linkGroup;
return taskId;

View File

@ -497,7 +497,7 @@ static void LoadUsePokeblockMenu(void)
break;
case 2:
SetVBlankCallback(NULL);
CpuFill32(0, (void*)(VRAM), VRAM_SIZE);
CpuFill32(0, (void *)(VRAM), VRAM_SIZE);
sInfo->mainState++;
break;
case 3:
@ -1232,7 +1232,7 @@ static void UpdateMonPic(u8 loadId)
sMenu->curMonSpriteId = spriteId;
gSprites[sMenu->curMonSpriteId].callback = SpriteCB_MonPic;
gSprites[sMenu->curMonSpriteId].y2 -= 34;
sMenu->curMonTileStart = (void*)(OBJ_VRAM0 + (sMenu->curMonSheet * 32));
sMenu->curMonTileStart = (void *)(OBJ_VRAM0 + (sMenu->curMonSheet * 32));
sMenu->curMonPalette = (sMenu->curMonPalette * 16) + 0x100;
}
}