Mercurial > mm7
comparison mm7_5.cpp @ 1183:fa30ea497e94
arcomage refactoring started
author | Gloval |
---|---|
date | Thu, 06 Jun 2013 00:58:07 +0400 |
parents | 29a8defbad9e |
children | a90dc4aee8f4 |
comparison
equal
deleted
inserted
replaced
1182:64cda98b739c | 1183:fa30ea497e94 |
---|---|
9002 } | 9002 } |
9003 return v5; | 9003 return v5; |
9004 } | 9004 } |
9005 | 9005 |
9006 | 9006 |
9007 //----- (0040D75D) -------------------------------------------------------- | 9007 |
9008 void pPrimaryWindow_draws_text( int a1, const char *pText, int *pXY ) | 9008 |
9009 { | |
9010 const char *v3; // ST0C_4@1 | |
9011 __int64 v4; // qax@1 | |
9012 | |
9013 v3 = pText; | |
9014 v4 = LOBYTE(pFontComic->uFontHeight) - 3; | |
9015 pPrimaryWindow->DrawText( | |
9016 pFontComic, | |
9017 *pXY, | |
9018 pXY[1] - (((signed int)v4 - HIDWORD(v4)) >> 1) + 3, | |
9019 0, | |
9020 v3, | |
9021 0, | |
9022 0, | |
9023 0); | |
9024 } | |
9025 | |
9026 //----- (0040DB27) -------------------------------------------------------- | |
9027 void __fastcall DrawRect(Vec4_int_ *pXYZW, unsigned __int16 uColor, char bSolidFill) | |
9028 { | |
9029 Vec4_int_ *v3; // esi@1 | |
9030 unsigned __int16 v4; // bp@1 | |
9031 unsigned int i; // ebx@3 | |
9032 | |
9033 v3 = pXYZW; | |
9034 v4 = uColor; | |
9035 pRenderer->BeginScene(); | |
9036 pRenderer->SetRasterClipRect(0, 0, 639u, 479u); | |
9037 if ( bSolidFill ) | |
9038 { | |
9039 for ( i = v3->y; (signed int)i <= v3->w; ++i ) | |
9040 pRenderer->RasterLine2D(v3->x, i, v3->z, i, v4); | |
9041 } | |
9042 else | |
9043 { | |
9044 pRenderer->RasterLine2D(v3->x, v3->y, v3->z, v3->y, v4); | |
9045 pRenderer->RasterLine2D(v3->z, v3->y, v3->z, v3->w, v4); | |
9046 pRenderer->RasterLine2D(v3->z, v3->w, v3->x, v3->w, v4); | |
9047 pRenderer->RasterLine2D(v3->x, v3->w, v3->x, v3->y, v4); | |
9048 } | |
9049 pRenderer->EndScene(); | |
9050 } | |
9051 | |
9052 //----- (0040DDB1) -------------------------------------------------------- | |
9053 int __fastcall rand_interval(int a, int b) | |
9054 { | |
9055 return a + rand() % (b - a + 1); | |
9056 } | |
9057 | |
9058 //----- (0040DEB4) -------------------------------------------------------- | |
9059 char *__fastcall inv_strcat(const char *Source, char *Dest) | |
9060 { | |
9061 return strcat(Dest, Source); | |
9062 } | |
9063 | |
9064 //----- (0040DEBE) -------------------------------------------------------- | |
9065 char *__fastcall inv_strcpy(const char *Source, char *Dest) | |
9066 { | |
9067 return strcpy(Dest, Source); | |
9068 } | |
9069 | |
9070 //----- (0040DEC8) -------------------------------------------------------- | |
9071 void __fastcall intToString(int val, char *pOut) | |
9072 { | |
9073 sprintf(pOut, "%d", val); | |
9074 } | |
9075 | 9009 |
9076 //----- (0040DEDB) -------------------------------------------------------- | 9010 //----- (0040DEDB) -------------------------------------------------------- |
9077 unsigned int __stdcall R8G8B8_to_TargetFormat(int uColor) | 9011 unsigned int __stdcall R8G8B8_to_TargetFormat(int uColor) |
9078 { | 9012 { |
9079 return TargetColor((unsigned __int8)uColor, BYTE1(uColor), BYTE2(uColor)); | 9013 return TargetColor((unsigned __int8)uColor, BYTE1(uColor), BYTE2(uColor)); |