From 34492a4386446fc82220fe0684ff521d760e84bd Mon Sep 17 00:00:00 2001 From: Anghelo Carvajal Date: Sun, 26 Nov 2023 09:47:21 -0300 Subject: 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 * 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 --- src/code/z_play.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/code/z_play.c') 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; -- cgit v1.2.3