diff Actor.cpp @ 1033:3a5c8df8381d

* UI cleans and moves * Deleted many junk global variables.
author Nomad
date Tue, 21 May 2013 23:44:51 +0200
parents 9ac94d00012e
children 7f8be9f9769e
line wrap: on
line diff
--- a/Actor.cpp	Tue May 21 14:34:14 2013 +0200
+++ b/Actor.cpp	Tue May 21 23:44:51 2013 +0200
@@ -226,107 +226,6 @@
   }
 }
 
-//----- (00445D4A) --------------------------------------------------------
-void Actor::InitializeDialogue(int bPlayerSaysHello)
-{
-  NPCData *pNPCInfo; // ebp@1
-  int v9; // esi@8
-  int pNumberContacts; // eax@11
-  char pContainer[32]; // [sp+14h] [bp-28h]@3
-
-  dword_A74CDC = -1;
-  dword_AE336C = -1;
-  pEventTimer->Pause();
-  pMiscTimer->Pause();
-  pAudioPlayer->StopChannels(-1, -1);
-  uDialogueType = 0;
-  sDialogue_SpeakingActorNPC_ID = this->sNPC_ID;
-  pDialogue_SpeakingActor = this;
-  pNPCInfo = GetNPCData(this->sNPC_ID);
-  if ( (pNPCInfo->uFlags & 3) != 2 )
-    pNPCInfo->uFlags = pNPCInfo->uFlags + 1;
-
-  switch (pParty->alignment)
-  {
-    case PartyAlignment_Good:    sprintf(pContainer, "evt%02d-b", const_2()); break;
-    case PartyAlignment_Neutral: sprintf(pContainer, "evt%02d", const_2()); break;
-    case PartyAlignment_Evil:    sprintf(pContainer, "evt%02d-c", const_2()); break;
-  }
-
-  pDialogueNPCCount = 0;
-  uNumDialogueNPCPortraits = 1;
-  pTexture_Dialogue_Background = pIcons_LOD->LoadTexturePtr(pContainer, TEXTURE_16BIT_PALETTE);
-  sprintf(pContainer, "npc%03u", pNPCInfo->uPortraitID);
-  v9 = 0;
-  pDialogueNPCPortraits[0] = pIcons_LOD->LoadTexturePtr(pContainer, TEXTURE_16BIT_PALETTE);
-  dword_591084 = areWeLoadingTexture;
-  uTextureID_right_panel_loop = uTextureID_right_panel;
-  if ( !pNPCInfo->Hired() && pNPCInfo->Location2D >= 0 )
-  {
-    if ( (signed int)pParty->GetPartyFame() <= pNPCInfo->fame
-      || (pNumberContacts = pNPCInfo->uFlags & 0xFFFFFF7F, (pNumberContacts & 0x80000000u) != 0) )
-    {
-      v9 = 1;
-    }
-	else
-	{
-		if ( pNumberContacts > 1 )
-		{
-		  if ( pNumberContacts == 2 )
-		  {
-			v9 = 3;
-		  }
-		  else
-		  {
-			  if ( pNumberContacts != 3 )
-			  {
-				if ( pNumberContacts != 4 )
-				  v9 = 1;
-			  }
-			  else
-			  {
-				v9 = 2;
-			  }
-		  }
-		}
-		else if ( pNPCInfo->rep )
-		{
-		  v9 = 2;
-		}
-	}
-  }
-  if ( (sDialogue_SpeakingActorNPC_ID & 0x80000000u) != 0 )
-    v9 = 4;
-  pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_Dialogue, v9, 0);//pNumberContacts = 1, v9 = 0; pNumberContacts = 2, v9 = 3;
-  if (pNPCInfo->Hired())
-  {
-    if ( !pNPCInfo->bHasUsedTheAbility )
-    {
-      if ( pNPCInfo->uProfession >= 10 )
-      {
-        if ( pNPCInfo->uProfession <= 12 || pNPCInfo->uProfession > 32 && (pNPCInfo->uProfession <= 34 
-             || pNPCInfo->uProfession > 38 && (pNPCInfo->uProfession <= 43 || pNPCInfo->uProfession == 52)) )
-        {
-          pDialogueWindow->CreateButton(480, 250, 140, LOBYTE(pFontArrus->uFontHeight) - 3, 1, 0, UIMSG_SelectNPCDialogueOption, 9, 0, "", 0);
-          pDialogueWindow->_41D08F_set_keyboard_control_group(4, 1, 0, 1);
-        }
-      }
-    }
-  }
-
-  pDialogueWindow->CreateButton( 61, 424, 31, 40, 2, 94, UIMSG_SelectCharacter, 1, '1', "", 0);
-  pDialogueWindow->CreateButton(177, 424, 31, 40, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0);
-  pDialogueWindow->CreateButton(292, 424, 31, 40, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0);
-  pDialogueWindow->CreateButton(407, 424, 31, 40, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0);
-
-  if (bPlayerSaysHello && uActiveCharacter && !pNPCInfo->Hired())
-  {
-    if (pParty->uCurrentHour < 5 || pParty->uCurrentHour > 21)
-      pPlayers[uActiveCharacter]->PlaySound(SPEECH_GoodEvening, 0);
-    else
-      pPlayers[uActiveCharacter]->PlaySound(SPEECH_GoodDay, 0);
-  }
-}
   
 //----- (0040894B) --------------------------------------------------------
 bool Actor::CanAct()