From 4bbbdc39fd5e5a44511d8c21012013692f805ec4 Mon Sep 17 00:00:00 2001 From: dark-samus Date: Mon, 23 Mar 2020 20:01:52 -0400 Subject: [PATCH] use a better variable name --- src/code/fault_drawer.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/code/fault_drawer.c b/src/code/fault_drawer.c index cc2195172a..ef7a784aea 100644 --- a/src/code/fault_drawer.c +++ b/src/code/fault_drawer.c @@ -97,15 +97,14 @@ void FaultDrawer_DrawRecImpl(s32 xStart, s32 yStart, s32 xEnd, s32 yEnd, u16 col void FaultDrawer_DrawChar(char c) { u16* fb; s32 x, y; - s32 test; u32* dataPtr; u32 data; s32 cursorX = sFaultDrawerStruct.cursorX; s32 cursorY = sFaultDrawerStruct.cursorY; - u32** temp = &sFaultDrawerStruct.fontData; + u32** fontData = &sFaultDrawerStruct.fontData; + s32 shift = c % 4; - test = c % 4; - dataPtr = &temp[0][(((c / 8) * 16) + ((c & 4) >> 2))]; + dataPtr = &fontData[0][(((c / 8) * 16) + ((c & 4) >> 2))]; fb = sFaultDrawerStruct.fb + (sFaultDrawerStruct.w * cursorY) + cursorX; if ((sFaultDrawerStruct.xStart <= cursorX) && @@ -113,7 +112,7 @@ void FaultDrawer_DrawChar(char c) { (sFaultDrawerStruct.yStart <= cursorY) && ((sFaultDrawerStruct.charH + cursorY - 1) <= sFaultDrawerStruct.yEnd)) { for (y = 0; y < sFaultDrawerStruct.charH; y++) { - u32 mask = 0x10000000 << test; + u32 mask = 0x10000000 << shift; data = *dataPtr; for (x = 0; x < sFaultDrawerStruct.charW; x++) { if (mask & data) {