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
void __fastcall artfont_SetArtFont(int nFont)
{
int v1; // ecx
int v2; // ecx
int v3; // ecx
int v4; // ecx
int v5; // ecx
if ( nFont )
switch ( nFont )
{
v1 = nFont - 2;
if ( v1 )
{
v2 = v1 - 1;
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
{
case 0:
sgpCurrFont = &font16g;
break;
case 2:
sgpCurrFont = &font24g;
}
}
else
{
sgpCurrFont = &font16g;
break;
case 3:
sgpCurrFont = &font24s;
break;
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