diff options
| author | engineer124 <47598039+engineer124@users.noreply.github.com> | 2023-05-30 02:04:21 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-29 12:04:21 -0400 |
| commit | aa0a968791eb62ab02f2ce0b9e073362ebdd7243 (patch) | |
| tree | 0205fcd138a22a68cd8fcd05ec1920392b1168c8 /src/code/z_actor.c | |
| parent | fc475a97565ade34d57f80970c6b5cebcc2892a7 (diff) | |
Kaleido OK & icon_item_vtx_static (Documented) (#1243)
* Begin Kaleido
* WIP
* DW macros for gbi
* More Progress
* Match KaleidoScope_GrayOutTextureRGBA32
* DrawGameOver wip
* Add some function names
* A few more matching, some docs
* More docs, data wip
* Import Kaleido Data
* Data cleanup
* Some progress
* Match TitleCard_Draw Again (Thanks Roman)
* Match KaleidoScope_DrawDebugEditor
* KaleidoScope_UpdateDebugEditor WIP
* Some cleanup
* z_kaleido_debug.c OK
* Cleanup
* match func_8081B6EC
* more wip, data cleanup
* match func_80825A50
* match KaleidoScope_InitVertices
* cursor progress
* name func
* item headers
* match KaleidoScope_DrawItemSelect
* KaleidoScope_UpdateItemEquip WIP
* match kaleido item
* doc kaleido item
* z_kaleido_prompt ok
* kaleido mask setup
* small cleanup
* kaleido mask OK
* mask cleanup
* small fix
* quest page setup
* doc save prompt
* sync with prompt docs
* KaleidoScope_Update WIP
* More progress on KaleidoScope_Update
* kaleido update cleanup
* KaleidoScope_Update OK
* Slightly cleaner match in KaleidoScope_Update
* match KaleidoScope_DrawPages and KaleidoScope_DrawGameOver, organize data
* more cleanup
* match KaleidoScope_Draw and KaleidoScope_SetView
* match KaleidoScope_UpdateNamePanel
* match another 2 funcs, segment docs
* another KaleidoScope_UpdateNamePanel ?
* swap update name panel names
* another match, only 2 large/similar vtx function in kaleido nes
* more setup for drawInfoPanel
* match KaleidoScope_DrawDungeonStrayFairyCount, 8 funcs left
* document KaleidoScope_DrawDungeonStrayFairyCount
* KaleidoScope_DrawInfoPanel1 WIP
* match KaleidoScope_DrawInfoPanel2
* gameover pause states
* name two pause states
* match KaleidoScope_UpdateDungeonCursor and KaleidoScope_UpdateWorldMapCursor
* match KaleidoScope_DrawDungeonMap
* KaleidoScope_DrawWorldMap WIP
* cleanup map
* some cursor/texture docs
* more cursor docs
* KaleidoScope_UpdateQuestCursor wip
* match KaleidoScope_UpdateQuestCursor
* quest cleanup
* KaleidoScope_DrawQuestStatus WIP, broke gakufu
* match KaleidoScope_DrawInfoPanel1, Kaleido NES OK
* pause substates
* more cleanup
* map progress
* very small improvements to KaleidoScope_DrawWorldMap
* match KaleidoScope_DrawWorldMap
* cleanup KaleidoScope_DrawWorldMap
* rematch EnGakufu_ProcessNotes, thanks anon58
* gameover and misc docs
* more docs
* small cleanup of maps
* owl warp and other docs
* symmetry in pause state
* some docs and cleanup
* docs
* more docs from OoT WIP
* fix
* quest page docs
* more enums
* more cleanup and enums
* another round of docs
* doc cursor indices
* map docs
* some docs
* cleanup for-loops
* cleanup
* else if
* small docs
* icon_item_field_static
* dungeon static
* eol
* icon item jpn static
* vtx static
* jpn static comments
* import parameter texture functions
* mask cleanup
* sync with PRs
* some docs
* more docs
* fix bss
* some docs
* sync with PR
* quest docs
* fix quest vtx
* sync with PR
* sync with PR
* fix typo
* small cleanup
* vtx madness
* more vtx
* add quad docs
* cleanup vtx
* cleanup
* cleanup
* revert gbi changes
* cleanup
* more cleanup
* another cleanup
* remove empty comment
* some PR review
* more naming suggestions
* namefixer
* L button to Z button
---------
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
Diffstat (limited to 'src/code/z_actor.c')
| -rw-r--r-- | src/code/z_actor.c | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/src/code/z_actor.c b/src/code/z_actor.c index e86a341fd..3d98c8f46 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -849,17 +849,12 @@ void TitleCard_Draw(GameState* gameState, TitleCardContext* titleCtx) { if (titleCtx->alpha != 0) { s32 width = titleCtx->width; s32 height = titleCtx->height; - s32 unk1; - s32 spC0; - s32 sp38; - s32 spB8; - s32 spB4; - s32 temp; - - temp = width * 2; - spC0 = (titleCtx->x * 4) - temp; - spB8 = (titleCtx->y * 4) - (height * 2); - sp38 = width * 2; + s32 doubleWidth = width * 2; + s32 titleX = (titleCtx->x * 4) - doubleWidth; + s32 doubleHeight = height * 2; + s32 titleY = (titleCtx->y * 4) - doubleHeight; + s32 titleSecondY; + s32 textureLanguageOffset; OPEN_DISPS(gameState->gfxCtx); @@ -867,29 +862,30 @@ void TitleCard_Draw(GameState* gameState, TitleCardContext* titleCtx) { height = TMEM_SIZE / width; } - spB4 = spB8 + (height * 4); + titleSecondY = titleY + (height * 4); OVERLAY_DISP = Gfx_SetupDL52_NoCD(OVERLAY_DISP); gDPSetPrimColor(OVERLAY_DISP++, 0, 0, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->alpha); - gDPLoadTextureBlock(OVERLAY_DISP++, (s32*)titleCtx->texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, + gDPLoadTextureBlock(OVERLAY_DISP++, titleCtx->texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(OVERLAY_DISP++, spC0, spB8, ((sp38 * 2) + spC0) - 4, spB8 + (height * 4) - 1, + gSPTextureRectangle(OVERLAY_DISP++, titleX, titleY, ((doubleWidth * 2) + titleX) - 4, titleY + (height * 4) - 1, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); height = titleCtx->height - height; + // If texture is bigger than 0x1000, display the rest if (height > 0) { - gDPLoadTextureBlock(OVERLAY_DISP++, (s32)titleCtx->texture + 0x1000, G_IM_FMT_IA, G_IM_SIZ_8b, width, + gDPLoadTextureBlock(OVERLAY_DISP++, (uintptr_t)titleCtx->texture + 0x1000, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(OVERLAY_DISP++, spC0, spB4, ((sp38 * 2) + spC0) - 4, spB4 + (height * 4) - 1, - G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); + gSPTextureRectangle(OVERLAY_DISP++, titleX, titleSecondY, ((doubleWidth * 2) + titleX) - 4, + titleSecondY + (height * 4) - 1, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); } CLOSE_DISPS(gameState->gfxCtx); |
