Skip to content

Commit 2db61ab

Browse files
committed
Fix
1 parent 4b36b17 commit 2db61ab

1 file changed

Lines changed: 22 additions & 22 deletions

File tree

GolDP/src/zoweeblubberworth0xf0.cpp

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ void ZoweeBlubberworth0xf0::FUN_1002cfa0(GolFileParser& p_parser)
501501
item->m_unk0x00[0] = '\0';
502502
}
503503
else {
504-
::strncpy(item->m_unk0x00, p_parser.GetUnk0x44(), sizeof(item->m_unk0x00));
504+
::strncpy(item->m_unk0x00, p_parser.GetLastString(), sizeof(item->m_unk0x00));
505505
}
506506
p_parser.ReadLeftCurly();
507507
LegoU32 cnt = 0;
@@ -523,37 +523,37 @@ void ZoweeBlubberworth0xf0::FUN_1002cfa0(GolFileParser& p_parser)
523523
if (static_cast<LegoU32>(p_parser.ReadInteger()) >= m_unk0x24 && m_unk0x24 != 0) {
524524
p_parser.HandleUnexpectedToken(GolFileParser::e_invalidValue);
525525
}
526-
item->m_unk0x08[cnt] = p_parser.GetUnk0x38();
526+
item->m_unk0x08[cnt] = p_parser.GetLastInt();
527527
if (static_cast<LegoU32>(p_parser.ReadInteger()) >= m_unk0x34 && m_unk0x34 != 0) {
528528
p_parser.HandleUnexpectedToken(GolFileParser::e_invalidValue);
529529
}
530-
item->m_unk0x14[cnt] = p_parser.GetUnk0x38();
530+
item->m_unk0x14[cnt] = p_parser.GetLastInt();
531531
if (static_cast<LegoU32>(p_parser.ReadInteger()) >= m_unk0x1c && m_unk0x1c != 0) {
532532
p_parser.HandleUnexpectedToken(GolFileParser::e_invalidValue);
533533
}
534-
item->m_unk0x20[cnt] = p_parser.GetUnk0x38();
534+
item->m_unk0x20[cnt] = p_parser.GetLastInt();
535535
if (p_parser.ReadFloat() < 0.0f) {
536536
item->m_unk0x38[cnt] = g_fltMax0x100576e4;
537537
}
538538
else {
539-
item->m_unk0x38[cnt] = p_parser.GetUnk0x40();
539+
item->m_unk0x38[cnt] = p_parser.GetLastFloat();
540540
}
541541
cnt += 1;
542542
break;
543543
case GolFileParser::e_unknown0x2c:
544544
if (static_cast<LegoU32>(p_parser.ReadInteger()) >= m_unk0x34 && m_unk0x34 != 0) {
545545
p_parser.HandleUnexpectedToken(GolFileParser::e_invalidValue);
546546
}
547-
item->m_unk0x14[cnt] = p_parser.GetUnk0x38();
547+
item->m_unk0x14[cnt] = p_parser.GetLastInt();
548548
if (static_cast<LegoU32>(p_parser.ReadInteger()) >= m_unk0x1c && m_unk0x1c != 0) {
549549
p_parser.HandleUnexpectedToken(GolFileParser::e_invalidValue);
550550
}
551-
item->m_unk0x20[cnt] = p_parser.GetUnk0x38();
551+
item->m_unk0x20[cnt] = p_parser.GetLastInt();
552552
if (p_parser.ReadFloat() < 0.0f) {
553553
item->m_unk0x38[cnt] = g_fltMax0x100576e4;
554554
}
555555
else {
556-
item->m_unk0x38[cnt] = p_parser.GetUnk0x40();
556+
item->m_unk0x38[cnt] = p_parser.GetLastFloat();
557557
}
558558
cnt += 1;
559559
break;
@@ -574,23 +574,23 @@ void ZoweeBlubberworth0xf0::FUN_1002cfa0(GolFileParser& p_parser)
574574
if (static_cast<LegoU32>(p_parser.ReadInteger()) >= m_unk0x2c && m_unk0x2c != 0) {
575575
p_parser.HandleUnexpectedToken(GolFileParser::e_invalidValue);
576576
}
577-
v = p_parser.GetUnk0x38();
577+
v = p_parser.GetLastInt();
578578
if (p_parser.ReadInteger() >= static_cast<LegoS32>(sizeOfArray(item->m_unk0x2c))) {
579579
p_parser.HandleUnexpectedToken(GolFileParser::e_invalidValue);
580580
}
581-
item->m_unk0x2c[p_parser.GetUnk0x38()] = v;
581+
item->m_unk0x2c[p_parser.GetLastInt()] = v;
582582
break;
583583
case GolFileParser::e_unknown0x35:
584584
token = p_parser.GetNextToken();
585585
if (token == GolFileParser::e_string) {
586586
item->m_unk0x44 = -1;
587-
::strncpy(item->m_unk0x48, p_parser.GetUnk0x44(), sizeof(item->m_unk0x48));
587+
::strncpy(item->m_unk0x48, p_parser.GetLastString(), sizeof(item->m_unk0x48));
588588
}
589589
else {
590590
if (token != GolFileParser::e_int) {
591591
p_parser.HandleUnexpectedToken(GolFileParser::e_int);
592592
}
593-
item->m_unk0x44 = p_parser.GetUnk0x38();
593+
item->m_unk0x44 = p_parser.GetLastInt();
594594
item->m_unk0x48[0] = '\0';
595595
}
596596
break;
@@ -646,7 +646,7 @@ void ZoweeBlubberworth0xf0::FUN_1002d400(GolFileParser& p_parser)
646646
item->m_unk0x00[0] = '\0';
647647
}
648648
else {
649-
::strncpy(item->m_unk0x00, p_parser.GetUnk0x44(), sizeof(item->m_unk0x00));
649+
::strncpy(item->m_unk0x00, p_parser.GetLastString(), sizeof(item->m_unk0x00));
650650
}
651651
p_parser.ReadLeftCurly();
652652
LegoU32 cnt = 0;
@@ -665,16 +665,16 @@ void ZoweeBlubberworth0xf0::FUN_1002d400(GolFileParser& p_parser)
665665
if (static_cast<LegoU32>(p_parser.ReadInteger()) >= m_unk0x24 && m_unk0x24 != 0) {
666666
p_parser.HandleUnexpectedToken(GolFileParser::e_invalidValue);
667667
}
668-
item->m_unk0x08[cnt] = p_parser.GetUnk0x38();
668+
item->m_unk0x08[cnt] = p_parser.GetLastInt();
669669
if (static_cast<LegoU32>(p_parser.ReadInteger()) >= m_unk0x3c && m_unk0x3c != 0) {
670670
p_parser.HandleUnexpectedToken(GolFileParser::e_invalidValue);
671671
}
672-
item->m_unk0x14[cnt] = p_parser.GetUnk0x38();
672+
item->m_unk0x14[cnt] = p_parser.GetLastInt();
673673
if (p_parser.ReadFloat() < 0.0f) {
674674
item->m_unk0x38[cnt] = g_fltMax0x100576e4;
675675
}
676676
else {
677-
item->m_unk0x38[cnt] = p_parser.GetUnk0x40();
677+
item->m_unk0x38[cnt] = p_parser.GetLastFloat();
678678
}
679679
cnt += 1;
680680
break;
@@ -695,11 +695,11 @@ void ZoweeBlubberworth0xf0::FUN_1002d400(GolFileParser& p_parser)
695695
if (static_cast<LegoU32>(p_parser.ReadInteger()) >= m_unk0x2c && m_unk0x2c != 0) {
696696
p_parser.HandleUnexpectedToken(GolFileParser::e_invalidValue);
697697
}
698-
v = p_parser.GetUnk0x38();
698+
v = p_parser.GetLastInt();
699699
if (p_parser.ReadInteger() >= static_cast<LegoS32>(sizeOfArray(item->m_unk0x2c))) {
700700
p_parser.HandleUnexpectedToken(GolFileParser::e_invalidValue);
701701
}
702-
item->m_unk0x2c[p_parser.GetUnk0x38()] = v;
702+
item->m_unk0x2c[p_parser.GetLastInt()] = v;
703703
break;
704704
case GolFileParser::e_unknown0x3e:
705705
FUN_1002dbe0(p_parser, &item->m_unk0x78, &item->m_unk0x7c);
@@ -747,7 +747,7 @@ void ZoweeBlubberworth0xf0::FUN_1002d720(GolFileParser& p_parser)
747747
item->m_unk0x00[0] = '\0';
748748
}
749749
else {
750-
::strncpy(item->m_unk0x00, p_parser.GetUnk0x44(), sizeof(item->m_unk0x00));
750+
::strncpy(item->m_unk0x00, p_parser.GetLastString(), sizeof(item->m_unk0x00));
751751
}
752752
p_parser.ReadLeftCurly();
753753
item->m_unk0x2c[0] = -1;
@@ -937,7 +937,7 @@ void ZoweeBlubberworth0xf0::FUN_1002dc80(GolFileParser& p_parser)
937937
item->m_unk0x00[0] = '\0';
938938
}
939939
else {
940-
::strncpy(item->m_unk0x00, p_parser.GetUnk0x44(), sizeof(item->m_unk0x00));
940+
::strncpy(item->m_unk0x00, p_parser.GetLastString(), sizeof(item->m_unk0x00));
941941
}
942942
p_parser.ReadLeftCurly();
943943
item->m_unk0x08 = -1;
@@ -961,13 +961,13 @@ void ZoweeBlubberworth0xf0::FUN_1002dc80(GolFileParser& p_parser)
961961
token = p_parser.GetNextToken();
962962
if (token == GolFileParser::e_string) {
963963
item->m_unk0x10 = -1;
964-
::strncpy(item->m_unk0x14, p_parser.GetUnk0x44(), sizeof(item->m_unk0x14));
964+
::strncpy(item->m_unk0x14, p_parser.GetLastString(), sizeof(item->m_unk0x14));
965965
}
966966
else {
967967
if (token != GolFileParser::e_int) {
968968
p_parser.HandleUnexpectedToken(GolFileParser::e_int);
969969
}
970-
item->m_unk0x10 = p_parser.GetUnk0x38();
970+
item->m_unk0x10 = p_parser.GetLastInt();
971971
item->m_unk0x14[0] = '\0';
972972
}
973973
break;

0 commit comments

Comments
 (0)