diff UIPartyCreation.cpp @ 982:08fd1436ef35

enums & lod
author Nomad
date Sat, 11 May 2013 13:19:55 +0200
parents ac85898f5903
children a704435d3285 c45d51b3f4f4
line wrap: on
line diff
--- a/UIPartyCreation.cpp	Sat May 11 01:28:06 2013 +0200
+++ b/UIPartyCreation.cpp	Sat May 11 13:19:55 2013 +0200
@@ -653,16 +653,16 @@
 // 4E28F8: using guessed type int pCurrentScreen;
 
 //----- (0049750E) --------------------------------------------------------
-void __cdecl DeleteCCharFont()
+void DeleteCCharFont()
 {
   pAllocator->FreeChunk(pFontCChar);
   pFontCChar = 0;
 }
 //----- (00497526) --------------------------------------------------------
-bool __cdecl PlayerCreationUI_Loop()
+bool PlayerCreationUI_Loop()
 {
   //RGBTexture *pTexture; // ebx@1
-  UINT v1; // esi@1
+  //UINT v1; // esi@1
   unsigned int v2; // ecx@3
   LONG uMouseX; // edi@6
   LONG uMouseY; // eax@6
@@ -691,7 +691,6 @@
   //Player *pPlayer;
 
   //pTexture = &pTexture_PCX;
-  v1 = 0;
   v26 = 0;
   pTexture_PCX.Release();
   pTexture_PCX.Load("makeme.pcx", 0);
@@ -703,7 +702,7 @@
   SetCurrentMenuID((MENU_STATE)v2);
   while ( GetCurrentMenuID() == MENU_CREATEPARTY )
   {
-    if ( pAsyncMouse != (void *)v1 )
+    if (pAsyncMouse)
       pAsyncMouse->_46B736_consume_click_lists(1);
     uMouseX = pMouse->GetCursorPos(&v25)->x;
     uMouseY = pMouse->GetCursorPos(&v25)->y;
@@ -727,7 +726,7 @@
       while ( pControlsHead != (GUIButton *)v1 );
     }*/
 
-    while ( PeekMessageA(&Msg, (HWND)v1, v1, v1, PM_REMOVE) )
+    while ( PeekMessageA(&Msg, 0, 0, 0, PM_REMOVE) )
     {
       if ( Msg.message == WM_QUIT )
         Game_DeinitializeAndTerminate(0);
@@ -751,15 +750,15 @@
         v26 = 1;
         //v2 = 0;
         //goto LABEL_27;
-        SetCurrentMenuID((MENU_STATE)MENU_MAIN);
+        SetCurrentMenuID(MENU_MAIN);
         continue;
       }
-      if ( uGameState == GAME_STATE_6 )//if click OK in PlayerCreation Window
+      if ( uGameState == GAME_STATE_STARTING_NEW_GAME )//if click OK in PlayerCreation Window
       {
-        uGameState = v1;
+        uGameState = GAME_STATE_PLAYING;
         //v2 = 1;
         //goto LABEL_27;
-        SetCurrentMenuID((MENU_STATE)MENU_NEWGAME);
+        SetCurrentMenuID(MENU_NEWGAME);
         continue;
       }
     }
@@ -768,6 +767,7 @@
   pGUIWindow_CurrentMenu->Release();
   pIcons_LOD->_4114F2();
 
+  int v1 = 0;
   memset(v20, 0, 32);
   do
   {
@@ -890,7 +890,7 @@
 
       for (uint k = 0; k < 138; k++)
       {
-        if (&player->pInventoryItems[k])
+        if (player->pInventoryItems[k].uItemID)
           player->pInventoryItems[k].SetIdentified();
       }
     }