1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-06-26 05:17:36 +00:00

more font

This commit is contained in:
Sergeanur 2020-06-07 10:36:37 +03:00
parent 0d0e519e68
commit a44510d1df
5 changed files with 251 additions and 327 deletions

View file

@ -160,7 +160,7 @@ cMusicManager::DisplayRadioStationName()
CFont::SetBackgroundOff(); CFont::SetBackgroundOff();
CFont::SetScale(SCREEN_SCALE_X(0.8f), SCREEN_SCALE_Y(1.35f)); CFont::SetScale(SCREEN_SCALE_X(0.8f), SCREEN_SCALE_Y(1.35f));
CFont::SetPropOn(); CFont::SetPropOn();
CFont::SetFontStyle(FONT_HEADING); CFont::SetFontStyle(FONT_STANDARD);
CFont::SetCentreOn(); CFont::SetCentreOn();
CFont::SetCentreSize(SCREEN_SCALE_X(640.0f)); CFont::SetCentreSize(SCREEN_SCALE_X(640.0f));
CFont::SetColor(CRGBA(0, 0, 0, 255)); CFont::SetColor(CRGBA(0, 0, 0, 255));

View file

@ -15,7 +15,7 @@ uint8 CFont::LanguageSet = FONT_LANGSET_EFIGS;
int32 CFont::Slot = -1; int32 CFont::Slot = -1;
#define JAP_TERMINATION (0x8000 | '~') #define JAP_TERMINATION (0x8000 | '~')
int16 CFont::Size[LANGSET_MAX][MAX_FONTS][193] = { int16 CFont::Size[LANGSET_MAX][MAX_FONTS][210] = {
{ {
#else #else
int16 CFont::Size[MAX_FONTS][210] = { int16 CFont::Size[MAX_FONTS][210] = {
@ -169,8 +169,19 @@ wchar foreign_table[128] = {
0, 174, 165, 166, 167, 0, 168, 0, 0, 169, 170, 171, 172, 0, 0, 0, 0, 174, 165, 166, 167, 0, 168, 0, 0, 169, 170, 171, 172, 0, 0, 0,
}; };
union tFontRenderStatePointer
{
CFontRenderState *pRenderState;
wchar *pStr;
void* FontRenderStatePointer; void Align()
{
if ((uintptr)pStr % 4)
pStr++;
}
};
tFontRenderStatePointer FontRenderStatePointer;
uint8 FontRenderStateBuf[1024]; uint8 FontRenderStateBuf[1024];
void void
@ -291,17 +302,9 @@ CFont::Shutdown(void)
void void
CFont::InitPerFrame(void) CFont::InitPerFrame(void)
{ {
//Details.bank = CSprite2d::GetBank(30, Sprite[0].m_pTexture); RenderState.style = -1;
//CSprite2d::GetBank(15, Sprite[1].m_pTexture);
//CSprite2d::GetBank(15, Sprite[2].m_pTexture);
RenderState.FontStyle = -1;
Details.anonymous_25 = 0; Details.anonymous_25 = 0;
FontRenderStatePointer = FontRenderStateBuf; FontRenderStatePointer.pRenderState = (CFontRenderState*)FontRenderStateBuf;
#ifdef MORE_LANGUAGES
if (IsJapanese())
CSprite2d::GetBank(15, Sprite[3].m_pTexture);
#endif
SetDropShadowPosition(0); SetDropShadowPosition(0);
NewLine = 0; NewLine = 0;
} }
@ -328,17 +331,40 @@ CFont::PrintChar(float x, float y, wchar c)
} }
#endif #endif
if(Details.style == FONT_BANK || Details.style == FONT_HEADING){ if(Details.style == FONT_BANK || Details.style == FONT_STANDARD){
if (bDontPrint) return; if (bDontPrint) return;
CSprite2d::AddToBuffer( if (RenderState.slant == 0.0f) {
CRect(x, y, if (c < 193) {
x + 32.0f * RenderState.fTextSizeX * w, CSprite2d::AddToBuffer(
y + 32.0f * RenderState.fTextSizeX * 0.5f), CRect(x, y,
RenderState.color, x + 32.0f * RenderState.scaleX * 1.0f,
xoff/16.0f, yoff/16.0f, y + 40.0f * RenderState.scaleY * 0.5f),
(xoff+ w)/16.0f, yoff/ 16.0f, RenderState.color,
xoff/16.0f, (yoff+1.0f)/ 16.0f, xoff / 16.0f, yoff / 12.8f + 0.0021f,
(xoff+ w)/16.0f - 0.0001f, (yoff+1.0f)/ 16.0f - 0.0001f); (xoff + 1.0f) / 16.0f - 0.001f, yoff / 12.8f + 0.0021f,
xoff / 16.0f, (yoff + 1.0f) / 12.8f - 0.0021f,
(xoff + 1.0f) / 16.0f - 0.001f, (yoff + 1.0f) / 12.8f - 0.0021f);
} else {
CSprite2d::AddToBuffer(
CRect(x, y,
x + 32.0f * RenderState.scaleX * 1.0f,
y + 33.0f * RenderState.scaleY * 0.5f),
RenderState.color,
xoff / 16.0f, yoff / 12.8f,
(xoff + 1.0f) / 16.0f - 0.001f, yoff / 12.8f - 0.017f,
xoff / 16.0f, (yoff + 1.0f) / 12.8f,
(xoff + 1.0f) / 16.0f - 0.001f, (yoff + 1.0f) / 12.8f - 0.017f);
}
} else
CSprite2d::AddToBuffer(
CRect(x, y,
x + 32.0f * RenderState.scaleX * 1.0f,
y + 40.0f * RenderState.scaleY * 0.5f),
RenderState.color,
xoff / 16.0f, yoff / 12.8f + 0.00055f,
(xoff + 1.0f) / 16.0f - 0.001f, yoff / 12.8f + 0.0021f + 0.01f,
xoff / 16.0f, (yoff + 1.0f) / 12.8f - 0.009f,
(xoff + 1.0f) / 16.0f - 0.001f, (yoff + 1.0f) / 12.8f - 0.0021f + 0.01f);
#ifdef MORE_LANGUAGES #ifdef MORE_LANGUAGES
}else if (IsJapaneseFont()) { }else if (IsJapaneseFont()) {
if (Details.dropShadowPosition != 0) { if (Details.dropShadowPosition != 0) {
@ -363,47 +389,17 @@ CFont::PrintChar(float x, float y, wchar c)
xoff * w / 1024.0f, (yoff + 1.0f) / 25.6f - 0.002f, xoff * w / 1024.0f, (yoff + 1.0f) / 25.6f - 0.002f,
xoff * w / 1024.0f + (1.0f / 48.0f) - 0.001f, (yoff + 1.0f) / 25.6f - 0.0001f); xoff * w / 1024.0f + (1.0f / 48.0f) - 0.001f, (yoff + 1.0f) / 25.6f - 0.0001f);
#endif #endif
} } else {
else
{
if (bDontPrint) return; if (bDontPrint) return;
if (RenderState.fSlant == 0.0f) CSprite2d::AddToBuffer(
{ CRect(x, y,
if (c < 193) x + 32.0f * RenderState.scaleX * w,
{ y + 32.0f * RenderState.scaleX * 0.5f),
CSprite2d::AddToBuffer( RenderState.color,
CRect(x, y, xoff / 16.0f, yoff / 16.0f,
x + 32.0f * RenderState.fTextSizeX * 1.0f, (xoff + w) / 16.0f, yoff / 16.0f,
y + 40.0f * RenderState.fTextSizeY * 0.5f), xoff / 16.0f, (yoff + 1.0f) / 16.0f,
RenderState.color, (xoff + w) / 16.0f - 0.0001f, (yoff + 1.0f) / 16.0f - 0.0001f);
xoff / 16.0f, yoff / 12.8f + 0.0021f,
(xoff + 1.0f) / 16.0f - 0.001f, yoff / 12.8f + 0.0021f,
xoff / 16.0f, (yoff + 1.0f) / 12.8f + 0.0021f,
(xoff + 1.0f) / 16.0f - 0.001f, (yoff + 1.0f) / 12.8f + 0.0021f);
}
else
{
CSprite2d::AddToBuffer(
CRect(x, y,
x + 32.0f * RenderState.fTextSizeX * 1.0f,
y + 33.0f * RenderState.fTextSizeY * 0.5f),
RenderState.color,
xoff / 16.0f, yoff / 12.8f,
(xoff + 1.0f) / 16.0f - 0.001f, yoff / 12.8f - 0.017f,
xoff / 16.0f, (yoff + 1.0f) / 12.8f,
(xoff + 1.0f) / 16.0f - 0.001f, (yoff+1.0f) / 12.8f - 0.017f);
}
}
else
CSprite2d::AddToBuffer(
CRect(x, y,
x + 32.0f * RenderState.fTextSizeX * 1.0f,
y + 40.0f * RenderState.fTextSizeY * 0.5f),
RenderState.color,
xoff / 16.0f, yoff / 12.8f,
(xoff + 1.0f) / 16.0f - 0.001f, yoff / 12.8f + 0.0021f + 0.01f,
xoff / 16.0f, (yoff + 1.0f) / 12.8f,
(xoff + 1.0f) / 16.0f - 0.001f, (yoff + 1.0f) / 12.8f + 0.0021f + 0.01f);
} }
} }
@ -484,6 +480,8 @@ CFont::PrintString(float xstart, float ystart, wchar *s)
xstart; xstart;
#ifdef MORE_LANGUAGES #ifdef MORE_LANGUAGES
PrintString(xleft, y, start, s, spaceWidth, xstart); PrintString(xleft, y, start, s, spaceWidth, xstart);
#else
PrintString(xleft, y, Details.anonymous_25, start, s, spaceWidth);
#endif #endif
// reset things // reset things
lineLength = 0.0f; lineLength = 0.0f;
@ -563,7 +561,7 @@ CFont::PrintString(float xstart, float ystart, wchar *s)
lineLength = 0.0f; lineLength = 0.0f;
} }
#else #else
PrintString(xleft, y, start, s, 0.0f); PrintString(xleft, y, Details.anonymous_25, start, s, 0.0f);
#endif #endif
} }
} }
@ -804,103 +802,81 @@ CFont::PrintString(float x, float y, wchar *start, wchar *&end, float spwidth, f
} }
#else #else
void void
CFont::PrintString(float x, float y, wchar *start, wchar *end, float spwidth) CFont::PrintString(float x, float y, uint32, wchar *start, wchar *end, float spwidth)
{ {
wchar *s, c, unused; wchar *s;
if (RenderState.FontStyle != Details.style) if (RenderState.style != Details.style) {
{
RenderFontBuffer(); RenderFontBuffer();
RenderState.FontStyle = Details.style; RenderState.style = Details.style;
} }
float v7 = CFont::Details.dropShadowPosition; float dropShadowPosition = CFont::Details.dropShadowPosition;
if (v7 != 0.0f && (CFont::Details.style == 0 || CFont::Details.style == 1)) if (dropShadowPosition != 0.0f && (CFont::Details.style == FONT_BANK || CFont::Details.style == FONT_STANDARD)) {
{ CRGBA color = Details.color;
auto v8 = CFont::Details.color; Details.color = Details.dropColor;
CFont::Details.color = CFont::Details.dropColor; Details.dropShadowPosition = 0;
CFont::Details.dropShadowPosition = 0; Details.bIsShadow = true;
CFont::Details.bIsShadow = true; if (Details.slant != 0.0f) {
if (0.0f != CFont::Details.slant) Details.slantRefX += dropShadowPosition;
{ Details.slantRefY += dropShadowPosition;
CFont::Details.slantRefX = (double)v7 + CFont::Details.slantRefX; PrintString(dropShadowPosition + x, dropShadowPosition + y, Details.anonymous_25, start, end, spwidth);
CFont::Details.slantRefY = (double)v7 + CFont::Details.slantRefY; Details.slantRefX -= dropShadowPosition;
//CFont::PrintString(v7 + x, v7 + y, CFont::Details.anonymous_25, a4, a5, a6); Details.slantRefY -= dropShadowPosition;
CFont::PrintString(v7 + x, v7 + y, start, end, spwidth); } else {
CFont::Details.slantRefX = CFont::Details.slantRefX - (double)v7; PrintString(dropShadowPosition + x, dropShadowPosition + y, Details.anonymous_25, start, end, spwidth);
CFont::Details.slantRefY = CFont::Details.slantRefY - (double)v7;
} }
else Details.color = color;
{ Details.dropShadowPosition = dropShadowPosition;
//CFont::PrintString(v12, v11, CFont::Details.anonymous_25, a4, a5, a6); Details.bIsShadow = 0;
CFont::PrintString(v7 + x, v7 + y, start, end, spwidth);
}
CFont::Details.color = v8;
CFont::Details.dropShadowPosition = v7;
CFont::Details.bIsShadow = 0;
} }
if (FontRenderStatePointer >= (char*)&FontRenderStatePointer - 2 * (end - start + 26)) if (FontRenderStatePointer.pStr >= (wchar*)&FontRenderStateBuf[1024] - (end - start + 26)) // why 26?
CFont::RenderFontBuffer(); CFont::RenderFontBuffer();
CFontRenderState* v13 = (CFontRenderState*)FontRenderStatePointer; CFontRenderState* pRenderState = FontRenderStatePointer.pRenderState;
v13->fTextPosX = x; pRenderState->fTextPosX = x;
v13->fTextPosY = y; pRenderState->fTextPosY = y;
v13->fTextSizeX = CFont::Details.scaleX; pRenderState->scaleX = Details.scaleX;
v13->fTextSizeY = CFont::Details.scaleY; pRenderState->scaleY = Details.scaleY;
v13->color.r = CFont::Details.color.r; pRenderState->color = Details.color;
v13->color.g = CFont::Details.color.g; pRenderState->fExtraSpace = spwidth;
v13->color.b = CFont::Details.color.b; pRenderState->slant = Details.slant;
v13->color.a = CFont::Details.color.a; pRenderState->slantRefX = Details.slantRefX;
v13->fExtraSpace = spwidth; pRenderState->slantRefY = Details.slantRefY;
v13->fSlant = CFont::Details.slant; pRenderState->bFontHalfTexture = Details.bFontHalfTexture;
v13->fSlantRefPointX = CFont::Details.slantRefX; pRenderState->proportional = Details.proportional;
v13->fSlantRefPointY = CFont::Details.slantRefY; pRenderState->style = Details.style;
v13->bFontHalfTexture = CFont::Details.bFontHalfTexture; pRenderState->bIsShadow = Details.bIsShadow;
v13->bProp = CFont::Details.proportional; FontRenderStatePointer.pRenderState++;
v13->FontStyle = CFont::Details.style;
v13->bIsShadow = CFont::Details.bIsShadow;
FontRenderStatePointer = (char*)FontRenderStatePointer + 0x30;
for(s = start; s < end; s++){ for(s = start; s < end;){
if (*s == '~') if (*s == '~') {
{ for (wchar *i = ParseToken(s); s != i; FontRenderStatePointer.pStr++) {
for (auto i = ParseToken(s); s != i; FontRenderStatePointer = (char*)FontRenderStatePointer + 2) *FontRenderStatePointer.pStr = *(s++);
{
s = i;
*(wchar*)FontRenderStatePointer = *s;
} }
if (CFont::Details.bFlash) if (Details.bFlash) {
{ if (CTimer::GetTimeInMilliseconds() - Details.nFlashTimer > 300) {
if (CTimer::GetTimeInMilliseconds() - CFont::Details.nFlashTimer > 300)
{
Details.bFlashState = !Details.bFlashState; Details.bFlashState = !Details.bFlashState;
Details.nFlashTimer = CTimer::GetTimeInMilliseconds(); Details.nFlashTimer = CTimer::GetTimeInMilliseconds();
} }
if (Details.bFlashState) Details.color.a = Details.bFlashState ? 0 : 255;
Details.color.a = 0;
else
Details.color.a = 255;
} }
} } else
else *(FontRenderStatePointer.pStr++) = *(s++);
{
*(wchar*)FontRenderStatePointer = *s;
FontRenderStatePointer = (char*)FontRenderStatePointer + 2;
}
/*c = *s - ' ';
if(Details.slant != 0.0f)
y = (Details.slantRefX - x)*Details.slant + Details.slantRefY;
PrintChar(x, y, c);
x += GetCharacterSize(c);
if(c == 0) // space
x += spwidth;*/
} }
*(wchar*)FontRenderStatePointer = 0; *(FontRenderStatePointer.pStr++) = '\0';
FontRenderStatePointer = (char*)FontRenderStatePointer + 2; FontRenderStatePointer.Align();
if ((unsigned __int8)FontRenderStatePointer & 3)
FontRenderStatePointer = (char*)FontRenderStatePointer + 2;
} }
#endif #endif
void
CFont::PrintStringFromBottom(float x, float y, wchar *str)
{
y -= (32.0f * Details.scaleY / 2.0f + 2.0f * Details.scaleY) * GetNumberLines(x, y, str);
if (Details.slant == 0.0f)
y -= ((Details.slantRefX - x) * Details.slant + Details.slantRefY);
PrintString(x, y, str);
}
float float
CFont::GetCharacterWidth(wchar c) CFont::GetCharacterWidth(wchar c)
{ {
@ -938,8 +914,6 @@ CFont::GetCharacterWidth(wchar c)
else else
return Size[LanguageSet][Details.style][192]; return Size[LanguageSet][Details.style][192];
#else #else
if (Details.bFontHalfTexture)
c = FindNewCharacter(c);
if (Details.proportional) if (Details.proportional)
return Size[Details.style][c]; return Size[Details.style][c];
else else
@ -1124,7 +1098,7 @@ CFont::ParseToken(wchar *s, bool japShit)
wchar* wchar*
CFont::ParseToken(wchar *s) CFont::ParseToken(wchar *s)
{ {
Details.anonymous_23 = 0; Details.anonymous_23 = false;
s++; s++;
if(Details.color.r || Details.color.g || Details.color.b) if(Details.color.r || Details.color.g || Details.color.b)
switch(*s){ switch(*s){
@ -1134,27 +1108,26 @@ CFont::ParseToken(wchar *s)
case 'n': case 'n':
NewLine = 1; NewLine = 1;
break; break;
case 'b': SetColor(CRGBA(27, 89, 130, 255)); Details.anonymous_23 = 1; break; case 'b': SetColor(CRGBA(27, 89, 130, 255)); Details.anonymous_23 = true; break;
case 'f': case 'f':
Details.bFlash = !Details.bFlash; Details.bFlash = !Details.bFlash;
if (Details.bFlash) if (Details.bFlash)
Details.color.a = 255; Details.color.a = 255;
break; break;
case 'g': SetColor(CRGBA(255, 150, 225, 255)); Details.anonymous_23 = 1; break; case 'g': SetColor(CRGBA(255, 150, 225, 255)); Details.anonymous_23 = true; break;
case 'h': SetColor(CRGBA(225, 225, 225, 255)); Details.anonymous_23 = 1; break; case 'h': SetColor(CRGBA(225, 225, 225, 255)); Details.anonymous_23 = true; break;
case 'l': SetColor(CRGBA(0, 0, 0, 255)); Details.anonymous_23 = 1; break; case 'l': SetColor(CRGBA(0, 0, 0, 255)); Details.anonymous_23 = true; break;
case 'o': SetColor(CRGBA(229, 125, 126, 255)); Details.anonymous_23 = 1; break; case 'o': SetColor(CRGBA(229, 125, 126, 255)); Details.anonymous_23 = true; break;
case 'p': SetColor(CRGBA(168, 110, 252, 255)); Details.anonymous_23 = 1; break; case 'p': SetColor(CRGBA(168, 110, 252, 255)); Details.anonymous_23 = true; break;
case 'q': SetColor(CRGBA(199, 144, 203, 255)); Details.anonymous_23 = 1; break; case 'q': SetColor(CRGBA(199, 144, 203, 255)); Details.anonymous_23 = true; break;
case 'r': SetColor(CRGBA(255, 150, 225, 255)); Details.anonymous_23 = 1; break; case 'r': SetColor(CRGBA(255, 150, 225, 255)); Details.anonymous_23 = true; break;
case 't': SetColor(CRGBA(86, 212, 146, 255)); Details.anonymous_23 = 1; break; case 't': SetColor(CRGBA(86, 212, 146, 255)); Details.anonymous_23 = true; break;
case 'w': SetColor(CRGBA(175, 175, 175, 255)); Details.anonymous_23 = 1; break; case 'w': SetColor(CRGBA(175, 175, 175, 255)); Details.anonymous_23 = true; break;
case 'x': SetColor(CRGBA(132, 146, 197, 255)); Details.anonymous_23 = 1; break; case 'x': SetColor(CRGBA(132, 146, 197, 255)); Details.anonymous_23 = true; break;
case 'y': SetColor(CRGBA(255, 227, 79, 255)); Details.anonymous_23 = 1; break; case 'y': SetColor(CRGBA(255, 227, 79, 255)); Details.anonymous_23 = true; break;
} }
while(*s != '~') s++; while(*s != '~') s++;
s++; if (*(++s) == '~')
if (*s == '~')
s = ParseToken(s); s = ParseToken(s);
return s; return s;
} }
@ -1163,14 +1136,11 @@ CFont::ParseToken(wchar *s)
wchar* wchar*
CFont::ParseToken(wchar* str, CRGBA &color, bool &flash, bool &bold) CFont::ParseToken(wchar* str, CRGBA &color, bool &flash, bool &bold)
{ {
wchar* v4; // eax
wchar* result; // eax
Details.anonymous_23 = 0; Details.anonymous_23 = 0;
v4 = str + 1; wchar *s = str + 1;
if (Details.color.r || Details.color.g || Details.color.b) if (Details.color.r || Details.color.g || Details.color.b)
{ {
switch (*v4) switch (*s)
{ {
case 'B': case 'B':
bold = !bold; bold = !bold;
@ -1242,12 +1212,11 @@ CFont::ParseToken(wchar* str, CRGBA &color, bool &flash, bool &bold)
break; break;
} }
} }
while (*v4 != '~') while (*s != '~')
++v4; ++s;
result = v4 + 1; if (*(++s) == '~')
if (*result == '~') s = CFont::ParseToken(s, color, flash, bold);
result = CFont::ParseToken(result, color, flash, bold); return s;
return result;
} }
void void
@ -1259,103 +1228,80 @@ CFont::DrawFonts(void)
void void
CFont::RenderFontBuffer() CFont::RenderFontBuffer()
{ {
int v0; // ebx if (FontRenderStatePointer.pRenderState == (CFontRenderState*)FontRenderStateBuf) return;
//wchar_t* v1; // esi
CFontRenderState* v2; // esi
char v3; // al
float v4; // ST04_4
float v5; // ST04_4
signed int v6; // eax
float v7; // [esp+Ch] [ebp-24h]
float v8; // [esp+10h] [ebp-20h]
CRGBA v9; // [esp+1Ch] [ebp-14h]
bool v10; // [esp+22h] [ebp-Eh]
bool v11; // [esp+23h] [ebp-Dh]
if (FontRenderStatePointer != FontRenderStateBuf) { float textPosX;
v11 = false; float textPosY;
v10 = false; CRGBA color;
Sprite[RenderState.FontStyle].SetRenderState(); bool bBold = false;
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE); bool bFlash = false;
RenderState = *(CFontRenderState*)&FontRenderStateBuf[0];
v7 = RenderState.fTextPosX;
v8 = RenderState.fTextPosY;
wchar* string = (wchar*)&FontRenderStateBuf[sizeof(CFontRenderState)];
if (string < FontRenderStatePointer) Sprite[RenderState.style].SetRenderState();
{ RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE);
do RenderState = *(CFontRenderState*)&FontRenderStateBuf[0];
{ textPosX = RenderState.fTextPosX;
if (string[0] == '\0') textPosY = RenderState.fTextPosY;
{ tFontRenderStatePointer pRenderStateBufPointer;
v2 = (CFontRenderState*)((uintptr)string + sizeof(CFontRenderState)); pRenderStateBufPointer.pRenderState = (CFontRenderState*)&FontRenderStateBuf[0];
if ((uintptr)v2 & 3) for (++pRenderStateBufPointer.pRenderState; pRenderStateBufPointer.pStr < FontRenderStatePointer.pStr; pRenderStateBufPointer.pStr++) {
v2 = (CFontRenderState*)((uint8*)v2 + 2); if (*pRenderStateBufPointer.pStr == '\0') {
if (v2 >= FontRenderStatePointer) tFontRenderStatePointer tmpPointer = pRenderStateBufPointer;
break; tmpPointer.pStr++;
tmpPointer.Align();
if (tmpPointer.pStr >= FontRenderStatePointer.pStr)
break;
RenderState = *v2; RenderState = *(tmpPointer.pRenderState++);
v7 = RenderState.fTextPosX; pRenderStateBufPointer = tmpPointer;
v8 = RenderState.fTextPosY;
}
if (string[0] == '~')
{
string = CFont::ParseToken(string, v9, v10, v11);
//string = CFont::ParseToken(string);
if (v10)
{
if (CTimer::GetTimeInMilliseconds() - Details.nFlashTimer > 300) {
Details.bFlashState = !Details.bFlashState;
Details.nFlashTimer = CTimer::GetTimeInMilliseconds();
}
Details.color.alpha = Details.bFlashState ? 0 : 255;
}
if (!RenderState.bIsShadow)
RenderState.color = v9;
}
wchar v0 = string[0];
//LOWORD(v0) = *v1;
v0 -= 32;
if (RenderState.bFontHalfTexture)
v0 = FindNewCharacter(v0);
else if (v0 > 155)
v0 = 0;
if (RenderState.fSlant != 0.0f) textPosX = RenderState.fTextPosX;
v8 = (RenderState.fSlantRefPointX - v7) * RenderState.fSlant + RenderState.fSlantRefPointY; textPosY = RenderState.fTextPosY;
CFont::PrintChar(v7, v8, v0); color = RenderState.color;
if (v11) {
CFont::PrintChar(v7 + 1.0f, v8, v0);
CFont::PrintChar(v7 + 2.0f, v8, v0);
v7 += 2.0f;
}
if (CFont::RenderState.bProp == true)
v6 = CFont::Size[RenderState.FontStyle][v0];
else
v6 = CFont::Size[RenderState.FontStyle][209];
v7 = CFont::RenderState.fTextSizeX * v6 + v7;
if (v0 == 0)
v7 += CFont::RenderState.fExtraSpace;
++string;
} while (string < FontRenderStatePointer);
} }
CSprite2d::RenderVertexBuffer(); if (*pRenderStateBufPointer.pStr == '~') {
FontRenderStatePointer = FontRenderStateBuf; pRenderStateBufPointer.pStr = CFont::ParseToken(pRenderStateBufPointer.pStr, color, bFlash, bBold);
if (bFlash) {
if (CTimer::GetTimeInMilliseconds() - Details.nFlashTimer > 300) {
Details.bFlashState = !Details.bFlashState;
Details.nFlashTimer = CTimer::GetTimeInMilliseconds();
}
Details.color.alpha = Details.bFlashState ? 0 : 255;
}
if (!RenderState.bIsShadow)
RenderState.color = color;
}
wchar c = *pRenderStateBufPointer.pStr;
c -= ' ';
if (RenderState.bFontHalfTexture)
c = FindNewCharacter(c);
else if (c > 155)
c = 0;
if (RenderState.slant != 0.0f)
textPosY = (RenderState.slantRefX - textPosX) * RenderState.slant + RenderState.slantRefY;
PrintChar(textPosX, textPosY, c);
if (bBold) {
PrintChar(textPosX + 1.0f, textPosY, c);
PrintChar(textPosX + 2.0f, textPosY, c);
textPosX += 2.0f;
}
textPosX += CFont::RenderState.scaleX * (RenderState.proportional ? Size[RenderState.style][c] : Size[RenderState.style][209]);
if (c == '\0')
textPosX += CFont::RenderState.fExtraSpace;
} }
CSprite2d::RenderVertexBuffer();
FontRenderStatePointer.pRenderState = (CFontRenderState*)FontRenderStateBuf;
} }
void void
CFont::SetFontStyle(int16 style) CFont::SetFontStyle(int16 style)
{ {
if (style == FONT_HEADING) if (style == FONT_HEADING) {
{
Details.style = FONT_STANDARD; Details.style = FONT_STANDARD;
Details.bFontHalfTexture = true; Details.bFontHalfTexture = true;
} } else {
else
{
Details.style = style; Details.style = style;
Details.bFontHalfTexture = false; Details.bFontHalfTexture = false;
} }
@ -1363,30 +1309,18 @@ CFont::SetFontStyle(int16 style)
wchar CFont::FindNewCharacter(wchar c) wchar CFont::FindNewCharacter(wchar c)
{ {
if (c >= 16 && c <= 26) if (c >= 16 && c <= 26) return c + 128;
return c + 128; if (c >= 8 && c <= 9) return c + 86;
if (c >= 8 && c <= 9) if (c == 4) return c + 89;
return c + 86; if (c == 7) return 206;
if (c == 4) if (c == 14) return 207;
return c + 89; if (c >= 33 && c <= 58) return c + 122;
if (c == 7) if (c >= 65 && c <= 90) return c + 90;
return 206; if (c >= 96 && c <= 118) return c + 85;
if (c == 14) if (c >= 119 && c <= 140) return c + 62;
return 207; if (c >= 141 && c <= 142) return 204;
if (c >= 33 && c <= 58) if (c == 143) return 205;
return c + 122; if (c == 1) return 208;
if (c >= 65 && c <= 90)
return c + 90;
if (c >= 96 && c <= 118)
return c + 85;
if (c >= 119 && c <= 140)
return c + 62;
if (c >= 141 && c <= 142)
return 204;
if (c == 143)
return 205;
if (c == 1)
return 208;
return c; return c;
} }

View file

@ -30,7 +30,7 @@ struct CFontDetails
char bFlashState; char bFlashState;
char anonymous_21; char anonymous_21;
int nFlashTimer; int nFlashTimer;
char anonymous_23; bool anonymous_23;
uint32 anonymous_25; uint32 anonymous_25;
}; };
@ -39,18 +39,18 @@ struct CFontRenderState
uint32 anonymous_0; uint32 anonymous_0;
float fTextPosX; float fTextPosX;
float fTextPosY; float fTextPosY;
float fTextSizeX; float scaleX;
float fTextSizeY; float scaleY;
CRGBA color; CRGBA color;
float fExtraSpace; float fExtraSpace;
float fSlant; float slant;
float fSlantRefPointX; float slantRefX;
float fSlantRefPointY; float slantRefY;
bool bIsShadow; bool bIsShadow;
bool bFontHalfTexture; bool bFontHalfTexture;
bool bProp; bool proportional;
bool anonymous_14; bool anonymous_14;
int16 FontStyle; int16 style;
}; };
class CSprite2d; class CSprite2d;
@ -62,7 +62,7 @@ enum {
#ifdef MORE_LANGUAGES #ifdef MORE_LANGUAGES
FONT_JAPANESE, FONT_JAPANESE,
#endif #endif
MAX_FONTS MAX_FONTS = FONT_HEADING
}; };
enum { enum {
@ -111,8 +111,9 @@ public:
#ifdef MORE_LANGUAGES #ifdef MORE_LANGUAGES
static bool PrintString(float x, float y, wchar *start, wchar* &end, float spwidth, float japX); static bool PrintString(float x, float y, wchar *start, wchar* &end, float spwidth, float japX);
#else #else
static void PrintString(float x, float y, wchar *start, wchar *end, float spwidth); static void PrintString(float x, float y, uint32, wchar *start, wchar *end, float spwidth);
#endif #endif
static void PrintStringFromBottom(float x, float y, wchar *str);
static float GetCharacterWidth(wchar c); static float GetCharacterWidth(wchar c);
static float GetCharacterSize(wchar c); static float GetCharacterSize(wchar c);
static float GetStringWidth(wchar *s, bool spaces = false); static float GetStringWidth(wchar *s, bool spaces = false);
@ -186,7 +187,7 @@ public:
static void SetBackGroundOnlyTextOff(void) { Details.backgroundOnlyText = false; } static void SetBackGroundOnlyTextOff(void) { Details.backgroundOnlyText = false; }
static void SetPropOn(void) { Details.proportional = true; } static void SetPropOn(void) { Details.proportional = true; }
static void SetPropOff(void) { Details.proportional = false; } static void SetPropOff(void) { Details.proportional = false; }
static void SetFontStyle(int16 style);// { Details.style = style; } static void SetFontStyle(int16 style);
static void SetRightJustifyWrap(float wrap) { Details.rightJustifyWrap = wrap; } static void SetRightJustifyWrap(float wrap) { Details.rightJustifyWrap = wrap; }
static void SetAlphaFade(float fade) { Details.alphaFade = fade; } static void SetAlphaFade(float fade) { Details.alphaFade = fade; }
static void SetDropShadowPosition(int16 pos) { Details.dropShadowPosition = pos; } static void SetDropShadowPosition(int16 pos) { Details.dropShadowPosition = pos; }

View file

@ -412,6 +412,8 @@ void CHud::Draw()
CFont::SetRightJustifyWrap(0.0f); CFont::SetRightJustifyWrap(0.0f);
CFont::SetRightJustifyOn(); CFont::SetRightJustifyOn();
CFont::SetPropOff(); CFont::SetPropOff();
CFont::SetDropShadowPosition(2);
CFont::SetDropColor(CRGBA(0, 0, 0, 255));
CFont::SetFontStyle(FONT_HEADING); CFont::SetFontStyle(FONT_HEADING);
if (m_ItemToFlash == ITEM_HEALTH && CTimer::GetFrameCounter() & 8 if (m_ItemToFlash == ITEM_HEALTH && CTimer::GetFrameCounter() & 8
@ -429,12 +431,12 @@ void CHud::Draw()
#endif #endif
AsciiToUnicode(sTemp, sPrint); AsciiToUnicode(sTemp, sPrint);
CFont::SetColor(CRGBA(0, 0, 0, 255)); /*CFont::SetColor(CRGBA(0, 0, 0, 255));
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(110.0f - 2.0f), SCREEN_SCALE_Y(65.0f + 2.0f), sPrint); CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(110.0f - 2.0f), SCREEN_SCALE_Y(65.0f + 2.0f), sPrint);
if (!CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastHealthLoss || CTimer::GetTimeInMilliseconds() > CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastHealthLoss + 2000 || CTimer::GetFrameCounter() & 4) { if (!CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastHealthLoss || CTimer::GetTimeInMilliseconds() > CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastHealthLoss + 2000 || CTimer::GetFrameCounter() & 4) {
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(164.0f - 2.0f), SCREEN_SCALE_Y(65.0f + 2.0f), sPrintIcon); CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(164.0f - 2.0f), SCREEN_SCALE_Y(65.0f + 2.0f), sPrintIcon);
} }*/
CFont::SetColor(HEALTH_COLOR); CFont::SetColor(HEALTH_COLOR);
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(110.0f), SCREEN_SCALE_Y(65.0f), sPrint); CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(110.0f), SCREEN_SCALE_Y(65.0f), sPrint);
@ -493,11 +495,11 @@ void CHud::Draw()
CFont::SetCentreOff(); CFont::SetCentreOff();
CFont::SetRightJustifyOn(); CFont::SetRightJustifyOn();
CFont::SetPropOn(); CFont::SetPropOn();
CFont::SetFontStyle(FONT_HEADING); CFont::SetFontStyle(FONT_STANDARD);
CFont::SetDropShadowPosition(2); // TODO(Miami): Remove that, VC keeps that open above CFont::SetDropShadowPosition(2); // TODO(Miami): Remove that, VC keeps that open above
CFont::SetDropColor(CRGBA(0,0,0,alpha)); // TODO(Miami): Remove that, VC keeps that open above CFont::SetDropColor(CRGBA(0,0,0,alpha)); // TODO(Miami): Remove that, VC keeps that open above
AsciiToUnicode("]", sPrintIcon); AsciiToUnicode(">", sPrintIcon);
for (int i = 0; i < 6; i++) { for (int i = 0; i < 6; i++) {
if (FrontEndMenuManager.m_PrefsShowHud) { if (FrontEndMenuManager.m_PrefsShowHud) {
@ -609,12 +611,14 @@ void CHud::Draw()
CFont::SetRightJustifyOn(); CFont::SetRightJustifyOn();
CFont::SetRightJustifyWrap(0.0f); CFont::SetRightJustifyWrap(0.0f);
CFont::SetBackGroundOnlyTextOff(); CFont::SetBackGroundOnlyTextOff();
CFont::SetDropShadowPosition(2);
CFont::SetDropColor(CRGBA(0, 0, 0, fZoneAlpha));
CFont::SetFontStyle(FONT_BANK); CFont::SetFontStyle(FONT_BANK);
CFont::SetColor(CRGBA(0, 0, 0, fZoneAlpha)); //CFont::SetColor(CRGBA(0, 0, 0, fZoneAlpha));
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(32.0f) + SCREEN_SCALE_X(1.0f), SCREEN_SCALE_FROM_BOTTOM(128.0f) + SCREEN_SCALE_Y(1.0f), m_ZoneToPrint); //CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(32.0f) + SCREEN_SCALE_X(1.0f), SCREEN_SCALE_FROM_BOTTOM(128.0f) + SCREEN_SCALE_Y(1.0f), m_ZoneToPrint);
CFont::SetColor(CRGBA(ZONE_COLOR.r, ZONE_COLOR.g, ZONE_COLOR.b, fZoneAlpha)); CFont::SetColor(CRGBA(ZONE_COLOR.r, ZONE_COLOR.g, ZONE_COLOR.b, fZoneAlpha));
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(32.0f), SCREEN_SCALE_FROM_BOTTOM(128.0f), m_ZoneToPrint); CFont::PrintStringFromBottom(SCREEN_SCALE_FROM_RIGHT(32.0f), SCREEN_SCALE_FROM_BOTTOM(128.0f), m_ZoneToPrint);
CFont::SetSlant(0.f); CFont::SetSlant(0.f);
} }
@ -708,12 +712,12 @@ void CHud::Draw()
CFont::SetRightJustifyOn(); CFont::SetRightJustifyOn();
CFont::SetRightJustifyWrap(0.0f); CFont::SetRightJustifyWrap(0.0f);
CFont::SetBackGroundOnlyTextOff(); CFont::SetBackGroundOnlyTextOff();
CFont::SetFontStyle(FONT_STANDARD); CFont::SetDropShadowPosition(2);
CFont::SetColor(CRGBA(0, 0, 0, fVehicleAlpha)); CFont::SetDropColor(CRGBA(0, 0, 0, fVehicleAlpha));
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(32.0f) + SCREEN_SCALE_X(1.0f), SCREEN_SCALE_FROM_BOTTOM(105.f) + SCREEN_SCALE_Y(1.0f), m_pVehicleNameToPrint); CFont::SetFontStyle(FONT_BANK);
CFont::SetColor(CRGBA(VEHICLE_COLOR.r, VEHICLE_COLOR.g, VEHICLE_COLOR.b, fVehicleAlpha)); CFont::SetColor(CRGBA(VEHICLE_COLOR.r, VEHICLE_COLOR.g, VEHICLE_COLOR.b, fVehicleAlpha));
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(32.0f), SCREEN_SCALE_FROM_BOTTOM(105.0f), m_pVehicleNameToPrint); CFont::PrintStringFromBottom(SCREEN_SCALE_FROM_RIGHT(32.0f), SCREEN_SCALE_FROM_BOTTOM(105.0f), m_pVehicleNameToPrint);
CFont::SetSlant(0.f); CFont::SetSlant(0.f);
} }
@ -734,6 +738,8 @@ void CHud::Draw()
CFont::SetBackgroundOff(); CFont::SetBackgroundOff();
CFont::SetScale(SCREEN_SCALE_X(HUD_TEXT_SCALE_X), SCREEN_SCALE_Y(HUD_TEXT_SCALE_Y)); CFont::SetScale(SCREEN_SCALE_X(HUD_TEXT_SCALE_X), SCREEN_SCALE_Y(HUD_TEXT_SCALE_Y));
CFont::SetBackGroundOnlyTextOff(); CFont::SetBackGroundOnlyTextOff();
CFont::SetDropShadowPosition(2);
CFont::SetDropColor(CRGBA(0, 0, 0, 255));
CFont::SetPropOff(); CFont::SetPropOff();
CFont::SetFontStyle(FONT_HEADING); CFont::SetFontStyle(FONT_HEADING);
CFont::SetRightJustifyOn(); CFont::SetRightJustifyOn();
@ -744,7 +750,7 @@ void CHud::Draw()
CFont::SetColor(CRGBA(0, 0, 0, 255)); CFont::SetColor(CRGBA(0, 0, 0, 255));
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(111.0f) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(22.0f) + SCREEN_SCALE_Y(2.0f), sPrint); //CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(111.0f) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(22.0f) + SCREEN_SCALE_Y(2.0f), sPrint);
CFont::SetColor(CLOCK_COLOR); CFont::SetColor(CLOCK_COLOR);
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(111.0f), SCREEN_SCALE_Y(22.0f), sPrint); CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(111.0f), SCREEN_SCALE_Y(22.0f), sPrint);
@ -1407,7 +1413,7 @@ void CHud::DrawAfterFade()
CFont::SetPropOn(); CFont::SetPropOn();
CFont::SetRightJustifyWrap(SCREEN_SCALE_X(-500.0f)); CFont::SetRightJustifyWrap(SCREEN_SCALE_X(-500.0f));
CFont::SetRightJustifyOn(); CFont::SetRightJustifyOn();
CFont::SetFontStyle(FONT_HEADING); CFont::SetFontStyle(FONT_BANK);
if (BigMessageX[1] >= SCREEN_SCALE_FROM_RIGHT(20.0f)) { if (BigMessageX[1] >= SCREEN_SCALE_FROM_RIGHT(20.0f)) {
BigMessageInUse[1] += CTimer::GetTimeStep(); BigMessageInUse[1] += CTimer::GetTimeStep();
@ -1427,8 +1433,10 @@ void CHud::DrawAfterFade()
BigMessageAlpha[1] = 255.0f; BigMessageAlpha[1] = 255.0f;
} }
CFont::SetColor(CRGBA(40, 40, 40, BigMessageAlpha[1])); CFont::SetDropShadowPosition(2);
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_FROM_BOTTOM(120.0f) + SCREEN_SCALE_Y(2.0f), m_BigMessage[1]); CFont::SetDropColor(CRGBA(40, 40, 40, BigMessageAlpha[1]));
//CFont::SetColor(CRGBA(40, 40, 40, BigMessageAlpha[1]));
//CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_FROM_BOTTOM(120.0f) + SCREEN_SCALE_Y(2.0f), m_BigMessage[1]);
CFont::SetColor(CRGBA(MISSIONTITLE_COLOR.r, MISSIONTITLE_COLOR.g, MISSIONTITLE_COLOR.b, BigMessageAlpha[1])); CFont::SetColor(CRGBA(MISSIONTITLE_COLOR.r, MISSIONTITLE_COLOR.g, MISSIONTITLE_COLOR.b, BigMessageAlpha[1]));
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f), SCREEN_SCALE_FROM_BOTTOM(120.0f), m_BigMessage[1]); CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f), SCREEN_SCALE_FROM_BOTTOM(120.0f), m_BigMessage[1]);

View file

@ -317,12 +317,12 @@ CSprite2d::SetVertices(RwIm2DVertex *verts, const CRect &r, const CRGBA &c0, con
screenz = NearScreenZ; screenz = NearScreenZ;
recipz = RecipNearClip; recipz = RecipNearClip;
//z = RwCameraGetNearClipPlane(Scene.camera); // not done by game z = RwCameraGetNearClipPlane(Scene.camera); // not done by game
RwIm2DVertexSetScreenX(&verts[0], r.left); RwIm2DVertexSetScreenX(&verts[0], r.left);
RwIm2DVertexSetScreenY(&verts[0], r.top); RwIm2DVertexSetScreenY(&verts[0], r.top);
RwIm2DVertexSetScreenZ(&verts[0], screenz); RwIm2DVertexSetScreenZ(&verts[0], screenz);
//RwIm2DVertexSetCameraZ(&verts[0], z); RwIm2DVertexSetCameraZ(&verts[0], z);
RwIm2DVertexSetRecipCameraZ(&verts[0], recipz); RwIm2DVertexSetRecipCameraZ(&verts[0], recipz);
RwIm2DVertexSetIntRGBA(&verts[0], c2.r, c2.g, c2.b, c2.a); RwIm2DVertexSetIntRGBA(&verts[0], c2.r, c2.g, c2.b, c2.a);
RwIm2DVertexSetU(&verts[0], u0, recipz); RwIm2DVertexSetU(&verts[0], u0, recipz);
@ -331,7 +331,7 @@ CSprite2d::SetVertices(RwIm2DVertex *verts, const CRect &r, const CRGBA &c0, con
RwIm2DVertexSetScreenX(&verts[1], r.right); RwIm2DVertexSetScreenX(&verts[1], r.right);
RwIm2DVertexSetScreenY(&verts[1], r.top); RwIm2DVertexSetScreenY(&verts[1], r.top);
RwIm2DVertexSetScreenZ(&verts[1], screenz); RwIm2DVertexSetScreenZ(&verts[1], screenz);
//RwIm2DVertexSetCameraZ(&verts[1], z); RwIm2DVertexSetCameraZ(&verts[1], z);
RwIm2DVertexSetRecipCameraZ(&verts[1], recipz); RwIm2DVertexSetRecipCameraZ(&verts[1], recipz);
RwIm2DVertexSetIntRGBA(&verts[1], c3.r, c3.g, c3.b, c3.a); RwIm2DVertexSetIntRGBA(&verts[1], c3.r, c3.g, c3.b, c3.a);
RwIm2DVertexSetU(&verts[1], u1, recipz); RwIm2DVertexSetU(&verts[1], u1, recipz);
@ -340,7 +340,7 @@ CSprite2d::SetVertices(RwIm2DVertex *verts, const CRect &r, const CRGBA &c0, con
RwIm2DVertexSetScreenX(&verts[2], r.right); RwIm2DVertexSetScreenX(&verts[2], r.right);
RwIm2DVertexSetScreenY(&verts[2], r.bottom); RwIm2DVertexSetScreenY(&verts[2], r.bottom);
RwIm2DVertexSetScreenZ(&verts[2], screenz); RwIm2DVertexSetScreenZ(&verts[2], screenz);
//RwIm2DVertexSetCameraZ(&verts[2], z); RwIm2DVertexSetCameraZ(&verts[2], z);
RwIm2DVertexSetRecipCameraZ(&verts[2], recipz); RwIm2DVertexSetRecipCameraZ(&verts[2], recipz);
RwIm2DVertexSetIntRGBA(&verts[2], c1.r, c1.g, c1.b, c1.a); RwIm2DVertexSetIntRGBA(&verts[2], c1.r, c1.g, c1.b, c1.a);
RwIm2DVertexSetU(&verts[2], u2, recipz); RwIm2DVertexSetU(&verts[2], u2, recipz);
@ -349,30 +349,11 @@ CSprite2d::SetVertices(RwIm2DVertex *verts, const CRect &r, const CRGBA &c0, con
RwIm2DVertexSetScreenX(&verts[3], r.left); RwIm2DVertexSetScreenX(&verts[3], r.left);
RwIm2DVertexSetScreenY(&verts[3], r.bottom); RwIm2DVertexSetScreenY(&verts[3], r.bottom);
RwIm2DVertexSetScreenZ(&verts[3], screenz); RwIm2DVertexSetScreenZ(&verts[3], screenz);
//RwIm2DVertexSetCameraZ(&verts[3], z); RwIm2DVertexSetCameraZ(&verts[3], z);
RwIm2DVertexSetRecipCameraZ(&verts[3], recipz); RwIm2DVertexSetRecipCameraZ(&verts[3], recipz);
RwIm2DVertexSetIntRGBA(&verts[3], c0.r, c0.g, c0.b, c0.a); RwIm2DVertexSetIntRGBA(&verts[3], c0.r, c0.g, c0.b, c0.a);
RwIm2DVertexSetU(&verts[3], u3, recipz); RwIm2DVertexSetU(&verts[3], u3, recipz);
RwIm2DVertexSetV(&verts[3], v3, recipz); RwIm2DVertexSetV(&verts[3], v3, recipz);
/*RwIm2DVertexSetScreenX(&verts[4], r.right);
RwIm2DVertexSetScreenY(&verts[4], r.bottom);
RwIm2DVertexSetScreenZ(&verts[4], screenz);
RwIm2DVertexSetCameraZ(&verts[4], z);
RwIm2DVertexSetRecipCameraZ(&verts[4], recipz);
RwIm2DVertexSetIntRGBA(&verts[4], c1.r, c1.g, c1.b, c1.a);
RwIm2DVertexSetU(&verts[4], u3, recipz);
RwIm2DVertexSetV(&verts[4], v3, recipz);
RwIm2DVertexSetScreenX(&verts[5], r.right);
RwIm2DVertexSetScreenY(&verts[5], r.top);
RwIm2DVertexSetScreenZ(&verts[5], screenz);
RwIm2DVertexSetCameraZ(&verts[5], z);
RwIm2DVertexSetRecipCameraZ(&verts[5], recipz);
RwIm2DVertexSetIntRGBA(&verts[5], c3.r, c3.g, c3.b, c3.a);
RwIm2DVertexSetU(&verts[5], u1, recipz);
RwIm2DVertexSetV(&verts[5], v1, recipz);*/
} }
void void