@@ -5034,12 +5034,15 @@ void Mod::errorHandler(uint16_t error, gc::OSContext::OSContext *context, uint32
5034
5034
&ImageWidth);
5035
5035
5036
5036
// Set up and load the texture object
5037
+ uint16_t SheetWidth = tempFontData->sheetWidth ;
5038
+ uint16_t SheetHeight = tempFontData->sheetHeight ;
5039
+
5037
5040
gc::gx::GXTexObj TexObj;
5038
5041
gc::gx::GXInitTexObj (
5039
5042
&TexObj,
5040
5043
Image,
5041
- tempFontData-> sheetWidth ,
5042
- tempFontData-> sheetHeight ,
5044
+ SheetWidth ,
5045
+ SheetHeight ,
5043
5046
static_cast <gc::gx::GXTexFmt>(tempFontData->sheetFormat ),
5044
5047
gc::gx::GXTexWrapMode::GX_CLAMP,
5045
5048
gc::gx::GXTexWrapMode::GX_CLAMP,
@@ -5052,8 +5055,8 @@ void Mod::errorHandler(uint16_t error, gc::OSContext::OSContext *context, uint32
5052
5055
gc::mtx::mtx34 MtxTextImage;
5053
5056
gc::mtx::PSMTXScale (
5054
5057
MtxTextImage,
5055
- 1 .f / static_cast <float >(tempFontData-> sheetWidth ),
5056
- 1 .f / static_cast <float >(tempFontData-> sheetHeight ),
5058
+ 1 .f / static_cast <float >(SheetWidth ),
5059
+ 1 .f / static_cast <float >(SheetHeight ),
5057
5060
1 .f );
5058
5061
5059
5062
gc::gx::GXLoadTexMtxImm (
@@ -5082,15 +5085,18 @@ void Mod::errorHandler(uint16_t error, gc::OSContext::OSContext *context, uint32
5082
5085
4 );
5083
5086
5084
5087
// Get the positions for the images and text
5088
+ uint16_t CellWidth = tempFontData->cellWidth ;
5089
+ uint16_t CellHeight = tempFontData->cellHeight ;
5090
+
5085
5091
int16_t ImagePosLeft = static_cast <int16_t >(ImagePosX);
5086
- int16_t ImagePosRight = static_cast <int16_t >(ImagePosLeft + tempFontData-> cellWidth );
5092
+ int16_t ImagePosRight = static_cast <int16_t >(ImagePosLeft + CellWidth );
5087
5093
int16_t ImagePosTop = static_cast <int16_t >(ImagePosY);
5088
- int16_t ImagePosBottom = static_cast <int16_t >(ImagePosTop + tempFontData-> cellHeight );
5094
+ int16_t ImagePosBottom = static_cast <int16_t >(ImagePosTop + CellHeight );
5089
5095
5090
5096
int16_t TextPosLeft = static_cast <int16_t >(textPosX);
5091
- int16_t TextPosRight = static_cast <int16_t >(TextPosLeft + tempFontData-> cellWidth );
5097
+ int16_t TextPosRight = static_cast <int16_t >(TextPosLeft + CellWidth );
5092
5098
int16_t TextPosTop = static_cast <int16_t >(textPosY);
5093
- int16_t TextPosBottom = static_cast <int16_t >(TextPosTop + tempFontData-> cellHeight );
5099
+ int16_t TextPosBottom = static_cast <int16_t >(TextPosTop + CellHeight );
5094
5100
5095
5101
// Draw the images and text
5096
5102
gc::ppc::writeGatherPipe.s16 = TextPosLeft;
0 commit comments