summaryrefslogtreecommitdiff
path: root/src/code/z_play.c
diff options
context:
space:
mode:
authorAnghelo Carvajal <angheloalf95@gmail.com>2023-11-26 09:47:21 -0300
committerGitHub <noreply@github.com>2023-11-26 09:47:21 -0300
commit34492a4386446fc82220fe0684ff521d760e84bd (patch)
tree83057f1f50259946874ff3af70109395de158be1 /src/code/z_play.c
parentb25e64d1bd2ece30301f9fa5af78f963afd0cf76 (diff)
Move the system heap and the framebuffers to their own segments (#1488)
* make segments for the systemheap and the framebuffers * define in the makefile * undefined syms * Make segments for the pre boot buffers too * Update spec Co-authored-by: Parker <20159000+jpburnett@users.noreply.github.com> * review * Update spec Co-authored-by: Parker <20159000+jpburnett@users.noreply.github.com> * Update Makefile Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * comments * comment * move comment about the hardcoded address to buffers.h * rewrite SYSTEM_HEAP_END_ADDR in terms of other symbols * Use `ALIGNED` on all the buffers * Rename SYSTEM_HEAP_END_ADDR to FRAMEBUFFERS_START_ADDR * Put ALIGNED at the right like the rest of the codebase * merge * gLoBuffer * gHiBuffer * Add a static assert to ensure the address of gHiBuffer haven't shifted without the user noticing * smol include cleanup --------- Co-authored-by: Parker <20159000+jpburnett@users.noreply.github.com> Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
Diffstat (limited to 'src/code/z_play.c')
-rw-r--r--src/code/z_play.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/code/z_play.c b/src/code/z_play.c
index 226980b4d..ca4fb500d 100644
--- a/src/code/z_play.c
+++ b/src/code/z_play.c
@@ -248,7 +248,7 @@ void Play_TriggerPictoPhoto(void) {
void Play_TakePictoPhoto(PreRender* prerender) {
PreRender_ApplyFilters(prerender);
- Play_ConvertRgba16ToIntensityImage(gPictoPhotoI8, prerender->fbufSave, SCREEN_WIDTH, PICTO_PHOTO_TOPLEFT_X,
+ Play_ConvertRgba16ToIntensityImage(gHiBuffer.pictoPhotoI8, prerender->fbufSave, SCREEN_WIDTH, PICTO_PHOTO_TOPLEFT_X,
PICTO_PHOTO_TOPLEFT_Y, (PICTO_PHOTO_TOPLEFT_X + PICTO_PHOTO_WIDTH) - 1,
(PICTO_PHOTO_TOPLEFT_Y + PICTO_PHOTO_HEIGHT) - 1, 8);
}
@@ -2262,10 +2262,10 @@ void Play_Init(GameState* thisx) {
PreRender_SetValues(&this->pauseBgPreRender, gCfbWidth, gCfbHeight, NULL, NULL);
this->unk_18E64 = gWorkBuffer;
- this->pictoPhotoI8 = gPictoPhotoI8;
- this->unk_18E68 = D_80784600;
- this->unk_18E58 = D_80784600;
- this->unk_18E60 = D_80784600;
+ this->pictoPhotoI8 = gHiBuffer.pictoPhotoI8;
+ this->unk_18E68 = gHiBuffer.D_80784600;
+ this->unk_18E58 = gHiBuffer.D_80784600;
+ this->unk_18E60 = gHiBuffer.D_80784600;
gTransitionTileState = TRANS_TILE_OFF;
this->transitionMode = TRANS_MODE_OFF;
D_801D0D54 = false;