Standarized use of star in pointer types

This commit is contained in:
Eduardo Quezada
2022-07-29 10:17:58 -04:00
parent 9caca17064
commit 7b3401ee27
94 changed files with 524 additions and 524 deletions
+7 -7
View File
@@ -923,7 +923,7 @@ void CopyToBgTilemapBufferRect(u8 bg, const void* src, u8 destX, u8 destY, u8 wi
{
for (destX16 = destX; destX16 < (destX + width); destX16++)
{
((u16*)sGpuBgConfigs2[bg].tilemap)[((destY16 * 0x20) + destX16)] = *srcCopy++;
((u16 *)sGpuBgConfigs2[bg].tilemap)[((destY16 * 0x20) + destX16)] = *srcCopy++;
}
}
break;
@@ -936,7 +936,7 @@ void CopyToBgTilemapBufferRect(u8 bg, const void* src, u8 destX, u8 destY, u8 wi
{
for (destX16 = destX; destX16 < (destX + width); destX16++)
{
((u8*)sGpuBgConfigs2[bg].tilemap)[((destY16 * mode) + destX16)] = *srcCopy++;
((u8 *)sGpuBgConfigs2[bg].tilemap)[((destY16 * mode) + destX16)] = *srcCopy++;
}
}
break;
@@ -984,7 +984,7 @@ void CopyRectToBgTilemapBufferRect(u8 bg, const void *src, u8 srcX, u8 srcY, u8
{
for (j = destX; j < (destX + rectWidth); j++)
{
*(u8*)(sGpuBgConfigs2[bg].tilemap + ((var * i) + j)) = *(u8*)(srcPtr) + tileOffset;
*(u8 *)(sGpuBgConfigs2[bg].tilemap + ((var * i) + j)) = *(u8 *)(srcPtr) + tileOffset;
srcPtr++;
}
srcPtr += (srcWidth - rectWidth);
@@ -1009,7 +1009,7 @@ void FillBgTilemapBufferRect_Palette0(u8 bg, u16 tileNum, u8 x, u8 y, u8 width,
{
for (x16 = x; x16 < (x + width); x16++)
{
((u16*)sGpuBgConfigs2[bg].tilemap)[((y16 * 0x20) + x16)] = tileNum;
((u16 *)sGpuBgConfigs2[bg].tilemap)[((y16 * 0x20) + x16)] = tileNum;
}
}
break;
@@ -1019,7 +1019,7 @@ void FillBgTilemapBufferRect_Palette0(u8 bg, u16 tileNum, u8 x, u8 y, u8 width,
{
for (x16 = x; x16 < (x + width); x16++)
{
((u8*)sGpuBgConfigs2[bg].tilemap)[((y16 * mode) + x16)] = tileNum;
((u8 *)sGpuBgConfigs2[bg].tilemap)[((y16 * mode) + x16)] = tileNum;
}
}
break;
@@ -1052,7 +1052,7 @@ void WriteSequenceToBgTilemapBuffer(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 widt
{
for (x16 = x; x16 < (x + width); x16++)
{
CopyTileMapEntry(&firstTileNum, &((u16*)sGpuBgConfigs2[bg].tilemap)[(u16)GetTileMapIndexFromCoords(x16, y16, attribute, mode, mode2)], paletteSlot, 0, 0);
CopyTileMapEntry(&firstTileNum, &((u16 *)sGpuBgConfigs2[bg].tilemap)[(u16)GetTileMapIndexFromCoords(x16, y16, attribute, mode, mode2)], paletteSlot, 0, 0);
firstTileNum = (firstTileNum & (MAPGRID_COLLISION_MASK | MAPGRID_ELEVATION_MASK)) + ((firstTileNum + tileNumDelta) & MAPGRID_METATILE_ID_MASK);
}
}
@@ -1063,7 +1063,7 @@ void WriteSequenceToBgTilemapBuffer(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 widt
{
for (x16 = x; x16 < (x + width); x16++)
{
((u8*)sGpuBgConfigs2[bg].tilemap)[(y16 * mode3) + x16] = firstTileNum;
((u8 *)sGpuBgConfigs2[bg].tilemap)[(y16 * mode3) + x16] = firstTileNum;
firstTileNum = (firstTileNum & (MAPGRID_COLLISION_MASK | MAPGRID_ELEVATION_MASK)) + ((firstTileNum + tileNumDelta) & MAPGRID_METATILE_ID_MASK);
}
}
+7 -7
View File
@@ -652,7 +652,7 @@ void ClearTextSpan(struct TextPrinter *textPrinter, u32 width)
struct Window *window;
struct Bitmap pixels_data;
struct TextGlyph *glyph;
u8* glyphHeight;
u8 *glyphHeight;
if (sLastTextBgColor != TEXT_COLOR_TRANSPARENT)
{
@@ -1684,7 +1684,7 @@ u8 GetMenuCursorDimensionByFont(u8 fontId, u8 whichDimension)
static void DecompressGlyph_Small(u16 glyphId, bool32 isJapanese)
{
const u16* glyphs;
const u16 *glyphs;
if (isJapanese == 1)
{
@@ -1726,7 +1726,7 @@ static u32 GetGlyphWidth_Small(u16 glyphId, bool32 isJapanese)
static void DecompressGlyph_Narrow(u16 glyphId, bool32 isJapanese)
{
const u16* glyphs;
const u16 *glyphs;
if (isJapanese == TRUE)
{
@@ -1768,7 +1768,7 @@ static u32 GetGlyphWidth_Narrow(u16 glyphId, bool32 isJapanese)
static void DecompressGlyph_SmallNarrow(u16 glyphId, bool32 isJapanese)
{
const u16* glyphs;
const u16 *glyphs;
if (isJapanese == TRUE)
{
@@ -1810,7 +1810,7 @@ static u32 GetGlyphWidth_SmallNarrow(u16 glyphId, bool32 isJapanese)
static void DecompressGlyph_Short(u16 glyphId, bool32 isJapanese)
{
const u16* glyphs;
const u16 *glyphs;
if (isJapanese == TRUE)
{
@@ -1854,7 +1854,7 @@ static u32 GetGlyphWidth_Short(u16 glyphId, bool32 isJapanese)
static void DecompressGlyph_Normal(u16 glyphId, bool32 isJapanese)
{
const u16* glyphs;
const u16 *glyphs;
if (isJapanese == TRUE)
{
@@ -1896,7 +1896,7 @@ static u32 GetGlyphWidth_Normal(u16 glyphId, bool32 isJapanese)
static void DecompressGlyph_Bold(u16 glyphId)
{
const u16* glyphs;
const u16 *glyphs;
glyphs = sFontBoldJapaneseGlyphs + (0x100 * (glyphId >> 4)) + (0x8 * (glyphId & 0xF));
DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop);
+1 -1
View File
@@ -65,7 +65,7 @@ struct TextPrinterSubStruct
struct TextPrinterTemplate
{
const u8* currentChar;
const u8 *currentChar;
u8 windowId;
u8 fontId;
u8 x;
+10 -10
View File
@@ -35,7 +35,7 @@ bool16 InitWindows(const struct WindowTemplate *templates)
int j;
u8 bgLayer;
u16 attrib;
u8* allocatedTilemapBuffer;
u8 *allocatedTilemapBuffer;
int allocatedBaseBlock;
for (i = 0; i < NUM_BACKGROUNDS; ++i)
@@ -405,7 +405,7 @@ void BlitBitmapRectToWindow(u8 windowId, const u8 *pixels, u16 srcX, u16 srcY, u
struct Bitmap sourceRect;
struct Bitmap destRect;
sourceRect.pixels = (u8*)pixels;
sourceRect.pixels = (u8 *)pixels;
sourceRect.width = srcWidth;
sourceRect.height = srcHeight;
@@ -421,7 +421,7 @@ static void BlitBitmapRectToWindowWithColorKey(u8 windowId, const u8 *pixels, u1
struct Bitmap sourceRect;
struct Bitmap destRect;
sourceRect.pixels = (u8*)pixels;
sourceRect.pixels = (u8 *)pixels;
sourceRect.width = srcWidth;
sourceRect.height = srcHeight;
@@ -463,9 +463,9 @@ void FillWindowPixelBuffer(u8 windowId, u8 fillValue)
destOffset = i + (a); \
srcOffset = i + (((width * (distanceLoop & ~7)) | (distanceLoop & 7)) * 4); \
if (srcOffset < size) \
*(u32*)(tileData + destOffset) = *(u32*)(tileData + srcOffset); \
*(u32 *)(tileData + destOffset) = *(u32 *)(tileData + srcOffset); \
else \
*(u32*)(tileData + destOffset) = fillValue32; \
*(u32 *)(tileData + destOffset) = fillValue32; \
distanceLoop++; \
}
@@ -474,9 +474,9 @@ void FillWindowPixelBuffer(u8 windowId, u8 fillValue)
destOffset = i + (a); \
srcOffset = i + (((width * (distanceLoop & ~7)) | (distanceLoop & 7)) * 4); \
if (srcOffset < size) \
*(u32*)(tileData - destOffset) = *(u32*)(tileData - srcOffset); \
*(u32 *)(tileData - destOffset) = *(u32 *)(tileData - srcOffset); \
else \
*(u32*)(tileData - destOffset) = fillValue32; \
*(u32 *)(tileData - destOffset) = fillValue32; \
distanceLoop++; \
}
@@ -550,7 +550,7 @@ bool8 SetWindowAttribute(u8 windowId, u8 attributeId, u32 value)
gWindows[windowId].window.baseBlock = value;
return FALSE;
case WINDOW_TILE_DATA:
gWindows[windowId].tileData = (u8*)(value);
gWindows[windowId].tileData = (u8 *)(value);
return TRUE;
case WINDOW_BG:
case WINDOW_WIDTH:
@@ -605,7 +605,7 @@ static void DummyWindowBgTilemap8Bit(void)
u16 AddWindow8Bit(const struct WindowTemplate *template)
{
u16 windowId;
u8* memAddress;
u8 *memAddress;
u8 bgLayer;
for (windowId = 0; windowId < WINDOWS_MAX; windowId++)
@@ -675,7 +675,7 @@ void BlitBitmapRectToWindow4BitTo8Bit(u8 windowId, const u8 *pixels, u16 srcX, u
struct Bitmap sourceRect;
struct Bitmap destRect;
sourceRect.pixels = (u8*) pixels;
sourceRect.pixels = (u8 *) pixels;
sourceRect.width = srcWidth;
sourceRect.height = srcHeight;