diff options
Diffstat (limited to 'reference')
| -rw-r--r-- | reference/game.c | 974 | ||||
| -rw-r--r-- | reference/types.hh | 15 |
2 files changed, 0 insertions, 989 deletions
diff --git a/reference/game.c b/reference/game.c index f0a4f51..0a5a2e5 100644 --- a/reference/game.c +++ b/reference/game.c @@ -29623,980 +29623,6 @@ void __static_initialization_and_destruction_0(int __initialize_p,int __priority return;
}
-// DWARF original prototype: void TAttackWave(TAttackWave * this)
-
-void __thiscall TAttackWave::TAttackWave(TAttackWave *this)
-
-{
- vector<TItemData>::vector(&this->ExtraItem,1,5,5);
- this->x = 0;
- this->y = 0;
- this->z = 0;
- this->Spread = 0;
- this->Race = -1;
- this->MinCount = 0;
- this->MaxCount = 0;
- this->Radius = 0x7fffffff;
- this->Lifetime = 0;
- this->Message = 0;
- this->ExtraItems = 0;
- return;
-}
-
-
-
-// DWARF original prototype: void TAttackWave(TAttackWave * this)
-
-void __thiscall TAttackWave::TAttackWave(TAttackWave *this)
-
-{
- vector<TItemData>::vector(&this->ExtraItem,1,5,5);
- this->x = 0;
- this->y = 0;
- this->z = 0;
- this->Spread = 0;
- this->Race = -1;
- this->MinCount = 0;
- this->MaxCount = 0;
- this->Radius = 0x7fffffff;
- this->Lifetime = 0;
- this->Message = 0;
- this->ExtraItems = 0;
- return;
-}
-
-
-
-// DWARF original prototype: void ~TAttackWave(TAttackWave * this, int __in_chrg)
-
-void __thiscall TAttackWave::~TAttackWave(TAttackWave *this,int __in_chrg)
-
-{
- TItemData *pTVar1;
-
- if (this->Message != 0) {
- DeleteDynamicString(this->Message);
- }
- pTVar1 = (this->ExtraItem).entry;
- if (pTVar1 == (TItemData *)0x0) {
- return;
- }
- operator_delete__(pTVar1);
- return;
-}
-
-
-
-// DWARF original prototype: void ~TAttackWave(TAttackWave * this, int __in_chrg)
-
-void __thiscall TAttackWave::~TAttackWave(TAttackWave *this,int __in_chrg)
-
-{
- TItemData *pTVar1;
-
- if (this->Message != 0) {
- DeleteDynamicString(this->Message);
- }
- pTVar1 = (this->ExtraItem).entry;
- if (pTVar1 == (TItemData *)0x0) {
- return;
- }
- operator_delete__(pTVar1);
- return;
-}
-
-
-
-void LoadMonsterRaid(char *FileName,int Start,bool *Type,int *Date,int *Interval,int *Duration)
-
-{
- TReadScriptFile *pTVar1;
- bool bVar2;
- char cVar3;
- char *pcVar4;
- char *pcVar5;
- TAttackWave *this;
- TItemData *this_00;
- ulong uVar6;
- undefined4 *puVar7;
- int End;
- int iVar8;
- int iVar9;
- char *pcVar10;
- undefined1 uVar11;
- char *in_stack_ffffbfac;
- int Delay;
- TAttackWave *AttackWave;
- ObjectType local_402c [4];
- char local_401c [4];
- char Ident [30];
- TReadScriptFile Script;
-
- if (FileName == (char *)0x0) {
- pcVar4 = "LoadMonsterRaid: Dateiname ist NULL.\n";
-LAB_080a45c3:
- // try { // try from 080a45c3 to 080a45f1 has its CatchHandler @ 080a4636
- error(pcVar4);
- puVar7 = (undefined4 *)__cxa_allocate_exception(4);
- *puVar7 = "cannot load monster raid";
- // WARNING: Subroutine does not return
- __cxa_throw(puVar7,char_const*::typeinfo,0);
- }
- uVar11 = Start == 0;
- if (Start < 0) {
- if ((((Type == (bool *)0x0) || (Date == (int *)0x0)) || (Interval == (int *)0x0)) ||
- (uVar11 = Duration == (int *)0x0, (bool)uVar11)) {
- pcVar4 = &DAT_08102420;
- goto LAB_080a45c3;
- }
- *Date = 0;
- *Interval = 0;
- *Duration = 0;
- }
- else {
- in_stack_ffffbfac = FileName;
- // try { // try from 080a3d82 to 080a3d94 has its CatchHandler @ 080a4636
- print();
- }
- TReadScriptFile::TReadScriptFile((TReadScriptFile *)(Ident + 0x1c));
- pTVar1 = (TReadScriptFile *)(Ident + 0x1c);
- // try { // try from 080a3da2 to 080a3ebd has its CatchHandler @ 080a4630
- TReadScriptFile::open(pTVar1,FileName,(int)in_stack_ffffbfac);
- TReadScriptFile::nextToken(pTVar1);
- pcVar4 = TReadScriptFile::getIdentifier(pTVar1);
- iVar8 = 0xc;
- pcVar5 = "description";
- do {
- if (iVar8 == 0) break;
- iVar8 = iVar8 + -1;
- uVar11 = *pcVar4 == *pcVar5;
- pcVar4 = pcVar4 + 1;
- pcVar5 = pcVar5 + 1;
- } while ((bool)uVar11);
- if ((bool)uVar11) {
- TReadScriptFile::readSymbol((TReadScriptFile *)(Ident + 0x1c),'=');
- TReadScriptFile::readString((TReadScriptFile *)(Ident + 0x1c));
- TReadScriptFile::nextToken((TReadScriptFile *)(Ident + 0x1c));
- }
- pcVar4 = TReadScriptFile::getIdentifier((TReadScriptFile *)(Ident + 0x1c));
- iVar8 = 5;
- pcVar5 = "type";
- do {
- if (iVar8 == 0) break;
- iVar8 = iVar8 + -1;
- uVar11 = *pcVar4 == *pcVar5;
- pcVar4 = pcVar4 + 1;
- pcVar5 = pcVar5 + 1;
- } while ((bool)uVar11);
- if (!(bool)uVar11) {
- TReadScriptFile::error((TReadScriptFile *)(Ident + 0x1c),"type expected");
- }
- TReadScriptFile::readSymbol((TReadScriptFile *)(Ident + 0x1c),'=');
- TReadScriptFile::readIdentifier((TReadScriptFile *)(Ident + 0x1c));
- uVar11 = Start == 0;
- if (Start < 0) {
- pcVar4 = TReadScriptFile::getIdentifier((TReadScriptFile *)(Ident + 0x1c));
- iVar8 = 8;
- pcVar5 = "bigraid";
- do {
- if (iVar8 == 0) break;
- iVar8 = iVar8 + -1;
- uVar11 = *pcVar4 == *pcVar5;
- pcVar4 = pcVar4 + 1;
- pcVar5 = pcVar5 + 1;
- } while ((bool)uVar11);
- *Type = (bool)uVar11;
- }
- TReadScriptFile::readIdentifier((TReadScriptFile *)(Ident + 0x1c));
- pcVar4 = TReadScriptFile::getIdentifier((TReadScriptFile *)(Ident + 0x1c));
- iVar8 = 5;
- pcVar5 = "date";
- do {
- if (iVar8 == 0) break;
- iVar8 = iVar8 + -1;
- uVar11 = *pcVar4 == *pcVar5;
- pcVar4 = pcVar4 + 1;
- pcVar5 = pcVar5 + 1;
- } while ((bool)uVar11);
- if ((bool)uVar11) {
- pcVar4 = (char *)0x3d;
- TReadScriptFile::readSymbol((TReadScriptFile *)(Ident + 0x1c),'=');
- TReadScriptFile::readNumber((TReadScriptFile *)(Ident + 0x1c));
- uVar11 = Start == 0;
- if (-1 < Start) goto LAB_080a3e84;
- iVar8 = TReadScriptFile::getNumber((TReadScriptFile *)(Ident + 0x1c));
- }
- else {
- pcVar4 = TReadScriptFile::getIdentifier((TReadScriptFile *)(Ident + 0x1c));
- iVar8 = 9;
- pcVar5 = "interval";
- do {
- if (iVar8 == 0) break;
- iVar8 = iVar8 + -1;
- uVar11 = *pcVar4 == *pcVar5;
- pcVar4 = pcVar4 + 1;
- pcVar5 = pcVar5 + 1;
- } while ((bool)uVar11);
- if (!(bool)uVar11) {
- pcVar4 = "date or interval expected";
- TReadScriptFile::error((TReadScriptFile *)(Ident + 0x1c),"date or interval expected");
- goto LAB_080a3e84;
- }
- pcVar4 = (char *)0x3d;
- TReadScriptFile::readSymbol((TReadScriptFile *)(Ident + 0x1c),'=');
- TReadScriptFile::readNumber((TReadScriptFile *)(Ident + 0x1c));
- uVar11 = Start == 0;
- if (-1 < Start) goto LAB_080a3e84;
- iVar8 = TReadScriptFile::getNumber((TReadScriptFile *)(Ident + 0x1c));
- Date = Interval;
- }
- *Date = iVar8;
-LAB_080a3e84:
- pcVar5 = TReadScriptFile::readIdentifier((TReadScriptFile *)(Ident + 0x1c));
- iVar8 = 6;
- pcVar10 = "delay";
- do {
- if (iVar8 == 0) break;
- iVar8 = iVar8 + -1;
- uVar11 = *pcVar5 == *pcVar10;
- pcVar5 = pcVar5 + 1;
- pcVar10 = pcVar10 + 1;
- } while ((bool)uVar11);
- if (!(bool)uVar11) {
- pcVar4 = "delay expected";
- TReadScriptFile::error((TReadScriptFile *)(Ident + 0x1c),"delay expected");
- }
- do {
- if (unique0x100007f5 != 1) {
- TReadScriptFile::close((TReadScriptFile *)(Ident + 0x1c),(int)pcVar4);
- // try { // try from 080a3ec7 to 080a3ecb has its CatchHandler @ 080a4636
- TReadScriptFile::~TReadScriptFile((TReadScriptFile *)(Ident + 0x1c),(int)pcVar4);
- return;
- }
- pcVar4 = (char *)0x3d;
- // try { // try from 080a3eea to 080a3f08 has its CatchHandler @ 080a4630
- TReadScriptFile::readSymbol((TReadScriptFile *)(Ident + 0x1c),'=');
- iVar8 = TReadScriptFile::readNumber((TReadScriptFile *)(Ident + 0x1c));
- this = (TAttackWave *)operator_new(0x54);
- // try { // try from 080a3f0e to 080a3f12 has its CatchHandler @ 080a45fb
- TAttackWave::TAttackWave(this);
- // try { // try from 080a3f22 to 080a4573 has its CatchHandler @ 080a4630
- while (TReadScriptFile::nextToken((TReadScriptFile *)(Ident + 0x1c)), stack0xffffc004 != 0)
- {
- uVar11 = stack0xffffc004 == 1;
- if (!(bool)uVar11) {
- pcVar4 = "identifier expected";
- TReadScriptFile::error((TReadScriptFile *)(Ident + 0x1c),"identifier expected");
- }
- pcVar5 = TReadScriptFile::getIdentifier((TReadScriptFile *)(Ident + 0x1c));
- iVar9 = 6;
- pcVar10 = "delay";
- do {
- if (iVar9 == 0) break;
- iVar9 = iVar9 + -1;
- uVar11 = *pcVar5 == *pcVar10;
- pcVar5 = pcVar5 + 1;
- pcVar10 = pcVar10 + 1;
- } while ((bool)uVar11);
- if ((bool)uVar11) break;
- pcVar4 = TReadScriptFile::getIdentifier((TReadScriptFile *)(Ident + 0x1c));
- strcpy(local_401c,pcVar4);
- pcVar4 = (char *)0x3d;
- TReadScriptFile::readSymbol((TReadScriptFile *)(Ident + 0x1c),'=');
- iVar9 = 9;
- pcVar5 = local_401c;
- pcVar10 = "location";
- do {
- if (iVar9 == 0) break;
- iVar9 = iVar9 + -1;
- uVar11 = *pcVar5 == *pcVar10;
- pcVar5 = pcVar5 + 1;
- pcVar10 = pcVar10 + 1;
- } while ((bool)uVar11);
- if ((bool)uVar11) {
- TReadScriptFile::readString((TReadScriptFile *)(Ident + 0x1c));
- }
- iVar9 = 9;
- pcVar5 = local_401c;
- pcVar10 = "position";
- do {
- if (iVar9 == 0) break;
- iVar9 = iVar9 + -1;
- uVar11 = *pcVar5 == *pcVar10;
- pcVar5 = pcVar5 + 1;
- pcVar10 = pcVar10 + 1;
- } while ((bool)uVar11);
- if ((bool)uVar11) {
- pcVar4 = (char *)this;
- TReadScriptFile::readCoordinate((TReadScriptFile *)(Ident + 0x1c));
- }
- iVar9 = 7;
- pcVar5 = local_401c;
- pcVar10 = "spread";
- do {
- if (iVar9 == 0) break;
- iVar9 = iVar9 + -1;
- uVar11 = *pcVar5 == *pcVar10;
- pcVar5 = pcVar5 + 1;
- pcVar10 = pcVar10 + 1;
- } while ((bool)uVar11);
- if ((bool)uVar11) {
- iVar9 = TReadScriptFile::readNumber((TReadScriptFile *)(Ident + 0x1c));
- this->Spread = iVar9;
- }
- iVar9 = 5;
- pcVar5 = local_401c;
- pcVar10 = "race";
- do {
- if (iVar9 == 0) break;
- iVar9 = iVar9 + -1;
- uVar11 = *pcVar5 == *pcVar10;
- pcVar5 = pcVar5 + 1;
- pcVar10 = pcVar10 + 1;
- } while ((bool)uVar11);
- if ((bool)uVar11) {
- iVar9 = TReadScriptFile::readNumber((TReadScriptFile *)(Ident + 0x1c));
- this->Race = iVar9;
- bVar2 = false;
- if ((0 < this->Race) && (this->Race < 0x200)) {
- bVar2 = true;
- }
- uVar11 = !bVar2;
- if ((bool)uVar11) {
- pcVar4 = "illegal race number";
- TReadScriptFile::error((TReadScriptFile *)(Ident + 0x1c),"illegal race number");
- }
- }
- iVar9 = 6;
- pcVar5 = local_401c;
- pcVar10 = "count";
- do {
- if (iVar9 == 0) break;
- iVar9 = iVar9 + -1;
- uVar11 = *pcVar5 == *pcVar10;
- pcVar5 = pcVar5 + 1;
- pcVar10 = pcVar10 + 1;
- } while ((bool)uVar11);
- if ((bool)uVar11) {
- TReadScriptFile::readSymbol((TReadScriptFile *)(Ident + 0x1c),'(');
- iVar9 = TReadScriptFile::readNumber((TReadScriptFile *)(Ident + 0x1c));
- this->MinCount = iVar9;
- pTVar1 = (TReadScriptFile *)(Ident + 0x1c);
- TReadScriptFile::readSymbol(pTVar1,',');
- iVar9 = TReadScriptFile::readNumber(pTVar1);
- this->MaxCount = iVar9;
- pcVar4 = (char *)0x29;
- TReadScriptFile::readSymbol(pTVar1,')');
- if (this->MaxCount < this->MinCount) {
- pcVar4 = "mincount greater than maxcount";
- TReadScriptFile::error(pTVar1,"mincount greater than maxcount");
- }
- uVar11 = this->MinCount == 0;
- if ((this->MinCount < 0) || (uVar11 = this->MaxCount == 0, this->MaxCount < 1)) {
- pcVar4 = "illegal number of monsters";
- TReadScriptFile::error
- ((TReadScriptFile *)(Ident + 0x1c),"illegal number of monsters");
- }
- }
- iVar9 = 7;
- pcVar5 = local_401c;
- pcVar10 = "radius";
- do {
- if (iVar9 == 0) break;
- iVar9 = iVar9 + -1;
- uVar11 = *pcVar5 == *pcVar10;
- pcVar5 = pcVar5 + 1;
- pcVar10 = pcVar10 + 1;
- } while ((bool)uVar11);
- if ((bool)uVar11) {
- iVar9 = TReadScriptFile::readNumber((TReadScriptFile *)(Ident + 0x1c));
- this->Radius = iVar9;
- }
- iVar9 = 9;
- pcVar5 = local_401c;
- pcVar10 = "lifetime";
- do {
- if (iVar9 == 0) break;
- iVar9 = iVar9 + -1;
- uVar11 = *pcVar5 == *pcVar10;
- pcVar5 = pcVar5 + 1;
- pcVar10 = pcVar10 + 1;
- } while ((bool)uVar11);
- if ((bool)uVar11) {
- iVar9 = TReadScriptFile::readNumber((TReadScriptFile *)(Ident + 0x1c));
- this->Lifetime = iVar9;
- }
- iVar9 = 8;
- pcVar5 = local_401c;
- pcVar10 = "message";
- do {
- if (iVar9 == 0) break;
- iVar9 = iVar9 + -1;
- uVar11 = *pcVar5 == *pcVar10;
- pcVar5 = pcVar5 + 1;
- pcVar10 = pcVar10 + 1;
- } while ((bool)uVar11);
- if ((bool)uVar11) {
- pcVar5 = TReadScriptFile::readString((TReadScriptFile *)(Ident + 0x1c));
- uVar6 = AddDynamicString(pcVar5);
- this->Message = uVar6;
- }
- iVar9 = 10;
- pcVar5 = local_401c;
- pcVar10 = "inventory";
- do {
- if (iVar9 == 0) break;
- iVar9 = iVar9 + -1;
- uVar11 = *pcVar5 == *pcVar10;
- pcVar5 = pcVar5 + 1;
- pcVar10 = pcVar10 + 1;
- } while ((bool)uVar11);
- if ((bool)uVar11) {
- TReadScriptFile::readSymbol((TReadScriptFile *)(Ident + 0x1c),'{');
- do {
- TReadScriptFile::readSymbol((TReadScriptFile *)(Ident + 0x1c),'(');
- iVar9 = this->ExtraItems + 1;
- this->ExtraItems = iVar9;
- this_00 = vector<TItemData>::operator()(&this->ExtraItem,iVar9);
- iVar9 = TReadScriptFile::readNumber((TReadScriptFile *)(Ident + 0x1c));
- ObjectType::setTypeID((ObjectType *)&AttackWave,iVar9);
- ObjectType::setTypeID(&this_00->Type,(int)AttackWave);
- ObjectType::setTypeID(local_402c,(this_00->Type).TypeID);
- TReadScriptFile::readSymbol((TReadScriptFile *)(Ident + 0x1c),',');
- iVar9 = TReadScriptFile::readNumber((TReadScriptFile *)(Ident + 0x1c));
- this_00->Maximum = iVar9;
- TReadScriptFile::readSymbol((TReadScriptFile *)(Ident + 0x1c),',');
- iVar9 = TReadScriptFile::readNumber((TReadScriptFile *)(Ident + 0x1c));
- this_00->Probability = iVar9;
- pcVar4 = (char *)0x29;
- TReadScriptFile::readSymbol((TReadScriptFile *)(Ident + 0x1c),')');
- cVar3 = TReadScriptFile::readSpecial((TReadScriptFile *)(Ident + 0x1c));
- } while (cVar3 != '}');
- }
- }
- if (this->x == 0) {
- pcVar4 = "position expected";
- TReadScriptFile::error((TReadScriptFile *)(Ident + 0x1c),"position expected");
- }
- if (this->Race == -1) {
- pcVar4 = "race expected";
- TReadScriptFile::error((TReadScriptFile *)(Ident + 0x1c),"race expected");
- }
- if (this->MaxCount == 0) {
- pcVar4 = "count expected";
- TReadScriptFile::error((TReadScriptFile *)(Ident + 0x1c),"count expected");
- }
- if (Start < 0) {
- iVar9 = iVar8 + this->Lifetime;
- if (this->Lifetime == 0) {
- iVar9 = iVar8 + 0xe10;
- }
- if (*Duration < iVar9) {
- *Duration = iVar9;
- }
- if (this != (TAttackWave *)0x0) {
- TAttackWave::~TAttackWave(this,(int)pcVar4);
- operator_delete(this);
- }
- }
- else {
- pcVar4 = (char *)(Start + iVar8);
- priority_queue<>::insert(&AttackWaveQueue);
- }
- } while( true );
-}
-
-
-
-// WARNING: Unknown calling convention -- yet parameter storage is locked
-
-void LoadMonsterRaids(void)
-
-{
- char *__s;
- dirent *DirEntry;
- time_t tVar1;
- DIR *__dirp;
- dirent *pdVar2;
- size_t sVar3;
- long lVar4;
- undefined4 *puVar5;
- int iVar6;
- char *s;
- int iVar7;
- char *pcVar8;
- byte *pbVar9;
- bool bVar10;
- bool bVar11;
- int BigRaidDuration;
- int TieBreaker;
- DIR *WorkDir;
- time_t Now;
- int iStack_2030;
- bool BigRaid;
- int Date;
- int Interval;
- int Duration;
- int Hour;
- int Minute;
- char FileName [4096];
- char BigRaidName [4096];
-
- tVar1 = time((time_t *)0x0);
- // try { // try from 080a4681 to 080a4a1b has its CatchHandler @ 080a4a20
- GetRealTime(&Duration,&Hour);
- iVar7 = (((RebootTime - (Hour + Duration * 0x3c)) + 0x5a0) % 0x5a0) * 0x3c;
- __dirp = opendir(MONSTERPATH);
- if (__dirp == (DIR *)0x0) {
- error("LoadMonsterRaids: Unterverzeichnis %s nicht gefunden.\n",MONSTERPATH);
- puVar5 = (undefined4 *)__cxa_allocate_exception(4);
- *puVar5 = "Cannot load monster raids";
- // WARNING: Subroutine does not return
- __cxa_throw(puVar5,char_const*::typeinfo,0);
- }
- FileName[0xffc] = '\0';
- BigRaidDuration = -1;
- do {
- do {
- pdVar2 = readdir(__dirp);
- if (pdVar2 == (dirent *)0x0) {
- closedir(__dirp);
- if (FileName[0xffc] != '\0') {
- lVar4 = random();
- LoadMonsterRaid(FileName + 0xffc,lVar4 + RoundNr,(bool *)0x0,(int *)0x0,
- (int *)0x0,(int *)0x0);
- }
- return;
- }
- __s = pdVar2->d_name;
- sVar3 = strlen(__s);
- bVar10 = sVar3 < 4;
- bVar11 = sVar3 == 4;
- } while (sVar3 < 5);
- iVar6 = 4;
- pcVar8 = __s + (sVar3 - 4);
- pbVar9 = &DAT_080fe05c;
- do {
- if (iVar6 == 0) break;
- iVar6 = iVar6 + -1;
- bVar10 = (byte)*pcVar8 < *pbVar9;
- bVar11 = *pcVar8 == *pbVar9;
- pcVar8 = pcVar8 + 1;
- pbVar9 = pbVar9 + 1;
- } while (bVar11);
- if ((!bVar10 && !bVar11) == bVar10) {
- sprintf((char *)&Minute,"%s/%s",MONSTERPATH,__s);
- LoadMonsterRaid((char *)&Minute,-1,(bool *)((int)&Now + 3),&stack0xffffdfd0,&Date,
- &Interval);
- print();
- if (0 < iStack_2030) {
- bVar10 = false;
- if ((tVar1 <= iStack_2030) && (bVar10 = true, tVar1 + iVar7 < iStack_2030)) {
- bVar10 = false;
- }
- if ((bVar10) &&
- (LoadMonsterRaid((char *)&Minute,(iStack_2030 + RoundNr) - tVar1,(bool *)0x0,
- (int *)0x0,(int *)0x0,(int *)0x0), Now._3_1_ != '\0')) {
- FileName[0xffc] = '\0';
- BigRaidDuration = 100;
- }
- }
- if (((iStack_2030 == 0) && (Interval <= iVar7)) && (lVar4 = random(), lVar4 < iVar7)) {
- if (Now._3_1_ == '\0') {
- lVar4 = random();
- LoadMonsterRaid((char *)&Minute,lVar4 + RoundNr,(bool *)0x0,(int *)0x0,
- (int *)0x0,(int *)0x0);
- }
- else {
- lVar4 = random();
- if (BigRaidDuration < lVar4) {
- strcpy(FileName + 0xffc,(char *)&Minute);
- BigRaidDuration = lVar4;
- }
- }
- }
- }
- } while( true );
-}
-
-
-
-// WARNING: Unknown calling convention -- yet parameter storage is locked
-
-void ProcessMonsterRaids(void)
-
-{
- ulong uVar1;
- undefined4 uVar2;
- int iVar3;
- TAttackWave *pTVar4;
- int iVar5;
- ulong *puVar6;
- bool bVar7;
- long lVar8;
- long lVar9;
- TItemData *pTVar10;
- TCreature *pTVar11;
- char *pcVar12;
- priority_queue_entry<> *ppVar13;
- int Count;
- TAttackWave *AttackWave;
- ulong *puVar14;
- int i;
- int i_1;
- int iVar15;
- undefined1 local_cc [36];
- int local_a8;
- int j;
- int Repeat;
- int Amount;
- TCreature *cr;
- int Monsters;
- TCreature___0_ *Monster;
- uint local_8c;
- ulong ExecutionRound;
- int posx;
- int posy;
- int posz;
- Object Obj;
- ulong local_6c [4];
- ulong local_5c [4];
- ulong local_4c [4];
- ulong local_3c [4];
- ulong local_2c;
- Object Bag;
-
- puVar6 = (ulong *)local_cc;
- do {
- puVar14 = puVar6;
- if (AttackWaveQueue.Entries == 0) {
- return;
- }
- puVar14[1] = 1;
- *puVar14 = (ulong)AttackWaveQueue.Entry;
- puVar14[-1] = 0x80a5040;
- ppVar13 = vector<>::operator()((vector<> *)*puVar14,puVar14[1]);
- local_8c = ppVar13->Key;
- puVar14[1] = 1;
- *puVar14 = (ulong)AttackWaveQueue.Entry;
- puVar14[-1] = 0x80a505d;
- ppVar13 = vector<>::operator()((vector<> *)*puVar14,puVar14[1]);
- pTVar4 = ppVar13->Data;
- if (RoundNr < local_8c) {
- return;
- }
- Monster = (TCreature___0_ *)puVar14;
- *puVar14 = (ulong)&AttackWaveQueue;
- puVar14[-1] = 0x80a4a87;
- priority_queue<>::deleteMin((priority_queue<> *)*puVar14);
- uVar1 = pTVar4->Race;
- *puVar14 = 2;
- puVar14[1] = (ulong)"Angriff von Monstern der Rasse %d.\n";
- puVar14[2] = uVar1;
- puVar14[-1] = 0x80a4aa2;
- print();
- if (pTVar4->Message != 0) {
- *puVar14 = pTVar4->Message;
- puVar14[-1] = 0x80a5006;
- pcVar12 = GetDynamicString(*puVar14);
- *puVar14 = 0x13;
- puVar14[2] = (ulong)pcVar12;
- puVar14[1] = (ulong)&DAT_08102a6c;
- puVar14[-1] = 0x80a501e;
- BroadcastMessage(*puVar14,(char *)puVar14[1]);
- }
- puVar14[1] = pTVar4->MaxCount;
- *puVar14 = pTVar4->MinCount;
- puVar14[-1] = 0x80a4abf;
- lVar8 = random();
- cr = (TCreature *)0x0;
- iVar5 = -(lVar8 * 4 + 0xfU & 0xfffffff0);
- Monsters = (int)puVar14 + iVar5 + 0x1c;
- if (0 < lVar8) {
- do {
- *(int *)((int)puVar14 + iVar5 + 4) = pTVar4->Spread;
- *(int *)((int)puVar14 + iVar5) = -pTVar4->Spread;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4b14;
- lVar9 = random();
- ExecutionRound = lVar9 + pTVar4->x;
- *(int *)((int)puVar14 + iVar5 + 4) = pTVar4->Spread;
- *(int *)((int)puVar14 + iVar5) = -pTVar4->Spread;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4b32;
- lVar9 = random();
- posx = lVar9 + pTVar4->y;
- posy = pTVar4->z;
- *(undefined4 *)((int)puVar14 + iVar5 + 0x14) = 0;
- *(undefined4 *)((int)puVar14 + iVar5 + 0x10) = 0;
- *(undefined4 *)((int)puVar14 + iVar5 + 0xc) = 1;
- *(int **)((int)puVar14 + iVar5 + 8) = &posy;
- *(int **)((int)puVar14 + iVar5 + 4) = &posx;
- *(ulong **)((int)puVar14 + iVar5) = &ExecutionRound;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4b6e;
- bVar7 = SearchFreeField(*(int **)((int)puVar14 + iVar5),
- *(int **)((int)puVar14 + iVar5 + 4),
- *(int **)((int)puVar14 + iVar5 + 8),
- *(int *)((int)puVar14 + iVar5 + 0xc),
- *(ushort *)((int)puVar14 + iVar5 + 0x10),
- *(bool *)((int)puVar14 + iVar5 + 0x14));
- if (bVar7) {
- *(int *)((int)puVar14 + iVar5 + 8) = posy;
- *(int *)((int)puVar14 + iVar5 + 4) = posx;
- *(ulong *)((int)puVar14 + iVar5) = ExecutionRound;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4f6c;
- bVar7 = IsProtectionZone();
- if (!bVar7) {
- *(undefined4 *)((int)puVar14 + iVar5 + 0x18) = 1;
- *(undefined4 *)((int)puVar14 + iVar5 + 0x14) = 0;
- *(undefined4 *)((int)puVar14 + iVar5 + 0x10) = 0;
- *(int *)((int)puVar14 + iVar5 + 0xc) = posy;
- *(int *)((int)puVar14 + iVar5 + 8) = posx;
- *(ulong *)((int)puVar14 + iVar5 + 4) = ExecutionRound;
- *(int *)((int)puVar14 + iVar5) = pTVar4->Race;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4faf;
- pTVar11 = CreateMonster(*(int *)((int)puVar14 + iVar5),
- *(int *)((int)puVar14 + iVar5 + 4),
- *(int *)((int)puVar14 + iVar5 + 8),
- *(int *)((int)puVar14 + iVar5 + 0xc),
- *(int *)((int)puVar14 + iVar5 + 0x10),
- *(ulong *)((int)puVar14 + iVar5 + 0x14),
- *(bool *)((int)puVar14 + iVar5 + 0x18));
- *(TCreature **)(Monsters + (int)cr * 4) = pTVar11;
- if (pTVar11 != (TCreature *)0x0) {
- if (pTVar4->Lifetime != 0) {
- pTVar11->LifeEndRound = pTVar4->Lifetime + RoundNr;
- }
- *(int *)(*(int *)(Monsters + (int)cr * 4) + 0x288) = pTVar4->Radius;
- cr = (TCreature *)((int)&cr->_vptr_TCreature + 1);
- }
- }
- }
- lVar8 = lVar8 + -1;
- } while (lVar8 != 0);
- }
- iVar15 = 1;
- if (0 < pTVar4->ExtraItems) {
- do {
- if ((int)cr < 1) break;
- *(int *)((int)puVar14 + iVar5 + 4) = iVar15;
- *(vector<TItemData> **)((int)puVar14 + iVar5) = &pTVar4->ExtraItem;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4b9c;
- pTVar10 = vector<TItemData>::operator()
- (*(vector<TItemData> **)((int)puVar14 + iVar5),
- *(int *)((int)puVar14 + iVar5 + 4));
- *(undefined4 *)((int)puVar14 + iVar5) = 0;
- *(undefined4 *)((int)puVar14 + iVar5 + 4) = 999;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4bb2;
- lVar8 = random();
- pTVar11 = cr;
- if (lVar8 <= pTVar10->Probability) {
- *(undefined4 *)((int)puVar14 + iVar5) = 0;
- *(undefined1 **)((int)puVar14 + iVar5 + 4) =
- (undefined1 *)((int)&pTVar11[-1].Connection + 3);
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4bff;
- lVar8 = random();
- Amount = *(int *)(Monsters + lVar8 * 4);
- *(undefined4 *)((int)puVar14 + iVar5 + 8) = 3;
- uVar2 = *(undefined4 *)(Amount + 0x208);
- *(ulong **)((int)puVar14 + iVar5) = &local_2c;
- *(undefined4 *)((int)puVar14 + iVar5 + 4) = uVar2;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4c31;
- GetBodyObject(*(ulong *)((int)puVar14 + iVar5),
- *(int *)((int)puVar14 + iVar5 + 4));
- local_3c[0] = NONE.ObjectID;
- if (local_2c == NONE.ObjectID) {
- *(undefined4 *)((int)puVar14 + iVar5 + 4) = 0xe;
- *(ulong **)((int)puVar14 + iVar5) = local_6c;
- // try { // try from 080a4c4f to 080a4c9d has its CatchHandler @ 080a506a
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4c54;
- GetSpecialObject(*(SPECIALMEANING *)((int)puVar14 + iVar5));
- *(undefined4 *)((int)puVar14 + iVar5 + 8) = 3;
- *(undefined4 *)((int)puVar14 + iVar5 + 4) = *(undefined4 *)(Amount + 0x208);
- *(int **)((int)puVar14 + iVar5) = &posz;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4c7a;
- GetBodyContainer(*(ulong *)((int)puVar14 + iVar5),
- *(int *)((int)puVar14 + iVar5 + 4));
- *(undefined4 *)((int)puVar14 + iVar5 + 0xc) = 0;
- *(ulong **)((int)puVar14 + iVar5 + 8) = local_6c;
- *(int **)((int)puVar14 + iVar5 + 4) = &posz;
- *(ulong **)((int)puVar14 + iVar5) = local_5c;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4c9e;
- Create(*(Object **)((int)puVar14 + iVar5),
- *(ObjectType **)((int)puVar14 + iVar5 + 4),
- *(ulong *)((int)puVar14 + iVar5 + 8));
- local_2c = local_5c[0];
- local_4c[0] = local_5c[0];
- }
- iVar3 = pTVar10->Maximum;
- *(undefined4 *)((int)puVar14 + iVar5) = 1;
- *(int *)((int)puVar14 + iVar5 + 4) = iVar3;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4cbd;
- Repeat = random();
- *(int *)((int)puVar14 + iVar5 + 0xc) = (pTVar10->Type).TypeID;
- iVar3 = Repeat;
- *(undefined4 *)((int)puVar14 + iVar5) = 2;
- *(char **)((int)puVar14 + iVar5 + 4) = "Verteile %d Objekte vom Typ %d.\n";
- *(int *)((int)puVar14 + iVar5 + 8) = iVar3;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4ce7;
- print();
- j = 1;
- *(undefined4 *)((int)puVar14 + iVar5 + 4) = 6;
- *(TItemData **)((int)puVar14 + iVar5) = pTVar10;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4d02;
- bVar7 = ObjectType::getFlag(*(ObjectType **)((int)puVar14 + iVar5),
- *(FLAG *)((int)puVar14 + iVar5 + 4));
- iVar3 = Repeat;
- if (!bVar7) {
- Repeat = 0;
- j = iVar3;
- }
- local_a8 = 0;
- if (0 < j) {
- do {
- posz = 0;
- *(undefined4 *)((int)puVar14 + iVar5 + 4) = 0x37;
- *(TItemData **)((int)puVar14 + iVar5) = pTVar10;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4d4b;
- bVar7 = ObjectType::getFlag(*(ObjectType **)((int)puVar14 + iVar5),
- *(FLAG *)((int)puVar14 + iVar5 + 4));
- if (bVar7) {
-LAB_080a4d67:
- iVar3 = (pTVar10->Type).TypeID;
- *(ulong **)((int)puVar14 + iVar5) = local_4c;
- *(int *)((int)puVar14 + iVar5 + 4) = iVar3;
- // try { // try from 080a4d73 to 080a4d9e has its CatchHandler @ 080a50b2
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4d78;
- ObjectType::setTypeID
- (*(ObjectType **)((int)puVar14 + iVar5),
- *(int *)((int)puVar14 + iVar5 + 4));
- local_3c[0] = local_2c;
- *(undefined4 *)((int)puVar14 + iVar5 + 0xc) = 0;
- *(ulong **)((int)puVar14 + iVar5 + 8) = local_4c;
- *(ulong **)((int)puVar14 + iVar5 + 4) = local_3c;
- *(ulong **)((int)puVar14 + iVar5) = local_5c;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4d9f;
- Create(*(Object **)((int)puVar14 + iVar5),
- *(ObjectType **)((int)puVar14 + iVar5 + 4),
- *(ulong *)((int)puVar14 + iVar5 + 8));
- }
- else {
- *(undefined4 *)((int)puVar14 + iVar5 + 4) = 0x38;
- *(TItemData **)((int)puVar14 + iVar5) = pTVar10;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4d5f;
- bVar7 = ObjectType::getFlag(*(ObjectType **)((int)puVar14 + iVar5),
- *(FLAG *)((int)puVar14 + iVar5 + 4));
- if (bVar7) goto LAB_080a4d67;
- *(undefined4 *)((int)puVar14 + iVar5 + 4) = 0x39;
- *(TItemData **)((int)puVar14 + iVar5) = pTVar10;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4e88;
- bVar7 = ObjectType::getFlag(*(ObjectType **)((int)puVar14 + iVar5),
- *(FLAG *)((int)puVar14 + iVar5 + 4));
- if (bVar7) goto LAB_080a4d67;
- *(undefined4 *)((int)puVar14 + iVar5 + 4) = 0x3a;
- *(TItemData **)((int)puVar14 + iVar5) = pTVar10;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4ea0;
- bVar7 = ObjectType::getFlag(*(ObjectType **)((int)puVar14 + iVar5),
- *(FLAG *)((int)puVar14 + iVar5 + 4));
- if (bVar7) goto LAB_080a4d67;
- *(undefined4 *)((int)puVar14 + iVar5 + 4) = 0x3b;
- *(TItemData **)((int)puVar14 + iVar5) = pTVar10;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4eb8;
- bVar7 = ObjectType::getFlag(*(ObjectType **)((int)puVar14 + iVar5),
- *(FLAG *)((int)puVar14 + iVar5 + 4));
- if (bVar7) goto LAB_080a4d67;
- *(undefined4 *)((int)puVar14 + iVar5 + 4) = 0x36;
- *(TItemData **)((int)puVar14 + iVar5) = pTVar10;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4ed0;
- bVar7 = ObjectType::getFlag(*(ObjectType **)((int)puVar14 + iVar5),
- *(FLAG *)((int)puVar14 + iVar5 + 4));
- if (bVar7) goto LAB_080a4d67;
- *(undefined4 *)((int)puVar14 + iVar5 + 4) = 0x34;
- *(TItemData **)((int)puVar14 + iVar5) = pTVar10;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4ee8;
- bVar7 = ObjectType::getFlag(*(ObjectType **)((int)puVar14 + iVar5),
- *(FLAG *)((int)puVar14 + iVar5 + 4));
- if (bVar7) goto LAB_080a4d67;
- *(undefined4 *)((int)puVar14 + iVar5 + 4) = 0x35;
- *(TItemData **)((int)puVar14 + iVar5) = pTVar10;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4f00;
- bVar7 = ObjectType::getFlag(*(ObjectType **)((int)puVar14 + iVar5),
- *(FLAG *)((int)puVar14 + iVar5 + 4));
- if (bVar7) goto LAB_080a4d67;
- iVar3 = (pTVar10->Type).TypeID;
- *(ulong **)((int)puVar14 + iVar5) = local_4c;
- *(int *)((int)puVar14 + iVar5 + 4) = iVar3;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4f19;
- ObjectType::setTypeID
- (*(ObjectType **)((int)puVar14 + iVar5),
- *(int *)((int)puVar14 + iVar5 + 4));
- iVar3 = Repeat;
- *(ulong **)((int)puVar14 + iVar5 + 8) = local_4c;
- *(int *)((int)puVar14 + iVar5 + 0xc) = iVar3;
- *(undefined4 *)((int)puVar14 + iVar5 + 4) =
- *(undefined4 *)(Amount + 0x208);
- *(ulong **)((int)puVar14 + iVar5) = local_5c;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4f45;
- CreateAtCreature(*(ulong *)((int)puVar14 + iVar5),
- *(ObjectType **)((int)puVar14 + iVar5 + 4),
- *(ulong *)((int)puVar14 + iVar5 + 8));
- }
- posz = local_5c[0];
- local_6c[0] = local_5c[0];
- *(int **)((int)puVar14 + iVar5 + 4) = &posz;
- *(ulong **)((int)puVar14 + iVar5) = local_6c;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4dbd;
- Object::getContainer(*(Object **)((int)puVar14 + iVar5));
- *(ulong **)((int)puVar14 + iVar5 + 4) = local_6c;
- *(ulong **)((int)puVar14 + iVar5) = local_5c;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4dd2;
- Object::getObjectType(*(Object **)((int)puVar14 + iVar5));
- if (local_5c[0] == 0) {
- uVar2 = *(undefined4 *)(Amount + 0x280);
- *(undefined **)((int)puVar14 + iVar5) = &DAT_081025a0;
- *(undefined4 *)((int)puVar14 + iVar5 + 4) = uVar2;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4e5a;
- error(*(char **)((int)puVar14 + iVar5));
- local_5c[0] = posz;
- *(undefined4 *)((int)puVar14 + iVar5 + 4) = 0xffffffff;
- *(ulong **)((int)puVar14 + iVar5) = local_5c;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4e73;
- Delete(*(Object **)((int)puVar14 + iVar5),
- *(int *)((int)puVar14 + iVar5 + 4));
- }
- local_a8 = local_a8 + 1;
- } while (local_a8 < j);
- }
- local_6c[0] = local_2c;
- *(ulong **)((int)puVar14 + iVar5 + 4) = local_6c;
- *(int **)((int)puVar14 + iVar5) = &posz;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4e0c;
- GetFirstContainerObject(*(Object **)((int)puVar14 + iVar5));
- local_5c[0] = NONE.ObjectID;
- if (posz == NONE.ObjectID) {
- local_4c[0] = local_2c;
- *(undefined4 *)((int)puVar14 + iVar5 + 4) = 0xffffffff;
- *(ulong **)((int)puVar14 + iVar5) = local_4c;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4e39;
- Delete(*(Object **)((int)puVar14 + iVar5),*(int *)((int)puVar14 + iVar5 + 4)
- );
- }
- }
- iVar15 = iVar15 + 1;
- } while (iVar15 <= pTVar4->ExtraItems);
- }
- puVar6 = (ulong *)Monster;
- if (pTVar4 != (TAttackWave *)0x0) {
- *(TAttackWave **)((int)puVar14 + iVar5) = pTVar4;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4bde;
- TAttackWave::~TAttackWave
- (*(TAttackWave **)((int)puVar14 + iVar5),*(int *)((int)puVar14 + iVar5 + 4));
- *(TAttackWave **)((int)puVar14 + iVar5) = pTVar4;
- *(undefined4 *)((int)puVar14 + iVar5 + -4) = 0x80a4be6;
- operator_delete(*(void **)((int)puVar14 + iVar5));
- puVar6 = (ulong *)Monster;
- }
- } while( true );
-}
-
void __tcf_0(void *param_1)
{
diff --git a/reference/types.hh b/reference/types.hh index c711831..f3ce69d 100644 --- a/reference/types.hh +++ b/reference/types.hh @@ -89,21 +89,6 @@ struct TWaitinglistEntry { bool Sleeping; }; -struct TAttackWave { - int x; - int y; - int z; - int Spread; - int Race; - int MinCount; - int MaxCount; - int Radius; - int Lifetime; - ulong Message; - int ExtraItems; - struct vector<TItemData> ExtraItem; -}; - struct TReportedStatement { ulong StatementID; ulong TimeStamp; |
