Skip to content

Commit

Permalink
Document and clean up graphics.c
Browse files Browse the repository at this point in the history
  • Loading branch information
lhearachel committed Oct 24, 2024
1 parent fa19456 commit 7820f1d
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 103 deletions.
51 changes: 27 additions & 24 deletions include/graphics.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,32 @@ 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 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);
u32 Graphics_LoadTilesToBgLayer(u32 narcID, u32 narcMemberIdx, BgConfig *bgConfig, u32 bgLayer, u32 offset, u32 size, BOOL compressed, u32 heapID);
void Graphics_LoadTilemapToBgLayer(u32 narcID, u32 narcMemberIdx, BgConfig *bgConfig, u32 bgLayer, u32 offset, u32 size, BOOL compressed, u32 heapID);
void Graphics_LoadPalette(u32 narcID, u32 narcMemberIdx, enum PaletteLoadLocation loadLocation, u32 palOffset, u32 size, u32 heapID);
void Graphics_LoadPaletteWithSrcOffset(u32 narcID, u32 narcMemberIdx, enum PaletteLoadLocation loadLocation, u32 srcOffset, u32 palOffset, u32 size, u32 heapID);
u32 Graphics_LoadObjectTiles(u32 narcID, u32 narcMemberIdx, enum DSScreen display, u32 offset, u32 size, BOOL compressed, u32 heapID);
void Graphics_LoadPartialPalette(u32 narcID, u32 narcMemberIdx, NNS_G2D_VRAM_TYPE vramType, u32 baseAddr, u32 heapID, NNSG2dImagePaletteProxy *paletteProxy);
u32 Graphics_LoadImageMapping(u32 narcID, u32 narcMemberIdx, BOOL compressed, enum ImageMappingLayout layout, u32 size, NNS_G2D_VRAM_TYPE vramType, u32 baseAddr, u32 heapID, NNSG2dImageProxy *imageProxy);
void Graphics_LoadImageMappingAndSetVramMode(u32 narcID, u32 narcMemberIdx, BOOL compressed, enum ImageMappingLayout layout, u32 size, NNS_G2D_VRAM_TYPE vramType, u32 baseAddr, u32 heapID, NNSG2dImageProxy *imageProxy);

void *Graphics_GetCharData(u32 narcID, u32 narcMemberIdx, BOOL compressed, NNSG2dCharacterData **outCharData, u32 heapID);
void *Graphics_GetScrnData(u32 narcID, u32 narcMemberIdx, BOOL compressed, NNSG2dScreenData **outScreenData, u32 heapID);
void *Graphics_GetPlttData(u32 narcID, u32 narcMemberIdx, NNSG2dPaletteData **outPaletteData, u32 heapID);
void *Graphics_GetCellBank(u32 narcID, u32 narcMemberIdx, BOOL compressed, NNSG2dCellDataBank **outCellBank, u32 heapID);
void *Graphics_GetAnimBank(u32 narcID, u32 narcMemberIdx, BOOL compressed, NNSG2dAnimBankData **outAnimBank, u32 heapID);

u32 Graphics_LoadTilesToBgLayerFromOpenNARC(NARC *narc, u32 narcMemberIdx, BgConfig *bgConfig, u32 bgLayer, u32 offset, u32 size, BOOL compressed, u32 heapID);
void Graphics_LoadTilemapToBgLayerFromOpenNARC(NARC *narc, u32 narcMemberIdx, BgConfig *bgConfig, u32 bgLayer, u32 offset, u32 size, BOOL compressed, u32 heapID);
void Graphics_LoadPaletteFromOpenNARC(NARC *narc, u32 narcMemberIdx, enum PaletteLoadLocation loadLocation, u32 offset, u32 size, u32 heapID);
void Graphics_LoadPaletteWithSrcOffsetFromOpenNARC(NARC *narc, u32 narcMemberIdx, enum PaletteLoadLocation loadLocation, u32 srcOffset, u32 offset, u32 size, u32 heapID);
void Graphics_LoadPartialPaletteFromOpenNARC(NARC *narc, u32 narcMemberIdx, NNS_G2D_VRAM_TYPE vramType, u32 baseAddr, u32 heapID, NNSG2dImagePaletteProxy *paletteProxy);
u32 Graphics_LoadImageMappingFromOpenNARC(NARC *narc, u32 narcMemberIdx, BOOL compressed, enum ImageMappingLayout layout, u32 size, NNS_G2D_VRAM_TYPE vramType, u32 baseAddr, u32 heapID, NNSG2dImageProxy *imageProxy);

void *Graphics_GetCharDataFromOpenNARC(NARC *narc, u32 narcMemberIdx, BOOL compressed, NNSG2dCharacterData **outCharData, u32 heapID);
void *Graphics_GetScrnDataFromOpenNARC(NARC *narc, u32 narcMemberIdx, BOOL compressed, NNSG2dScreenData **outScreenData, u32 heapID);
void *Graphics_GetPlttDataFromOpenNARC(NARC *narc, u32 narcMemberIdx, NNSG2dPaletteData **outPaletteData, u32 heapID);
void *Graphics_GetCellBankFromOpenNARC(NARC *narc, u32 narcMemberIdx, BOOL compressed, NNSG2dCellDataBank **outCellBank, u32 heapID);
void *Graphics_GetAnimBankFromOpenNARC(NARC *narc, u32 narcMemberIdx, BOOL compressed, NNSG2dAnimBankData **outAnimBank, u32 heapID);

#endif // POKEPLATINUM_GRAPHICS_H
Loading

0 comments on commit 7820f1d

Please sign in to comment.