comparison mm7_6.cpp @ 781:d170f23f70d1

tidy, code moving
author zipi
date Sun, 24 Mar 2013 01:27:34 +0000
parents 6daaa2f18d0d
children b3e08a496778
comparison
equal deleted inserted replaced
780:93c6b78abf35 781:d170f23f70d1
449 result = v22; 449 result = v22;
450 if ( v22 < 3 ) 450 if ( v22 < 3 )
451 return 0; 451 return 0;
452 return result; 452 return result;
453 } 453 }
454
455
456
457 //----- (004361EF) --------------------------------------------------------
458 IndoorCameraD3D::IndoorCameraD3D()
459 {
460 IndoorCameraD3D *v1; // esi@1
461 //double v2; // st7@1
462 //double v3; // st6@1
463 //double v4; // st5@1
464 //double v5; // st7@1
465 //double v6; // st6@1
466 //double v7; // st5@1
467
468 v1 = this;
469 //IndoorCameraD3D_Vec3::IndoorCameraD3D_Vec3(&this->field_4);
470 //IndoorCameraD3D_Vec3::IndoorCameraD3D_Vec3(&v1->field_14);
471 //IndoorCameraD3D_Vec3::IndoorCameraD3D_Vec3(&v1->field_24);
472 /*_eh_vector_constructor_iterator_(v1->std__vector_000034_prolly_frustrum,
473 24,
474 6,
475 (void (__thiscall *)(void *))IndoorCameraD3D_Vec4::IndoorCameraD3D_Vec4,
476 (void (__thiscall *)(void *))IndoorCameraD3D_Vec4::dtor);*/
477 //v2 = 0;//(double)pBLVRenderParams->vPartyPos.z;
478 //v3 = 0;//(double)pBLVRenderParams->vPartyPos.y;
479 //v4 = 0;//(double)pBLVRenderParams->vPartyPos.x;
480 v1->field_108 = 0.0;
481 v1->blv_party_x = 0;
482 v1->blv_party_y = 0;
483 v1->blv_party_z = 0;
484 //v5 = 0;//(double)pBLVRenderParams->vPartyPos.z;
485 //v6 = 0;//(double)pBLVRenderParams->vPartyPos.y;
486 //v7 = 300;//(double)(pBLVRenderParams->vPartyPos.x + 300);
487 v1->field_138 = 0.0;
488 v1->blv_party_x_2 = 300;
489 v1->blv_party_y_2 = 0;
490 v1->blv_party_z_2 = 0;
491 v1->field_168 = 0.0;
492 v1->field_198 = 0.0;
493 v1->field_1C8 = 0.0;
494 v1->field_1F8 = 0.0;
495 v1->field_228 = 0.0;
496 v1->field_258 = 0.0;
497 v1->field_288 = 0.0;
498 v1->field_2B8 = 0.0;
499 v1->field_2E8 = 0.0;
500 v1->field_2BC = 0.0;
501 v1->field_2C0 = 0.0;
502 v1->field_2C4 = 0.0;
503 v1->field_318 = 0.0;
504 v1->field_2EC = 0.0;
505 v1->field_2F0 = 0.0;
506 v1->field_2F4 = 0.0;
507 v1->field_348 = 0.0;
508 v1->field_31C = 0.0;
509 v1->field_320 = 0.0;
510 v1->field_324 = 0.0;
511 v1->field_378 = 0.0;
512 v1->field_34C = 0.0;
513 v1->field_350 = 0.0;
514 v1->field_354 = 0.0;
515 for (uint i = 0; i < 16384; ++i)
516 {
517 list_0037C[i].field_0 = 0;
518 list_0037C[i].flt_30 = 0.0f;
519 }
520
521 list_0037C_size = 0;
522 for (uint i = 0; i < 256; ++i)
523 list_E0380[i].mm7__vector_000004_size = 0;
524 /*v10 = v1->list_E0380;
525 v12 = 256;
526 do
527 {
528 v10->mm7__vector_000004_size = 0;
529 //mm7__vector_constructor(
530 // v10->mm7__vector_000004,
531 // 48,
532 // 64,
533 // (int (__thiscall *)(int))IndoorCameraD3D_stru1::IndoorCameraD3D_stru1);
534 //++v10;
535 --v12;
536 }
537 while ( v12 );*/
538 list_E0380_size = 0;
539 //v1->vdestructor_ptr = &stru8_pvdtor;
540 }
541
542 454
543 //----- (004254D2) -------------------------------------------------------- 455 //----- (004254D2) --------------------------------------------------------
544 int __fastcall sr_4254D2(signed int a1) 456 int __fastcall sr_4254D2(signed int a1)
545 { 457 {
546 signed int v1; // ebx@2 458 signed int v1; // ebx@2
1241 } 1153 }
1242 LOBYTE(result) = 1; 1154 LOBYTE(result) = 1;
1243 return result; 1155 return result;
1244 } 1156 }
1245 1157
1246
1247
1248
1249 //----- (004268E3) -------------------------------------------------------- 1158 //----- (004268E3) --------------------------------------------------------
1250 int __fastcall _4268E3_smthn_to_a1r5g5b5(unsigned int uColor) 1159 int __fastcall _4268E3_smthn_to_a1r5g5b5(unsigned int uColor)
1251 { 1160 {
1252 unsigned int v1; // eax@1 1161 unsigned int v1; // eax@1
1253 unsigned int v2; // edx@1 1162 unsigned int v2; // edx@1
1287 dword_50C998_turnbased_icon_1A = 0; 1196 dword_50C998_turnbased_icon_1A = 0;
1288 } 1197 }
1289 // 50C968: using guessed type int dword_50C968; 1198 // 50C968: using guessed type int dword_50C968;
1290 // 50C994: using guessed type int dword_50C994; 1199 // 50C994: using guessed type int dword_50C994;
1291 // 50C998: using guessed type int dword_50C998_turnbased_icon_1A; 1200 // 50C998: using guessed type int dword_50C998_turnbased_icon_1A;
1292
1293
1294 1201
1295 //----- (004269A2) -------------------------------------------------------- 1202 //----- (004269A2) --------------------------------------------------------
1296 int __fastcall sub_4269A2_GivePartyExp(unsigned int a1) 1203 int __fastcall sub_4269A2_GivePartyExp(unsigned int a1)
1297 { 1204 {
1298 //unsigned __int64 v1; // qax@1 1205 //unsigned __int64 v1; // qax@1
1700 result = v23[rand() % v2]; 1607 result = v23[rand() % v2];
1701 else 1608 else
1702 result = 0; 1609 result = 0;
1703 return result; 1610 return result;
1704 } 1611 }
1705
1706 1612
1707 //----- (0042704B) -------------------------------------------------------- 1613 //----- (0042704B) --------------------------------------------------------
1708 bool stru319::special_ability_use_check(Actor *pActor, int a2) 1614 bool stru319::special_ability_use_check(Actor *pActor, int a2)
1709 { 1615 {
1710 stru319 *v3; // edi@1 1616 stru319 *v3; // edi@1
2158 break; 2064 break;
2159 } 2065 }
2160 return result; 2066 return result;
2161 } 2067 }
2162 2068
2163
2164 //----- (00427769) -------------------------------------------------------- 2069 //----- (00427769) --------------------------------------------------------
2165 bool __fastcall sub_427769_spell(unsigned int uSpellID) 2070 bool __fastcall sub_427769_spell(unsigned int uSpellID)
2166 { 2071 {
2167 bool result; // eax@2 2072 bool result; // eax@2
2168 2073
2483 pGUIWindow_Settings->CreateButton(0x1EBu, 0x95u, 0x40u, 0x4Au, 1, 0, 0x8Fu, 4u, 0x35u, "", 0); 2388 pGUIWindow_Settings->CreateButton(0x1EBu, 0x95u, 0x40u, 0x4Au, 1, 0, 0x8Fu, 4u, 0x35u, "", 0);
2484 pGUIWindow_Settings->CreateButton(0x231u, 0x95u, 0x40u, 0x4Au, 1, 0, 0x8Fu, 5u, 0x36u, "", 0); 2389 pGUIWindow_Settings->CreateButton(0x231u, 0x95u, 0x40u, 0x4Au, 1, 0, 0x8Fu, 5u, 0x36u, "", 0);
2485 } 2390 }
2486 } 2391 }
2487 } 2392 }
2488
2489
2490 2393
2491 //----- (00427D48) -------------------------------------------------------- 2394 //----- (00427D48) --------------------------------------------------------
2492 void stru277::_427D48(unsigned int uPlayerID) 2395 void stru277::_427D48(unsigned int uPlayerID)
2493 { 2396 {
2494 stru277 *v2; // esi@1 2397 stru277 *v2; // esi@1
7602 } 7505 }
7603 } 7506 }
7604 return v3; 7507 return v3;
7605 } 7508 }
7606 7509
7607
7608
7609 //----- (0042EB78) -------------------------------------------------------- 7510 //----- (0042EB78) --------------------------------------------------------
7610 int IconFrameTable::GetIconAnimLength(unsigned int uIconID) 7511 int IconFrameTable::GetIconAnimLength(unsigned int uIconID)
7611 { 7512 {
7612 return 8 * this->pIcons[uIconID].uAnimLength; 7513 return 8 * this->pIcons[uIconID].uAnimLength;
7613 } 7514 }
7614
7615 7515
7616 const wchar_t *UIMessage2String(UIMessageType msg) 7516 const wchar_t *UIMessage2String(UIMessageType msg)
7617 { 7517 {
7618 #define CASE(xxx) case xxx: _swprintf(b, L"%03X/%s", msg, L#xxx); return b; 7518 #define CASE(xxx) case xxx: _swprintf(b, L"%03X/%s", msg, L#xxx); return b;
7619 static wchar_t b[256]; // bad for threads 7519 static wchar_t b[256]; // bad for threads
7709 _swprintf(b, L"UIMSG_%03X", msg); return b; 7609 _swprintf(b, L"UIMSG_%03X", msg); return b;
7710 }; 7610 };
7711 #undef CASE 7611 #undef CASE
7712 } 7612 }
7713 7613
7714
7715 //----- (0042EB8D) -------------------------------------------------------- 7614 //----- (0042EB8D) --------------------------------------------------------
7716 void GUIMessageQueue::AddMessageImpl(UIMessageType msg, int param, unsigned int a4, const char *file, int line) 7615 void GUIMessageQueue::AddMessageImpl(UIMessageType msg, int param, unsigned int a4, const char *file, int line)
7717 { 7616 {
7718 //Log::Warning(L"%s @ (%S %u)", UIMessage2String(msg), file, line); 7617 //Log::Warning(L"%s @ (%S %u)", UIMessage2String(msg), file, line);
7719 if (uNumMessages < 40) 7618 if (uNumMessages < 40)
8103 } 8002 }
8104 } 8003 }
8105 } 8004 }
8106 return 0; 8005 return 0;
8107 } 8006 }
8108
8109 8007
8110 //----- (0042F3D6) -------------------------------------------------------- 8008 //----- (0042F3D6) --------------------------------------------------------
8111 void InitializeTurnBasedAnimations(void *_this) 8009 void InitializeTurnBasedAnimations(void *_this)
8112 { 8010 {
8113 unsigned int *v1; // edi@1 8011 unsigned int *v1; // edi@1
8502 0, 8400 0,
8503 0); 8401 0);
8504 } 8402 }
8505 return result; 8403 return result;
8506 } 8404 }
8507
8508
8509 8405
8510 //----- (0042FB5C) -------------------------------------------------------- 8406 //----- (0042FB5C) --------------------------------------------------------
8511 bool __fastcall sub_42FB5C(signed int a1) 8407 bool __fastcall sub_42FB5C(signed int a1)
8512 { 8408 {
8513 int v1; // ecx@3 8409 int v1; // ecx@3
9131 AsyncKeyboard::EnterCriticalSection(); 9027 AsyncKeyboard::EnterCriticalSection();
9132 memset((char *)v16 + 521, 0, 0x100u); 9028 memset((char *)v16 + 521, 0, 0x100u);
9133 AsyncKeyboard::LeaveCriticalSection(); 9029 AsyncKeyboard::LeaveCriticalSection();
9134 } 9030 }
9135 } 9031 }
9136