comparison mm7_3.cpp @ 296:af7e848d6def

Merge
author Nomad
date Tue, 19 Feb 2013 13:31:50 +0200
parents 640a176c030f 0ea5fbd16edb
children 3dcc9d945eeb
comparison
equal deleted inserted replaced
295:640a176c030f 296:af7e848d6def
15228 strcpy(v14->pButtonName, pGlobalTXT_LocalizationStrings[406]); // Hire 15228 strcpy(v14->pButtonName, pGlobalTXT_LocalizationStrings[406]); // Hire
15229 } 15229 }
15230 else if (v16 == 24) 15230 else if (v16 == 24)
15231 { 15231 {
15232 __debugbreak(); // learn conditions of this event 15232 __debugbreak(); // learn conditions of this event
15233 auto topic = pNPCTopics[pNPC->evtf - 1].pTopic;//(&dword_721660)[8 * v23]; 15233 auto topic = pNPCTopics[pNPC->evt_F - 1].pTopic;//(&dword_721660)[8 * v23];
15234 if (!topic) 15234 if (!topic)
15235 { 15235 {
15236 v14->pButtonName[0] = 0; 15236 v14->pButtonName[0] = 0;
15237 v14->uControlParam = 0; 15237 v14->uControlParam = 0;
15238 } 15238 }
15242 else if (v16 == 9) 15242 else if (v16 == 9)
15243 strcpy(v14->pButtonName, GetProfessionActionText(pNPC->uProfession)); 15243 strcpy(v14->pButtonName, GetProfessionActionText(pNPC->uProfession));
15244 else if (v16 == 19) 15244 else if (v16 == 19)
15245 { 15245 {
15246 __debugbreak(); // learn conditions of this event 15246 __debugbreak(); // learn conditions of this event
15247 auto topic = pNPCTopics[pNPC->bDrawSomeAnim - 1].pTopic;//(&dword_721660)[8 * v23]; 15247 auto topic = pNPCTopics[pNPC->evt_A - 1].pTopic;//(&dword_721660)[8 * v23];
15248 if (!topic) 15248 if (!topic)
15249 { 15249 {
15250 v14->pButtonName[0] = 0; 15250 v14->pButtonName[0] = 0;
15251 v14->uControlParam = 0; 15251 v14->uControlParam = 0;
15252 } 15252 }
15253 else strcpy(v14->pButtonName, topic); 15253 else strcpy(v14->pButtonName, topic);
15254 } 15254 }
15255 else if (v16 == 20) 15255 else if (v16 == 20)
15256 { 15256 {
15257 __debugbreak(); // learn conditions of this event 15257 __debugbreak(); // learn conditions of this event
15258 auto topic = pNPCTopics[pNPC->_anim_current_time - 1].pTopic;//(&dword_721660)[8 * v23]; 15258 auto topic = pNPCTopics[pNPC->evt_B - 1].pTopic;//(&dword_721660)[8 * v23];
15259 if (!topic) 15259 if (!topic)
15260 { 15260 {
15261 v14->pButtonName[0] = 0; 15261 v14->pButtonName[0] = 0;
15262 v14->uControlParam = 0; 15262 v14->uControlParam = 0;
15263 } 15263 }
15264 else strcpy(v14->pButtonName, topic); 15264 else strcpy(v14->pButtonName, topic);
15265 } 15265 }
15266 else if (v16 == 21) 15266 else if (v16 == 21)
15267 { 15267 {
15268 __debugbreak(); // learn conditions of this event 15268 __debugbreak(); // learn conditions of this event
15269 auto topic = pNPCTopics[pNPC->_anim_end_time - 1].pTopic;//(&dword_721660)[8 * v23]; 15269 auto topic = pNPCTopics[pNPC->evt_C - 1].pTopic;//(&dword_721660)[8 * v23];
15270 if (!topic) 15270 if (!topic)
15271 { 15271 {
15272 v14->pButtonName[0] = 0; 15272 v14->pButtonName[0] = 0;
15273 v14->uControlParam = 0; 15273 v14->uControlParam = 0;
15274 } 15274 }
15275 else strcpy(v14->pButtonName, topic); 15275 else strcpy(v14->pButtonName, topic);
15276 } 15276 }
15277 else if (v16 == 22) 15277 else if (v16 == 22)
15278 { 15278 {
15279 __debugbreak(); // learn conditions of this event 15279 __debugbreak(); // learn conditions of this event
15280 auto topic = pNPCTopics[pNPC->evtd - 1].pTopic;//(&dword_721660)[8 * v23]; 15280 auto topic = pNPCTopics[pNPC->evt_D - 1].pTopic;//(&dword_721660)[8 * v23];
15281 if (!topic) 15281 if (!topic)
15282 { 15282 {
15283 v14->pButtonName[0] = 0; 15283 v14->pButtonName[0] = 0;
15284 v14->uControlParam = 0; 15284 v14->uControlParam = 0;
15285 } 15285 }
15286 else strcpy(v14->pButtonName, topic); 15286 else strcpy(v14->pButtonName, topic);
15287 } 15287 }
15288 else if (v16 == 23) 15288 else if (v16 == 23)
15289 { 15289 {
15290 __debugbreak(); // learn conditions of this event 15290 __debugbreak(); // learn conditions of this event
15291 auto topic = pNPCTopics[pNPC->evte - 1].pTopic;//(&dword_721660)[8 * v23]; 15291 auto topic = pNPCTopics[pNPC->evt_E - 1].pTopic;//(&dword_721660)[8 * v23];
15292 if (!topic) 15292 if (!topic)
15293 { 15293 {
15294 v14->pButtonName[0] = 0; 15294 v14->pButtonName[0] = 0;
15295 v14->uControlParam = 0; 15295 v14->uControlParam = 0;
15296 } 15296 }
15475 { 15475 {
15476 MessageBoxW(nullptr, L"NPC id exceeds MAX_DATA!", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Events.cpp:1984", 0); 15476 MessageBoxW(nullptr, L"NPC id exceeds MAX_DATA!", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Events.cpp:1984", 0);
15477 } 15477 }
15478 return &pNPCStats->pNewNPCData[v1];// - 1]; 15478 return &pNPCStats->pNewNPCData[v1];// - 1];
15479 } 15479 }
15480 return &pNPCStats->array_13EF4[npcid - 5000]; 15480 return &pNPCStats->pAdditionalNPC[npcid - 5000];
15481 } 15481 }
15482 15482
15483 15483
15484 if ( npcid >= 5000 ) 15484 if ( npcid >= 5000 )
15485 return &pNPCStats->array_13EF4[npcid - 5000]; 15485 return &pNPCStats->pAdditionalNPC[npcid - 5000];
15486 if (uDialogue_SpeakingActorNPC_ID >= 0) 15486 if (uDialogue_SpeakingActorNPC_ID >= 0)
15487 { 15487 {
15488 result = 0; 15488 result = 0;
15489 } 15489 }
15490 else 15490 else
15556 *(int *)v3 = v2; 15556 *(int *)v3 = v2;
15557 return &pNPCStats->pNewNPCData[v2]; 15557 return &pNPCStats->pNewNPCData[v2];
15558 } 15558 }
15559 LABEL_7: 15559 LABEL_7:
15560 *(int *)a2 = npcid - 5000; 15560 *(int *)a2 = npcid - 5000;
15561 return &pNPCStats->array_13EF4[npcid - 5000]; 15561 return &pNPCStats->pAdditionalNPC[npcid - 5000];
15562 } 15562 }
15563 if ( npcid >= 5000 ) 15563 if ( npcid >= 5000 )
15564 goto LABEL_7; 15564 goto LABEL_7;
15565 if ( (uDialogue_SpeakingActorNPC_ID & 0x80000000u) == 0 ) 15565 if ( (uDialogue_SpeakingActorNPC_ID & 0x80000000u) == 0 )
15566 { 15566 {
16312 { 16312 {
16313 v37 = v36 - 1; 16313 v37 = v36 - 1;
16314 if ( v37 ) 16314 if ( v37 )
16315 { 16315 {
16316 if ( v37 == 1 ) 16316 if ( v37 == 1 )
16317 v33->evtf = v30; 16317 v33->evt_F = v30;
16318 } 16318 }
16319 else 16319 else
16320 { 16320 {
16321 v33->evte = v30; 16321 v33->evt_E = v30;
16322 } 16322 }
16323 } 16323 }
16324 else 16324 else
16325 { 16325 {
16326 v33->evtd = v30; 16326 v33->evt_D = v30;
16327 } 16327 }
16328 } 16328 }
16329 else 16329 else
16330 { 16330 {
16331 v33->_anim_end_time = v30; 16331 v33->evt_C = v30;
16332 } 16332 }
16333 } 16333 }
16334 else 16334 else
16335 { 16335 {
16336 v33->_anim_current_time = v30; 16336 v33->evt_B = v30;
16337 } 16337 }
16338 } 16338 }
16339 else 16339 else
16340 { 16340 {
16341 v33->bDrawSomeAnim = v30; 16341 v33->evt_A = v30;
16342 } 16342 }
16343 if ( v29 == 8 ) 16343 if ( v29 == 8 )
16344 { 16344 {
16345 if ( v30 == 78 ) 16345 if ( v30 == 78 )
16346 { 16346 {
16446 //v5 = pSomeEVT; 16446 //v5 = pSomeEVT;
16447 //v6 = v123; 16447 //v6 = v123;
16448 //v7 = ""; 16448 //v7 = "";
16449 break; 16449 break;
16450 case EVENT_MoveNPC: 16450 case EVENT_MoveNPC:
16451 pNPCStats->pNewNPCData[_evt->v5 + ((_evt->v6 + ((_evt->v7 + ((uint)_evt->v8 << 8)) << 8)) << 8)].house = _evt->v9 + ((_evt->v10 + ((_evt->v11 + ((uint)_evt->v12 << 8)) << 8)) << 8); 16451 pNPCStats->pNewNPCData[_evt->v5 + ((_evt->v6 + ((_evt->v7 + ((uint)_evt->v8 << 8)) << 8)) << 8)].Location2D = _evt->v9 + ((_evt->v10 + ((_evt->v11 + ((uint)_evt->v12 << 8)) << 8)) << 8);
16452 if ( ptr_507BC0 ) 16452 if ( ptr_507BC0 )
16453 { 16453 {
16454 v46 = ptr_507BC0->ptr_1C; 16454 v46 = ptr_507BC0->ptr_1C;
16455 if ( v46 == (void *)165 ) 16455 if ( v46 == (void *)165 )
16456 { 16456 {