Browse Source

Fix bugs in DiabloUI and cleanup (#312)

pull/4/head
galaxyhaxz 8 years ago committed by GitHub
parent
commit
bcfe1ddba4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 78
      DiabloUI/artfont.cpp

78
DiabloUI/artfont.cpp

@ -1,62 +1,32 @@
// ref: 0x10001058 // ref: 0x10001058
void __fastcall artfont_SetArtFont(int nFont) void __fastcall artfont_SetArtFont(int nFont)
{ {
int v1; // ecx switch ( nFont )
int v2; // ecx
int v3; // ecx
int v4; // ecx
int v5; // ecx
if ( nFont )
{ {
v1 = nFont - 2; case 0:
if ( v1 ) sgpCurrFont = &font16g;
{ break;
v2 = v1 - 1; case 2:
if ( v2 )
{
v3 = v2 - 1;
if ( v3 )
{
v4 = v3 - 1;
if ( v4 )
{
v5 = v4 - 1;
if ( v5 )
{
if ( v5 == 1 )
sgpCurrFont = &font42y;
else
sgpCurrFont = &font16s;
}
else
{
sgpCurrFont = &font42g;
}
}
else
{
sgpCurrFont = &font30s;
}
}
else
{
sgpCurrFont = &font30g;
}
}
else
{
sgpCurrFont = &font24s;
}
}
else
{
sgpCurrFont = &font24g; sgpCurrFont = &font24g;
} break;
} case 3:
else sgpCurrFont = &font24s;
{ break;
sgpCurrFont = &font16g; case 4:
sgpCurrFont = &font30g;
break;
case 5:
sgpCurrFont = &font30s;
break;
case 6:
sgpCurrFont = &font42g;
break;
case 7:
sgpCurrFont = &font42y;
break;
default:
sgpCurrFont = &font16s;
break;
} }
} }

Loading…
Cancel
Save