changeset 201:11a199790ce0

3.01.13 (CreditsScreen)
author Ritor1
date Thu, 03 Jan 2013 01:03:18 +0600
parents c04d432611e1
children dacc9207809a
files mm7_4.cpp
diffstat 1 files changed, 8 insertions(+), 60 deletions(-) [+]
line wrap: on
line diff
--- a/mm7_4.cpp	Wed Jan 02 23:17:44 2013 +0600
+++ b/mm7_4.cpp	Thu Jan 03 01:03:18 2013 +0600
@@ -6137,30 +6137,22 @@
   unsigned int pNumPixels; // ST2C_4@9
   unsigned int teal; // eax@9
   unsigned int v10; // ST2C_4@19
-  //unsigned int teal; // eax@19
-  //Texture v12; // [sp+Ch] [bp-130h]@5
-  //RGBTexture v16; // [sp+54h] [bp-E8h]@1
-  //double v15; // [sp+7Ch] [bp-C0h]@9
   MSG Msg; // [sp+84h] [bp-B8h]@10
   int v17; // [sp+A0h] [bp-9Ch]@9
   int pX; // [sp+A4h] [bp-98h]@9
   unsigned int pY; // [sp+A8h] [bp-94h]@9
   int v20; // [sp+ACh] [bp-90h]@9
   int a4; // [sp+B0h] [bp-8Ch]@9
-  int a8; // [sp+F8h] [bp-44h]@9
-  int a7; // [sp+FCh] [bp-40h]@9
-  //RGBTexture v21; // [sp+100h] [bp-3Ch]@1
+  int pColor2; // [sp+F8h] [bp-44h]@9
+  int pColor1; // [sp+FCh] [bp-40h]@9
   int a5; // [sp+128h] [bp-14h]@1
   char *pString; // [sp+12Ch] [bp-10h]@9
   char *ptr; // [sp+130h] [bp-Ch]@5
   GUIFont *pFontQuick; // [sp+134h] [bp-8h]@1
   GUIFont *pFontCChar; // [sp+138h] [bp-4h]@1
   RGBTexture pTexture; // [sp+54h] [bp-E8h]@1
-  //RGBTexture::RGBTexture(&v16);
   RGBTexture pTexture2; // [sp+100h] [bp-3Ch]@1
-  //RGBTexture::RGBTexture(&v21);
   Texture pTexture3; // [sp+Ch] [bp-130h]@5
-  //Texture::Texture(&v12);
   
   a5 = 0;
   pFontQuick = LoadFont("quick.fnt", "FONTPAL", 0);
@@ -6203,34 +6195,20 @@
   fill_pixels_fast(teal, pTexture2.pPixels, pNumPixels);
   pTexture2.field_20 = 0;
   pTexture2.field_22 = 0;
-  a7 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0x70u, 0x8Fu, 0xFEu);
-  a8 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xECu, 0xE6u, 0x9Cu);
+  pColor1 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0x70u, 0x8Fu, 0xFEu);
+  pColor2 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xECu, 0xE6u, 0x9Cu);
   pString = (char *)operator new(2 * pSize);
   strncpy(pString, ptr, pSize);
-  pFontQuick->_44D2FD_prolly_draw_credits_entry(pFontCChar, 1, a4 + 1, (signed __int16)pTexture2.uWidth, (signed __int16)pTexture2.uHeight, 1, 1, pString,
-    pTexture2.pPixels, (signed __int16)pTexture2.uWidth);
-  strncpy(pString, ptr, pSize);
-  pFontQuick->_44D2FD_prolly_draw_credits_entry(pFontCChar, 0, a4, (signed __int16)pTexture2.uWidth, (signed __int16)pTexture2.uHeight, a7, a8, pString, pTexture2.pPixels,
-    (signed __int16)pTexture2.uWidth);
+  pFontQuick->_44D2FD_prolly_draw_credits_entry(pFontCChar, 0, a4, (signed __int16)pTexture2.uWidth, (signed __int16)pTexture2.uHeight, pColor1, 
+	  pColor2, pString, pTexture2.pPixels, (signed __int16)pTexture2.uWidth);
   free(pString);
   pWindow_MainMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, (int)ptr);
   pWindow_MainMenu->CreateButton(0, 0, 0, 0, 1, 0, 0x71u, 0, 0x1Bu, "", 0);
   pCurrentScreen = 9; // окно Credits
   SetCurrentMenuID(MENU_Credits);
-  pRenderer->BeginScene();
-  pRenderer->DrawTextureRGB(0, 0, &pTexture);
-  pRenderer->Clip(pX, pY, pX + v20, pY + a4);
-  pRenderer->_4A5D33(pX, pY, 0, 0, &pTexture2);
-  pRenderer->ResetClip();
-  pRenderer->EndScene();
-  pString = (char *)0x447A0000;
-  //v15 = 1000.0 + 6.7553994e15;
-  v17 = floorf(1000.0f + 0.5f);//(v15);
-  GetTickCount();
-  pRenderer->Present();
   do
   {
-    while ( PeekMessageA(&Msg, 0, 0, 0, 1u) )
+    while ( PeekMessageA(&Msg, 0, 0, 0, 1) )
     {
       if ( Msg.message == 18 )
         Game_DeinitializeAndTerminate(0);
@@ -6245,28 +6223,6 @@
     {
       if (pAsyncMouse)
         pAsyncMouse->_46B736_consume_click_lists(1);
-      if ( dword_A74C88 )
-      {
-        //pTexture.Load("mm6title.pcx", 1);
-        v10 = pTexture2.uNumPixels;
-        teal = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0xFFu);
-        fill_pixels_fast(teal, pTexture2.pPixels, v10);
-        strncpy(pTmpBuf, ptr, 0x7D0u);
-        pFontQuick->_44D2FD_prolly_draw_credits_entry(pFontCChar, 1, a4 + 1, (signed __int16)pTexture2.uWidth, (signed __int16)pTexture2.uHeight, 1, 1, pTmpBuf,
-          pTexture2.pPixels, (signed __int16)pTexture2.uWidth);
-        strncpy(pTmpBuf, ptr, 0x7D0u);
-        pFontQuick->_44D2FD_prolly_draw_credits_entry(pFontCChar, 0, a4, (signed __int16)pTexture2.uWidth, (signed __int16)pTexture2.uHeight, a7, a8, pTmpBuf,
-          pTexture2.pPixels, (signed __int16)pTexture2.uWidth);
-        dword_A74C88 = 0;
-        pRenderer->BeginScene();
-        pRenderer->DrawTextureRGB(0, 0, &pTexture);
-        pRenderer->Clip(pX, pY, pX + v20, pX + a4);
-        pRenderer->_4A5D33(pX, pY, 0, a5, &pTexture2);
-        pRenderer->ResetClip();
-        pRenderer->EndScene();
-        pRenderer->Present();
-      }
-      timeGetTime();
       pRenderer->BeginScene();
       pRenderer->DrawTextureRGB(0, 0, &pTexture);
       pRenderer->Clip(pX, pY, pX + v20, pY + a4);
@@ -6276,17 +6232,12 @@
       ++a5;
       if ( a5 >= (signed __int16)pTexture2.uHeight )
         SetCurrentMenuID(MENU_MAIN);
-      timeGetTime();
       pRenderer->Present();
+	  pCurrentScreen = 0;//Ritor1: temporarily, must be corrected GUI_MainMenuMessageProc()
       GUI_MainMenuMessageProc();
     }
   }
   while ( GetCurrentMenuID() == MENU_Credits );
-  GUI_MainMenuMessageProc();
-  pRenderer->BeginScene();
-  GUI_UpdateWindows();
-  pRenderer->EndScene();
-  pRenderer->Present();
   pAudioPlayer->_4AA258(1);
   pAllocator->FreeChunk(ptr);
   pAllocator->FreeChunk(pFontQuick);
@@ -6298,9 +6249,6 @@
   return MENU_MAIN;     // return MENU_Main
 }
 
-
-
-
 //----- (0049B04D) --------------------------------------------------------
 int stru154::_49B04D(ODMFace *a2, BSPVertexBuffer *a3)
 {