| 119 | } |
| 120 | |
| 121 | void JUTConsole::doDraw(JUTConsole::EConsoleType consoleType) const |
| 122 | { |
| 123 | f32 font_yOffset; |
| 124 | s32 changeLine_1; |
| 125 | s32 changeLine_2; |
| 126 | |
| 127 | if (mIsVisible && (mFont || consoleType == CONSOLE_TYPE_2)) |
| 128 | { |
| 129 | if (mHeight != 0) |
| 130 | { |
| 131 | bool isConsoleType0 = consoleType == CONSOLE_TYPE_0 ? true : false; |
| 132 | font_yOffset = 2.0f + mFontSizeY; |
| 133 | |
| 134 | if (consoleType != CONSOLE_TYPE_2) |
| 135 | { |
| 136 | if (!JUTVideo::getManager()) |
| 137 | { |
| 138 | J2DOrthoGraph ortho(0.0f, 0.0f, 640.0f, 480.0f, -1.0f, 1.0f); |
| 139 | ortho.setPort(); |
| 140 | } |
| 141 | else |
| 142 | { |
| 143 | J2DOrthoGraph ortho(0.0f, 0.0f, JUTVideo::getManager()->getFbWidth(), |
| 144 | JUTVideo::getManager()->getEfbHeight(), -1.0f, 1.0f); |
| 145 | ortho.setPort(); |
| 146 | } |
| 147 | |
| 148 | const JUtility::TColor *color; |
| 149 | if (isConsoleType0) |
| 150 | { |
| 151 | color = &_60; |
| 152 | } |
| 153 | else |
| 154 | { |
| 155 | color = &_5C; |
| 156 | } |
| 157 | |
| 158 | J2DFillBox(mPositionX - 2, (int)(mPositionY - font_yOffset), |
| 159 | (int)((mFontSizeX * _20) + 4.0f), (int)(font_yOffset * mHeight), |
| 160 | *color); |
| 161 | mFont->setGX(); |
| 162 | |
| 163 | if (isConsoleType0) |
| 164 | { |
| 165 | s32 s = (diffIndex(_30, _38) - mHeight) + 1; |
| 166 | if (s <= 0) |
| 167 | { |
| 168 | mFont->setCharColor(JUtility::TColor(255, 255, 255, 255)); |
| 169 | } |
| 170 | else if (_30 == _34) |
| 171 | { |
| 172 | mFont->setCharColor(JUtility::TColor(255, 230, 230, 255)); |
| 173 | } |
| 174 | else |
| 175 | { |
| 176 | mFont->setCharColor(JUtility::TColor(230, 230, 255, 255)); |
| 177 | } |
| 178 | } |
no test coverage detected