Mercurial > might-and-magic-trilogy
comparison Render.cpp @ 3:540178ef9b18
Main menu functionality
author | Nomad |
---|---|
date | Wed, 10 Oct 2012 19:10:15 +0200 |
parents | 2ca04ccb612a |
children | 17150bdf321e |
comparison
equal
deleted
inserted
replaced
2:2ca04ccb612a | 3:540178ef9b18 |
---|---|
9844 } | 9844 } |
9845 | 9845 |
9846 | 9846 |
9847 | 9847 |
9848 //----- (004A6AB1) -------------------------------------------------------- | 9848 //----- (004A6AB1) -------------------------------------------------------- |
9849 void Render::DrawTextPalette(signed int a2, signed int a3, int a4, int a5, unsigned int a6, unsigned __int16 *pPalette, int a8) | 9849 void Render::DrawTextPalette(int x, int y, int a4, int a5, unsigned int uFontHeight, unsigned __int16 *pPalette, int a8) |
9850 { | 9850 { |
9851 int v8; // edi@2 | 9851 int v8; // edi@2 |
9852 unsigned int v9; // esi@2 | 9852 unsigned int v9; // esi@2 |
9853 unsigned __int16 *v10; // eax@2 | 9853 unsigned __int16 *v10; // eax@2 |
9854 int v11; // edx@2 | 9854 unsigned char *v11; // edx@2 |
9855 unsigned int v12; // ebx@3 | 9855 unsigned int v12; // ebx@3 |
9856 signed int v13; // edx@5 | 9856 signed int v13; // edx@5 |
9857 int v14; // edx@6 | 9857 int v14; // edx@6 |
9858 signed int v15; // ebx@7 | 9858 signed int v15; // ebx@7 |
9859 unsigned int v16; // edx@9 | 9859 unsigned int v16; // edx@9 |
9870 int v27; // [sp+1Ch] [bp+Ch]@33 | 9870 int v27; // [sp+1Ch] [bp+Ch]@33 |
9871 unsigned int v28; // [sp+20h] [bp+10h]@30 | 9871 unsigned int v28; // [sp+20h] [bp+10h]@30 |
9872 unsigned int v29; // [sp+24h] [bp+14h]@22 | 9872 unsigned int v29; // [sp+24h] [bp+14h]@22 |
9873 unsigned int v30; // [sp+24h] [bp+14h]@31 | 9873 unsigned int v30; // [sp+24h] [bp+14h]@31 |
9874 | 9874 |
9875 auto a2 = x; | |
9876 auto a3 = y; | |
9877 auto a6 = uFontHeight; | |
9875 if ( this->uNumSceneBegins ) | 9878 if ( this->uNumSceneBegins ) |
9876 { | 9879 { |
9877 v8 = a5; | 9880 v8 = a5; |
9878 v9 = a6; | 9881 v9 = a6; |
9879 v10 = &this->pTargetSurface[a2 + a3 * this->uTargetSurfacePitch]; | 9882 v10 = &pTargetSurface[x + y * uTargetSurfacePitch]; |
9880 v11 = a4; | 9883 v11 = (unsigned char *)a4; |
9881 v25 = a4; | 9884 v25 = a4; |
9882 if ( this->bClip ) | 9885 if ( this->bClip ) |
9883 { | 9886 { |
9884 v12 = this->uClipX; | 9887 v12 = this->uClipX; |
9885 if ( a2 < (signed int)v12 ) | 9888 if ( a2 < (signed int)v12 ) |
9916 v20 = this->uClipY; | 9919 v20 = this->uClipY; |
9917 if ( v20 < a3 ) | 9920 if ( v20 < a3 ) |
9918 v20 = a3; | 9921 v20 = a3; |
9919 v9 = v19 - v20; | 9922 v9 = v19 - v20; |
9920 } | 9923 } |
9921 v11 = v25; | 9924 v11 = (unsigned char *)v25; |
9922 } | 9925 } |
9923 if ( a8 ) | 9926 if ( a8 ) |
9924 { | 9927 { |
9925 v28 = pRenderer->uTargetGMask | pRenderer->uTargetBMask; | 9928 v28 = pRenderer->uTargetGMask | pRenderer->uTargetBMask; |
9926 if ( (signed int)v9 > 0 ) | 9929 if ( (signed int)v9 > 0 ) |
9932 if ( v8 > 0 ) | 9935 if ( v8 > 0 ) |
9933 { | 9936 { |
9934 v27 = v8; | 9937 v27 = v8; |
9935 do | 9938 do |
9936 { | 9939 { |
9937 if ( *(char *)v11 ) | 9940 if ( *v11 ) |
9938 v24 = pPalette[*(char *)v11]; | 9941 v24 = pPalette[*v11]; |
9939 else | 9942 else |
9940 v24 = v28; | 9943 v24 = v28; |
9941 *v10 = v24; | 9944 *v10 = v24; |
9942 ++v10; | 9945 ++v10; |
9943 ++v11; | 9946 ++v11; |
9963 if ( v8 > 0 ) | 9966 if ( v8 > 0 ) |
9964 { | 9967 { |
9965 v26 = v8; | 9968 v26 = v8; |
9966 do | 9969 do |
9967 { | 9970 { |
9968 if ( *(char *)v11 ) | 9971 if ( *v11 ) |
9969 *v10 = pPalette[*(char *)v11]; | 9972 *v10 = pPalette[*v11]; |
9970 ++v10; | 9973 ++v10; |
9971 ++v11; | 9974 ++v11; |
9972 --v26; | 9975 --v26; |
9973 } | 9976 } |
9974 while ( v26 ); | 9977 while ( v26 ); |