comparison UIRest.cpp @ 951:840b78f6c2d3

Слияние
author Ritor1
date Wed, 01 May 2013 23:36:54 +0600
parents c0d0656aa662
children e9292c58644a
comparison
equal deleted inserted replaced
950:5e87b0c3f939 951:840b78f6c2d3
100 uTextureID_RestUI_restb1 = pIcons_LOD->LoadTexture("restb1", TEXTURE_16BIT_PALETTE); 100 uTextureID_RestUI_restb1 = pIcons_LOD->LoadTexture("restb1", TEXTURE_16BIT_PALETTE);
101 uTextureID_RestUI_restb2 = pIcons_LOD->LoadTexture("restb2", TEXTURE_16BIT_PALETTE); 101 uTextureID_RestUI_restb2 = pIcons_LOD->LoadTexture("restb2", TEXTURE_16BIT_PALETTE);
102 uTextureID_RestUI_restb3 = pIcons_LOD->LoadTexture("restb3", TEXTURE_16BIT_PALETTE); 102 uTextureID_RestUI_restb3 = pIcons_LOD->LoadTexture("restb3", TEXTURE_16BIT_PALETTE);
103 uTextureID_RestUI_restb4 = pIcons_LOD->LoadTexture("restb4", TEXTURE_16BIT_PALETTE); 103 uTextureID_RestUI_restb4 = pIcons_LOD->LoadTexture("restb4", TEXTURE_16BIT_PALETTE);
104 uTextureID_RestUI_restexit = pIcons_LOD->LoadTexture("restexit", TEXTURE_16BIT_PALETTE); 104 uTextureID_RestUI_restexit = pIcons_LOD->LoadTexture("restexit", TEXTURE_16BIT_PALETTE);
105
105 LoadActualSkyFrame(); 106 LoadActualSkyFrame();
106 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640u, 480u, (enum WindowType)16, 0, 0); 107
107 pButton_RestUI_Exit = pGUIWindow_CurrentMenu->CreateButton( 108 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Rest, 0, 0);
108 280u, 109 pButton_RestUI_Exit = pGUIWindow_CurrentMenu->CreateButton(280, 297, 154, 37, 1, 0, UIMSG_ExitRest, 0, 0, "", pIcons_LOD->GetTexture(uTextureID_RestUI_restexit), 0);
109 297u, 110 pButton_RestUI_Main = pGUIWindow_CurrentMenu->CreateButton( 24, 154, 225, 37, 1, 0, UIMSG_Rest8Hour, 0, 0x52u, "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb4), 0);
110 154u, 111 pButton_RestUI_WaitUntilDawn = pGUIWindow_CurrentMenu->CreateButton( 61, 232, 154, 33, 1, 0, UIMSG_AlreadyResting, 0, 0x44u, "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb1), 0);
111 37u, 112 pButton_RestUI_Wait1Hour = pGUIWindow_CurrentMenu->CreateButton( 61, 264, 154, 33, 1, 0, UIMSG_Wait1Hour, 0, 0x48u, "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb2), 0);
112 1, 113 pButton_RestUI_Wait5Minutes = pGUIWindow_CurrentMenu->CreateButton( 61, 296, 154, 33, 1, 0, UIMSG_Wait5Minutes, 0, 0x4Du, "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb3), 0);
113 0, 114 }
114 UIMSG_ExitRest,
115 0,
116 0,
117 "",
118 (Texture *)(uTextureID_RestUI_restexit != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_RestUI_restexit] : 0),
119 0);
120 pButton_RestUI_Main = pGUIWindow_CurrentMenu->CreateButton(
121 24u,
122 154u,
123 225u,
124 37u,
125 1,
126 0,
127 UIMSG_Rest8Hour,
128 0,
129 0x52u,
130 "",
131 (Texture *)(uTextureID_RestUI_restb4 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_RestUI_restb4] : 0),
132 0);
133 pButton_RestUI_WaitUntilDawn = pGUIWindow_CurrentMenu->CreateButton(
134 61u,
135 232u,
136 154u,
137 33u,
138 1,
139 0,
140 UIMSG_AlreadyResting,
141 0,
142 0x44u,
143 "",
144 (Texture *)(uTextureID_RestUI_restb1 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_RestUI_restb1] : 0),
145 0);
146 pButton_RestUI_Wait1Hour = pGUIWindow_CurrentMenu->CreateButton(
147 61u,
148 264u,
149 154u,
150 33u,
151 1,
152 0,
153 UIMSG_Wait1Hour,
154 0,
155 0x48u,
156 "",
157 (Texture *)(uTextureID_RestUI_restb2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_RestUI_restb2] : 0),
158 0);
159 pButton_RestUI_Wait5Minutes = pGUIWindow_CurrentMenu->CreateButton(
160 61u,
161 296u,
162 154u,
163 33u,
164 1,
165 0,
166 UIMSG_Wait5Minutes,
167 0,
168 0x4Du,
169 "",
170 (Texture *)(uTextureID_RestUI_restb3 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_RestUI_restb3] : 0),
171 0);
172 }
173 115
174 //----- (0041FA01) -------------------------------------------------------- 116 //----- (0041FA01) --------------------------------------------------------
175 void __cdecl RestUI_Draw() 117 void __cdecl RestUI_Draw()
176 { 118 {
177 int v0; // esi@1 119 int v0; // esi@1
187 unsigned int v10; // [sp+D8h] [bp-Ch]@9 129 unsigned int v10; // [sp+D8h] [bp-Ch]@9
188 __int16 a9[2]; // [sp+DCh] [bp-8h]@1 130 __int16 a9[2]; // [sp+DCh] [bp-8h]@1
189 int a5; // [sp+E0h] [bp-4h]@1 131 int a5; // [sp+E0h] [bp-4h]@1
190 132
191 v0 = 0; 133 v0 = 0;
192 a5 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xAu, 0, 0); 134 a5 = TargetColor(0xAu, 0, 0);
193 *(int *)a9 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE6u, 0xD6u, 0xC1u); 135 *(int *)a9 = TargetColor(0xE6u, 0xD6u, 0xC1u);
194 ppPlayers = &pPlayers[1]; 136 ppPlayers = &pPlayers[1];
195 do 137 do
196 { 138 {
197 pPlayer = *ppPlayers; 139 pPlayer = *ppPlayers;
198 if ( !(*ppPlayers)->pConditions[14] && !pPlayer->pConditions[16] && pPlayer->sHealth > 0 ) 140 if ( !(*ppPlayers)->pConditions[14] && !pPlayer->pConditions[16] && pPlayer->sHealth > 0 )
200 ++ppPlayers; 142 ++ppPlayers;
201 } 143 }
202 while ( (signed int)ppPlayers <= (signed int)&pPlayers[4] ); 144 while ( (signed int)ppPlayers <= (signed int)&pPlayers[4] );
203 if ( v0 ) 145 if ( v0 )
204 { 146 {
205 pRenderer->DrawTextureIndexed( 147 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_RestUI_restmain));
206 8u,
207 8u,
208 (Texture *)(uTextureID_RestUI_restmain != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_RestUI_restmain] : 0));
209 v10 = pParty->uCurrentHour; 148 v10 = pParty->uCurrentHour;
210 dword_506F1C = pGUIWindow_CurrentMenu->pCurrentPosActiveItem; 149 dword_506F1C = pGUIWindow_CurrentMenu->pCurrentPosActiveItem;
211 if ( (signed int)pParty->uCurrentHour <= 12 ) 150 if ( (signed int)pParty->uCurrentHour <= 12 )
212 { 151 {
213 if ( !v10 ) 152 if ( !v10 )