Mercurial > mm7
comparison mm7_4.cpp @ 461:197461e5acec
moved shop generators to item.cpp
author | Gloval |
---|---|
date | Sun, 24 Feb 2013 20:47:01 +0400 |
parents | 4946b3ed74be |
children | 37090bd974f9 |
comparison
equal
deleted
inserted
replaced
442:a812665688e4 | 461:197461e5acec |
---|---|
13487 return result; | 13487 return result; |
13488 } | 13488 } |
13489 | 13489 |
13490 | 13490 |
13491 | 13491 |
13492 //----- (004B8F94) -------------------------------------------------------- | |
13493 void sub_4B8F94() | |
13494 { | |
13495 GUIWindow *v0; // edi@1 | |
13496 signed int v1; // ebp@1 | |
13497 int v2; // ebx@1 | |
13498 signed int v3; // esi@1 | |
13499 int v4; // eax@3 | |
13500 int v5; // ebx@3 | |
13501 int v6; // ecx@3 | |
13502 bool v7; // eax@5 | |
13503 bool v8; // ST1C_4@5 | |
13504 int v9; // eax@5 | |
13505 int v10; // eax@10 | |
13506 void *result; // eax@15 | |
13507 signed int v12; // [sp-4h] [bp-18h]@7 | |
13508 | |
13509 v0 = window_SpeakInHouse; | |
13510 v1 = 0; | |
13511 v2 = (int)&window_SpeakInHouse->ptr_1C; | |
13512 v3 = (signed int)window_SpeakInHouse->ptr_1C; | |
13513 //if ( _4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * (unsigned int)ptr_507BC0->ptr_1C]] ) | |
13514 if ( _4F063C_smthn_by_2da_uType[p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].uType] ) | |
13515 { | |
13516 while ( v3 > 14 ) | |
13517 { | |
13518 if ( v3 <= 28 ) | |
13519 { | |
13520 v7 = v1 > 3; | |
13521 v8 = v7; | |
13522 v9 = 5 * (v7 + 2 * v3 - 30); | |
13523 v3 = (signed int)v0->ptr_1C; | |
13524 v5 = word_4F06D8[v9]; | |
13525 v6 = word_4F05AE[5 * (v8 + 2 * v3) + rand() % 4]; | |
13526 goto LABEL_13; | |
13527 } | |
13528 if ( v3 <= 41 ) | |
13529 { | |
13530 v5 = word_4F07B6[v3]; | |
13531 v12 = 22; | |
13532 goto LABEL_12; | |
13533 } | |
13534 if ( v3 <= 53 ) | |
13535 { | |
13536 if ( v1 >= 6 ) | |
13537 { | |
13538 v5 = word_4F07B6[v3 + 1]; | |
13539 v12 = 44; | |
13540 LABEL_12: | |
13541 v6 = v12; | |
13542 LABEL_13: | |
13543 pItemsTable->GenerateItem(v5, v6,&pParty->Recipes_Item[v3][v1]);//(ItemGen *)&pParty->field_C59C[9 * (v1 + 12 * v3) + 724]); | |
13544 v0 = window_SpeakInHouse; | |
13545 v2 = (int)&window_SpeakInHouse->ptr_1C; | |
13546 // pParty->field_C59C[9 * (v1 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 729] = 1; | |
13547 pParty->Recipes_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v1].uAttributes= 1; | |
13548 goto LABEL_14; | |
13549 } | |
13550 // auto _a = (ItemGen *)&pParty->field_C59C[9 * (v1 + 12 * v3) + 724]; | |
13551 auto _a =&pParty->Recipes_Item[v3][v1]; | |
13552 _a->Reset(); | |
13553 // v2 = (int)&v0->ptr_1C; | |
13554 //v10 = rand(); | |
13555 // v0 = window_SpeakInHouse; | |
13556 // pParty->field_C59C[9 * (v1 + 12 * *(int *)v2) + 724] = v10 % 32 + 740; | |
13557 pParty->Recipes_Item[(int)v0->ptr_1C][v1].uItemID= rand() % 32 + 740; | |
13558 } | |
13559 LABEL_14: | |
13560 v3 = *(int *)v2; | |
13561 ++v1; | |
13562 //if ( v1 >= (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents_minus1___00[26 * *(int *)v2]] ) | |
13563 if ( v1 >= (unsigned __int8)_4F063C_smthn_by_2da_uType[p2DEvents[*(int *)v2 - 1].uType] ) | |
13564 goto LABEL_15; | |
13565 } | |
13566 v4 = 5 * v3; | |
13567 v3 = (signed int)v0->ptr_1C; | |
13568 v5 = word_4F063E[v4]; | |
13569 v6 = word_4F063E[5 * v3 + rand() % 4 + 1]; | |
13570 goto LABEL_13; | |
13571 } | |
13572 LABEL_15: | |
13573 result = v0->ptr_1C; | |
13574 pParty->field_16154[(int)v0->ptr_1C] = 0; | |
13575 } | |
13576 | |
13577 | |
13578 //----- (004B6478) -------------------------------------------------------- | 13492 //----- (004B6478) -------------------------------------------------------- |
13579 int __cdecl sub_4B6478() | 13493 int __cdecl sub_4B6478() |
13580 { | 13494 { |
13581 GUIWindow *v0; // ebx@1 | 13495 GUIWindow *v0; // ebx@1 |
13582 Player *v1; // edi@1 | 13496 Player *v1; // edi@1 |