summaryrefslogtreecommitdiff
path: root/src/code/PreRender.c
diff options
context:
space:
mode:
authorAnghelo Carvajal <angheloalf95@gmail.com>2023-03-08 15:25:51 -0300
committerGitHub <noreply@github.com>2023-03-08 15:25:51 -0300
commit2f1e7b3de8695c8f093c18ee6fe2e9e5c4c9e15a (patch)
treead11aaf28012ed42d6cdda9a8ae6ca55bad1387f /src/code/PreRender.c
parent9f529aaf2a3aa2d5a10e1273babf7781ab9faabc (diff)
Stack cleanups (#1193)
* Use STACK and STACK_TOP everywhere * format * remove fake variable * bss * review Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * Update src/boot_O2_g3/boot_main.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * review * renames * more renames * and more * whoopsie, forgot those too * hopefully the last cleanup * forgot some stuff * a * bss --------- Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
Diffstat (limited to 'src/code/PreRender.c')
-rw-r--r--src/code/PreRender.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/code/PreRender.c b/src/code/PreRender.c
index 599f4c8d3..247325251 100644
--- a/src/code/PreRender.c
+++ b/src/code/PreRender.c
@@ -1,4 +1,5 @@
#include "global.h"
+#include "stack.h"
/**
* Assigns the "save" values in PreRender
@@ -410,19 +411,24 @@ void PreRender_ApplyFilters(PreRender* this) {
}
}
+extern SlowlyTask D_801F6E00;
+extern s32 D_801F6FC0;
+extern StackEntry sSlowlyStackInfo;
+extern STACK(sSlowlyStack, 0x1000);
+
/**
* Initializes `PreRender_ApplyFilters` onto a new "slowly" thread
*/
void PreRender_ApplyFiltersSlowlyInit(PreRender* this) {
if ((this->cvgSave != NULL) && (this->fbufSave != NULL)) {
if (D_801F6FC0) {
- StackCheck_Cleanup(&slowlyStackEntry);
+ StackCheck_Cleanup(&sSlowlyStackInfo);
Slowly_Stop(&D_801F6E00);
}
this->unk_4D = 1;
- StackCheck_Init(&slowlyStackEntry, slowlyStack, &slowlyStack[4096], 0, 0x100, "slowly");
- Slowly_Start(&D_801F6E00, &D_801F7FE8, PreRender_ApplyFilters, this, NULL);
+ StackCheck_Init(&sSlowlyStackInfo, sSlowlyStack, STACK_TOP(sSlowlyStack), 0, 0x100, "slowly");
+ Slowly_Start(&D_801F6E00, STACK_TOP(sSlowlyStack), PreRender_ApplyFilters, this, NULL);
D_801F6FC0 = true;
}
}
@@ -432,7 +438,7 @@ void PreRender_ApplyFiltersSlowlyInit(PreRender* this) {
*/
void PreRender_ApplyFiltersSlowlyDestroy(PreRender* this) {
if (D_801F6FC0) {
- StackCheck_Cleanup(&slowlyStackEntry);
+ StackCheck_Cleanup(&sSlowlyStackInfo);
Slowly_Stop(&D_801F6E00);
D_801F6FC0 = false;
}