Skip to content

Commit

Permalink
Identify extern functions in graphics.h
Browse files Browse the repository at this point in the history
  • Loading branch information
lhearachel committed Oct 23, 2024
1 parent de25600 commit fa19456
Show file tree
Hide file tree
Showing 191 changed files with 1,240 additions and 1,240 deletions.
48 changes: 24 additions & 24 deletions include/graphics.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,29 @@ void *LoadMemberFromNARC_OutFileSize(u32 narcID, u32 narcMemberIdx, BOOL compres
void *LoadMemberFromOpenNARC(NARC *narc, u32 narcMemberIdx, BOOL compressed, u32 heapID, BOOL allocAtEnd);
void *LoadMemberFromOpenNARC_OutFileSize(NARC *narc, u32 narcMemberIdx, BOOL compressed, u32 heapID, BOOL allocAtEnd, u32 *fileSize);

u32 sub_02006E3C(u32 param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7);
void sub_02006E60(u32 param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7);
void sub_02006E84(u32 param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5);
void sub_02006E9C(u32 param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5, u32 param6);
u32 sub_02006EC0(u32 param0, u32 param1, int param2, u32 param3, u32 param4, BOOL param5, u32 param6);
void sub_02006EE0(u32 param0, u32 param1, NNS_G2D_VRAM_TYPE param2, u32 param3, u32 param4, NNSG2dImagePaletteProxy *param5);
u32 sub_02006F00(u32 param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8);
void sub_02006F28(u32 param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8);
void *sub_02006F50(u32 param0, u32 param1, BOOL param2, NNSG2dCharacterData **param3, u32 param4);
void *sub_02006F6C(u32 param0, u32 param1, BOOL param2, NNSG2dScreenData **param3, u32 param4);
void *sub_02006F88(u32 bankID, u32 memberIndex, NNSG2dPaletteData **param2, u32 param3);
void *sub_02006FA0(u32 param0, u32 param1, BOOL param2, NNSG2dCellDataBank **param3, u32 param4);
void *sub_02006FBC(u32 param0, u32 param1, BOOL param2, NNSG2dAnimBankData **param3, u32 param4);
u32 sub_020070E8(NARC *param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7);
void sub_0200710C(NARC *param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7);
void sub_02007130(NARC *param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5);
void sub_02007148(NARC *param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5, u32 param6);
void sub_0200716C(NARC *param0, u32 param1, NNS_G2D_VRAM_TYPE param2, u32 param3, u32 param4, NNSG2dImagePaletteProxy *param5);
u32 sub_0200718C(NARC *param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8);
void *sub_020071B4(NARC *param0, u32 param1, BOOL param2, NNSG2dCharacterData **param3, u32 param4);
void *sub_020071D0(NARC *param0, u32 param1, BOOL param2, NNSG2dScreenData **param3, u32 param4);
void *sub_020071EC(NARC *param0, u32 param1, NNSG2dPaletteData **param2, u32 param3);
void *sub_02007204(NARC *param0, u32 param1, BOOL param2, NNSG2dCellDataBank **param3, u32 param4);
void *sub_02007220(NARC *param0, u32 param1, BOOL param2, NNSG2dAnimBankData **param3, u32 param4);
u32 Graphics_LoadTilesToBgLayer(u32 param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7);
void Graphics_LoadTilemapToBgLayer(u32 param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7);
void Graphics_LoadPalette(u32 param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5);
void Graphics_LoadPaletteWithSrcOffset(u32 param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5, u32 param6);
u32 Graphics_LoadObjectTiles(u32 param0, u32 param1, int param2, u32 param3, u32 param4, BOOL param5, u32 param6);
void Graphics_LoadPartialPalette(u32 param0, u32 param1, NNS_G2D_VRAM_TYPE param2, u32 param3, u32 param4, NNSG2dImagePaletteProxy *param5);
u32 Graphics_LoadImageMapping(u32 param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8);
void Graphics_LoadImageMappingAndSetVramMode(u32 param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8);
void *Graphics_GetCharData(u32 param0, u32 param1, BOOL param2, NNSG2dCharacterData **param3, u32 param4);
void *Graphics_GetScrnData(u32 param0, u32 param1, BOOL param2, NNSG2dScreenData **param3, u32 param4);
void *Graphics_GetPlttData(u32 bankID, u32 memberIndex, NNSG2dPaletteData **param2, u32 param3);
void *Graphics_GetCellBank(u32 param0, u32 param1, BOOL param2, NNSG2dCellDataBank **param3, u32 param4);
void *Graphics_GetAnimBank(u32 param0, u32 param1, BOOL param2, NNSG2dAnimBankData **param3, u32 param4);
u32 Graphics_LoadTilesToBgLayerFromOpenNARC(NARC *param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7);
void Graphics_LoadTilemapToBgLayerFromOpenNARC(NARC *param0, u32 param1, BgConfig *param2, u32 param3, u32 param4, u32 param5, BOOL param6, u32 param7);
void Graphics_LoadPaletteFromOpenNARC(NARC *param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5);
void Graphics_LoadPaletteWithSrcOffsetFromOpenNARC(NARC *param0, u32 param1, int param2, u32 param3, u32 param4, u32 param5, u32 param6);
void Graphics_LoadPartialPaletteFromOpenNARC(NARC *param0, u32 param1, NNS_G2D_VRAM_TYPE param2, u32 param3, u32 param4, NNSG2dImagePaletteProxy *param5);
u32 Graphics_LoadImageMappingFromOpenNARC(NARC *param0, u32 param1, BOOL param2, int param3, u32 param4, NNS_G2D_VRAM_TYPE param5, u32 param6, u32 param7, NNSG2dImageProxy *param8);
void *Graphics_GetCharDataFromOpenNARC(NARC *param0, u32 param1, BOOL param2, NNSG2dCharacterData **param3, u32 param4);
void *Graphics_GetScrnDataFromOpenNARC(NARC *param0, u32 param1, BOOL param2, NNSG2dScreenData **param3, u32 param4);
void *Graphics_GetPlttDataFromOpenNARC(NARC *param0, u32 param1, NNSG2dPaletteData **param2, u32 param3);
void *Graphics_GetCellBankFromOpenNARC(NARC *param0, u32 param1, BOOL param2, NNSG2dCellDataBank **param3, u32 param4);
void *Graphics_GetAnimBankFromOpenNARC(NARC *param0, u32 param1, BOOL param2, NNSG2dAnimBankData **param3, u32 param4);

#endif // POKEPLATINUM_GRAPHICS_H
2 changes: 1 addition & 1 deletion include/inlines.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static inline void inline_ov61_0222C3B0(UnkStruct_ov61_0222C3B0 *param0, NARC *p

MI_CpuClear8(param0, sizeof(UnkStruct_ov61_0222C3B0));

v1 = sub_020071EC(param1, param2, &v0, param3);
v1 = Graphics_GetPlttDataFromOpenNARC(param1, param2, &v0, param3);

MI_CpuCopy16(&((u16 *)(v0->pRawData))[0 * 16], param0->unk_08, 4 * 0x20);
MI_CpuCopy16(&((u16 *)(v0->pRawData))[0 * 16], param0->unk_88, 4 * 0x20);
Expand Down
8 changes: 4 additions & 4 deletions src/battle/ov16_0223B140.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,11 +446,11 @@ void ov16_0223B578(BattleSystem *param0)
v1 = ov16_0223EDE0(param0);

sub_0200E218(param0->unk_04, 1, 1, 10, v1, 5);
sub_02006E3C(7, 3 + param0->unk_2400, param0->unk_04, 3, 0, 0, 1, 5);
Graphics_LoadTilesToBgLayer(7, 3 + param0->unk_2400, param0->unk_04, 3, 0, 0, 1, 5);
PaletteData_LoadBufferFromFileStart(param0->unk_28, 7, 172 + (param0->unk_2400 * 3) + ov16_0223EC04(param0), 5, 0, 0, 0);
PaletteData_LoadBufferFromFileStart(param0->unk_28, 38, sub_0200DD08(v1), 5, 0, 0x20, 10 * 0x10);
PaletteData_LoadBufferFromFileStart(param0->unk_28, 14, 7, 5, 0, 0x20, 0xb * 0x10);
sub_02006E60(7, 2, param0->unk_04, 3, 0, 0, 1, 5);
Graphics_LoadTilemapToBgLayer(7, 2, param0->unk_04, 3, 0, 0, 1, 5);
}

{
Expand Down Expand Up @@ -931,11 +931,11 @@ static void ov16_0223C004(BattleSystem *param0, BgConfig *param1)
v3 = ov16_0223EDE0(param0);

sub_0200E218(param1, 1, 1, 10, v3, 5);
sub_02006E3C(7, 3 + param0->unk_2400, param1, 3, 0, 0, 1, 5);
Graphics_LoadTilesToBgLayer(7, 3 + param0->unk_2400, param1, 3, 0, 0, 1, 5);
PaletteData_LoadBufferFromFileStart(param0->unk_28, 7, 172 + (param0->unk_2400 * 3) + ov16_0223EC04(param0), 5, 0, 0, 0);
PaletteData_LoadBufferFromFileStart(param0->unk_28, 38, sub_0200DD08(v3), 5, 0, 0x20, 10 * 0x10);
PaletteData_LoadBufferFromFileStart(param0->unk_28, 14, 7, 5, 0, 0x20, 0xb * 0x10);
sub_02006E60(7, 2, param1, 3, 0, 0, 1, 5);
Graphics_LoadTilemapToBgLayer(7, 2, param1, 3, 0, 0, 1, 5);
}

{
Expand Down
16 changes: 8 additions & 8 deletions src/battle/ov16_0226871C.c
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@ void *ov16_022687C8(NARC *param0, NARC *param1, BattleSystem *param2, int param3
v6 = Unk_ov16_02270264[v5];
}

v4 = sub_02006F6C(7, v6, 1, &v3, 5);
v4 = Graphics_GetScrnData(7, v6, 1, &v3, 5);

MI_CpuCopy32(v3->rawData, v0->unk_3C[v5], 0x800);
Heap_FreeToHeap(v4);
Expand Down Expand Up @@ -1154,7 +1154,7 @@ void *ov16_022687C8(NARC *param0, NARC *param1, BattleSystem *param2, int param3
v15 = 267;
}

v14 = sub_02006F88(7, v15, &v13, 5);
v14 = Graphics_GetPlttData(7, v15, &v13, 5);

if (BattleSystem_BattleType(param2) & 0x80) {
MI_CpuCopy16(v13->pRawData, v0->unk_60, 0x40);
Expand Down Expand Up @@ -1221,7 +1221,7 @@ void ov16_02268A88(UnkStruct_ov16_02268A14 *param0)
v5 = 28;
}

sub_02006E3C(7, v5, v0, 4, 0, 0x6000, 1, 5);
Graphics_LoadTilesToBgLayer(7, v5, v0, 4, 0, 0x6000, 1, 5);
}

sub_0207C9EC(v1, v2, 20017, 20017);
Expand Down Expand Up @@ -1295,12 +1295,12 @@ void ov16_02268C04(NARC *param0, NARC *param1, UnkStruct_ov16_02268A14 *param2,
v6 = v0->unk_00;
}

sub_020070E8(param0, v6, v3, 4, 0, (0x6000 - (32 * 12 * 0x20)), 1, 5);
Graphics_LoadTilesToBgLayerFromOpenNARC(param0, v6, v3, 4, 0, (0x6000 - (32 * 12 * 0x20)), 1, 5);

if (param2->unk_66D == 0) {
sub_020070E8(param0, 37, v3, 4, ((0x6000 - (32 * 12 * 0x20)) / 0x20), (32 * 12 * 0x20), 1, 5);
Graphics_LoadTilesToBgLayerFromOpenNARC(param0, 37, v3, 4, ((0x6000 - (32 * 12 * 0x20)) / 0x20), (32 * 12 * 0x20), 1, 5);
} else {
sub_020070E8(param0, 38, v3, 4, ((0x6000 - (32 * 12 * 0x20)) / 0x20), (32 * 12 * 0x20), 1, 5);
Graphics_LoadTilesToBgLayerFromOpenNARC(param0, 38, v3, 4, ((0x6000 - (32 * 12 * 0x20)) / 0x20), (32 * 12 * 0x20), 1, 5);
}
}

Expand Down Expand Up @@ -2034,7 +2034,7 @@ static void ov16_02269E94(UnkStruct_ov16_02268A14 *param0, int param1, int param
NNSG2dScreenData *v3;
void *v4;

v4 = sub_02006F6C(7, 46, 1, &v3, 5);
v4 = Graphics_GetScrnData(7, 46, 1, &v3, 5);
MI_CpuCopy32(v3->rawData, param0->unk_3C[6], 0x800);
Heap_FreeToHeap(v4);

Expand Down Expand Up @@ -2800,7 +2800,7 @@ void ov16_0226AC98(UnkStruct_ov16_02268A14 *param0, int param1, const UnkStruct_
for (v4 = 0; v4 < 4; v4++) {
if ((param2->unk_00[v4] != v0->unk_00.unk_00[v4]) && (param2->unk_00[v4] != 0)) {
v5 = MoveTable_LoadParam(param2->unk_00[v4], MOVEATTRIBUTE_TYPE);
v1 = sub_02006F50(sub_0207C944(), sub_0207C908(v5), 1, &v2, 5);
v1 = Graphics_GetCharData(sub_0207C944(), sub_0207C908(v5), 1, &v2, 5);
MI_CpuCopy32(v2->pRawData, v0->unk_18[v4], v3);
Heap_FreeToHeap(v1);
}
Expand Down
8 changes: 4 additions & 4 deletions src/choose_starter/choose_starter_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ static void MakeMessageWindow(ChooseStarterApp *app, enum HeapId heapID)

Window_FillTilemap(app->messageWindow, 15);
sub_0200DD0C(app->bgl, BG_LAYER_MAIN_1, FRAME_TEXT_START, FRAME_TEXT_PALETTE_INDEX, app->messageFrame, heapID);
sub_02006E84(NARC_INDEX_GRAPHIC__EV_POKESELECT, 16, 0, FRAME_PALETTE_INDEX * 32, 32, heapID);
Graphics_LoadPalette(NARC_INDEX_GRAPHIC__EV_POKESELECT, 16, 0, FRAME_PALETTE_INDEX * 32, 32, heapID);
sub_0200E060(app->messageWindow, 0, FRAME_TEXT_START, FRAME_TEXT_PALETTE_INDEX);
}

Expand Down Expand Up @@ -1546,8 +1546,8 @@ static void MakePreviewWindow(StarterPreviewWindow *param0, ChooseStarterApp *pa
UnkStruct_ov22_02255800 v1;
UnkStruct_ov21_021E7F40 v2;

param0->unk_0C = sub_02006F50(82, 14, 0, &param0->unk_14, param2);
param0->unk_10 = sub_02006F88(82, 15, &param0->unk_18, param2);
param0->unk_0C = Graphics_GetCharData(82, 14, 0, &param0->unk_14, param2);
param0->unk_10 = Graphics_GetPlttData(82, 15, &param0->unk_18, param2);

v0.unk_00 = param1->spriteDisplay;
v0.unk_04 = param0->unk_14;
Expand Down Expand Up @@ -1730,7 +1730,7 @@ static void MakeSubplaneWindow(ChooseStarterApp *param0, int param1)
int v0;
int v1, v2;

sub_02006E84(82, 17, 0, 5 * 32, 32, param1);
Graphics_LoadPalette(82, 17, 0, 5 * 32, 32, param1);

for (v0 = 0; v0 < 3; v0++) {
param0->unk_9C[v0] = Window_New(param1, 1);
Expand Down
4 changes: 2 additions & 2 deletions src/font.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,12 @@ u8 Font_GetAttribute(u8 font, u8 attribute)

void Font_LoadTextPalette(int palLocation, u32 palSlotOffset, u32 heapID)
{
sub_02006E84(NARC_INDEX_GRAPHIC__PL_FONT, 6, palLocation, palSlotOffset, 0x20, heapID);
Graphics_LoadPalette(NARC_INDEX_GRAPHIC__PL_FONT, 6, palLocation, palSlotOffset, 0x20, heapID);
}

void Font_LoadScreenIndicatorsPalette(int palLocation, u32 palSlotOffset, u32 heapID)
{
sub_02006E84(NARC_INDEX_GRAPHIC__PL_FONT, 7, palLocation, palSlotOffset, 0x20, heapID);
Graphics_LoadPalette(NARC_INDEX_GRAPHIC__PL_FONT, 7, palLocation, palSlotOffset, 0x20, heapID);
}

u32 Font_CalcMaxLineWidth(enum Font font, const Strbuf *strbuf, u32 letterSpacing)
Expand Down
Loading

0 comments on commit fa19456

Please sign in to comment.