summaryrefslogtreecommitdiff
path: root/src/m_Do/m_Do_graphic.cpp
diff options
context:
space:
mode:
authorjdflyer <jdflyer10@gmail.com>2023-02-13 21:18:12 +0000
committerjdflyer <jdflyer10@gmail.com>2023-02-13 21:51:27 +0000
commit5e8381337290de3b0dfa77c7cffae990a00046e1 (patch)
tree965b117e7d201029bb383f871fac959993376189 /src/m_Do/m_Do_graphic.cpp
parentd5f5d4c3b334ee1d0390196f3a781350b41f84ad (diff)
m_Do cleanup and c_dylink process names
Diffstat (limited to 'src/m_Do/m_Do_graphic.cpp')
-rw-r--r--src/m_Do/m_Do_graphic.cpp36
1 files changed, 19 insertions, 17 deletions
diff --git a/src/m_Do/m_Do_graphic.cpp b/src/m_Do/m_Do_graphic.cpp
index f7df99c6e7..6d65f7954d 100644
--- a/src/m_Do/m_Do_graphic.cpp
+++ b/src/m_Do/m_Do_graphic.cpp
@@ -1,7 +1,7 @@
-//
-// Generated By: dol2asm
-// Translation Unit: m_Do/m_Do_graphic
-//
+/**
+ * m_Do_graphic.cpp
+ * Graphics Management Functions
+ */
#include "m_Do/m_Do_graphic.h"
#include "JSystem/JFramework/JFWSystem.h"
@@ -162,22 +162,24 @@ extern "C" u8 sManager__10JUTProcBar[4];
// extra mr optimized out?
#ifdef NONMATCHING
static ResTIMG* createTimg(u16 width, u16 height, u32 format) {
- u32 buf_size = GXGetTexBufferSize(width, height, format, GX_FALSE, 0) + 0x20;
- ResTIMG* timg = (ResTIMG*)JKRHeap::alloc(buf_size, 0x20, NULL);
+ u32 bufferSize = GXGetTexBufferSize(width, height, format, GX_FALSE, 0) + 0x20;
+ ResTIMG* timg;
+
+ timg = (ResTIMG*)JKRHeap::alloc(bufferSize, 0x20, NULL);
- if (timg == NULL) {
+ if (timg==NULL) {
return NULL;
- } else {
- cLib_memSet(timg, 0, buf_size);
- timg->format = format;
- timg->alphaEnabled = false;
- timg->width = width;
- timg->height = height;
- timg->minFilter = GX_LINEAR;
- timg->magFilter = GX_LINEAR;
- timg->mipmapCount = 1;
- timg->imageOffset = 0x20;
}
+
+ cLib_memSet(timg, 0, bufferSize);
+ timg->format = format;
+ timg->alphaEnabled = false;
+ timg->width = width;
+ timg->height = height;
+ timg->minFilter = GX_LINEAR;
+ timg->magFilter = GX_LINEAR;
+ timg->mipmapCount = 1;
+ timg->imageOffset = 0x20;
return timg;
}
#else