KINGDOM: Function renaming

This commit is contained in:
Strangerke 2017-07-08 11:28:34 +02:00 committed by Eugene Sandulenko
parent 2e925fb50c
commit 3aeb4fb80b
6 changed files with 772 additions and 772 deletions

File diff suppressed because it is too large Load Diff

View File

@ -31,22 +31,22 @@ void KingdomGame::GPLogic2() {
_nodeNum = 25;
DrawLocation();
DsAll();
dsAll();
if (_nodes[24] != 0 || highNode) {
_eye = true;
PlayMovie(72);
playMovie(72);
_aTimerFlag = false;
_aTimer = 114;
PlaySound(34);
playSound(34);
_userInput = 0;
_currMap = 10;
_statPlay = 251;
} else {
_frameStop = 67;
PlayMovie(72);
DsAll();
PlayMovie(73);
DsAll();
playMovie(72);
dsAll();
playMovie(73);
dsAll();
_statPlay = 991;
_loopFlag = true;
}
@ -56,8 +56,8 @@ void KingdomGame::GPLogic2() {
switch(_userInput) {
case 0x2F1:
_aTimer = 0;
PlayMovie(73);
DsAll();
playMovie(73);
dsAll();
_statPlay = 992;
_loopFlag = true;
break;
@ -76,8 +76,8 @@ void KingdomGame::GPLogic2() {
case 260:
_nodeNum = 26;
DrawLocation();
DsAll();
PlayMovie(74);
dsAll();
playMovie(74);
_currMap = 10;
SetATimer();
_statPlay = 261;
@ -87,33 +87,33 @@ void KingdomGame::GPLogic2() {
switch(_userInput) {
case 0x2F1:
_aTimer = 0;
DsAll();
PlayMovie(75);
dsAll();
playMovie(75);
_statPlay = 992;
_loopFlag = true;
break;
case 0x428:
InventoryDel(0);
_aTimer = 0;
SaveAS();
PlayMovie(178);
RestoreAS();
saveAS();
playMovie(178);
restoreAS();
SetATimer();
_userInput = 0;
break;
case 0x42A:
InventoryDel(2);
_aTimer = 0;
SaveAS();
PlayMovie(178);
RestoreAS();
saveAS();
playMovie(178);
restoreAS();
SetATimer();
_userInput = 0;
break;
case 0x42C:
_aTimer = 0;
EnAll();
PlayMovie(76);
enAll();
playMovie(76);
_nodes[26] = 1;
_userInput = 0;
_statPlay = 290;
@ -124,15 +124,15 @@ void KingdomGame::GPLogic2() {
case 0x42D:
if (Wound()) {
_aTimer = 0;
EnAll();
PlayMovie(77);
PlaySound(34);
enAll();
playMovie(77);
playSound(34);
InventoryDel(5);
_statPlay = 300;
_loopFlag = true;
} else {
DsAll();
PlayMovie(78);
dsAll();
playMovie(78);
_statPlay = 992;
_loopFlag = true;
}
@ -151,8 +151,8 @@ void KingdomGame::GPLogic2() {
_sound = false;
_nodes[28] = 1;
}
PlayMovie(80);
PlaySound(18);
playMovie(80);
playSound(18);
_currMap = 10;
_statPlay = 271;
_nodes[28] = 1;
@ -168,7 +168,7 @@ void KingdomGame::GPLogic2() {
break;
case 0x43E:
_sound = _lastSound;
PlayMovie(_pMovie);
playMovie(_pMovie);
break;
}
break;
@ -179,13 +179,13 @@ void KingdomGame::GPLogic2() {
_nodeNum = 28;
DrawLocation();
_userInput = 0;
DsAll();
dsAll();
_fstFwd = false;
PlayMovie(81);
playMovie(81);
_currMap = 10;
_nodes[29] = _nodes[39] = 1;
_statPlay = _robberyNode * 10;
EnAll();
enAll();
_loopFlag = true;
break;
case 290:
@ -200,7 +200,7 @@ void KingdomGame::GPLogic2() {
_nextNode = 29;
} else {
if (_nodes[26] == 2)
PlayMovie(79);
playMovie(79);
_nodeNum = 29;
if (_nodes[26] <= 2 || !ChkDesertObstacles()) {
DrawLocation();
@ -209,31 +209,31 @@ void KingdomGame::GPLogic2() {
switch (_nodes[30]) {
case 0:
_sound = false;
PlayMovie(82);
playMovie(82);
_currMap = 89;
_nodes[30] = 1;
break;
case 1:
_sound = true;
PlayMovie(82);
playMovie(82);
_currMap = 89;
_nodes[30] = 0;
break;
case 8:
_sound = false;
PlayMovie(85);
playMovie(85);
_currMap = 10;
_nodes[30] = 9;
_tsIconOnly = true;
break;
default:
_sound = true;
PlayMovie(85);
playMovie(85);
_currMap = 10;
_tsIconOnly = true;
break;
}
PlaySound(17);
playSound(17);
_statPlay = 291;
}
}
@ -243,8 +243,8 @@ void KingdomGame::GPLogic2() {
switch(_userInput) {
case 0x431:
_tsIconOnly = true;
PlayMovie(83);
PlaySound(30);
playMovie(83);
playSound(30);
InventoryAdd(10);
_nodes[30] = 8;
_userInput = 0;
@ -254,8 +254,8 @@ void KingdomGame::GPLogic2() {
if (_nodes[30] >= 8)
DisplayIcon(140);
else {
DsAll();
PlayMovie(84);
dsAll();
playMovie(84);
_statPlay = 992;
_loopFlag = true;
}
@ -268,7 +268,7 @@ void KingdomGame::GPLogic2() {
break;
case 0x43E:
_sound = _lastSound;
PlayMovie(_pMovie);
playMovie(_pMovie);
break;
}
break;
@ -283,8 +283,8 @@ void KingdomGame::GPLogic2() {
_nodeNum = 30;
if (!ChkDesertObstacles()) {
DrawLocation();
PlayMovie(86);
PlaySound(18);
playMovie(86);
playSound(18);
_currMap = 10;
_statPlay = 301;
}
@ -300,7 +300,7 @@ void KingdomGame::GPLogic2() {
break;
case 0x43E:
_sound = _lastSound;
PlayMovie(_pMovie);
playMovie(_pMovie);
break;
}
break;
@ -312,8 +312,8 @@ void KingdomGame::GPLogic2() {
_nodeNum = 31;
if (!ChkDesertObstacles()) {
DrawLocation();
PlayMovie(67);
PlaySound(18);
playMovie(67);
playSound(18);
_currMap = 90;
_statPlay = 311;
_nodes[32] = 1;
@ -331,12 +331,12 @@ void KingdomGame::GPLogic2() {
break;
case 0x43E:
_sound = _lastSound;
PlayMovie(_pMovie);
playMovie(_pMovie);
break;
case 0x449:
_aTimer = 0;
DsAll();
PlayMovie(68);
dsAll();
playMovie(68);
_statPlay = 992;
_loopFlag = true;
break;
@ -358,8 +358,8 @@ void KingdomGame::GPLogic2() {
_sound = true;
_nodes[33] = 1;
}
PlayMovie(87);
PlaySound(18);
playMovie(87);
playSound(18);
_currMap = 10;
_statPlay = 321;
break;
@ -373,7 +373,7 @@ void KingdomGame::GPLogic2() {
break;
case 0x43E:
_sound = _lastSound;
PlayMovie(_pMovie);
playMovie(_pMovie);
break;
}
break;
@ -390,8 +390,8 @@ void KingdomGame::GPLogic2() {
_sound = false;
else
_sound = true;
PlayMovie(88);
PlaySound(18);
playMovie(88);
playSound(18);
_currMap = 10;
_statPlay = 331;
}
@ -406,7 +406,7 @@ void KingdomGame::GPLogic2() {
break;
case 0x43E:
_sound = _lastSound;
PlayMovie(_pMovie);
playMovie(_pMovie);
break;
}
break;
@ -425,16 +425,16 @@ void KingdomGame::GPLogic2() {
DrawLocation();
_userInput = 0;
if (_nodes[35] == 9 || _nodes[41] == 0 || !_wizard) {
PlayMovie(91);
playMovie(91);
_currMap = 92;
} else {
PlayMovie(89);
ShowPic(389);
playMovie(89);
showPic(389);
_currMap = 91;
}
if (_nodes[35] == 9)
_tsIconOnly = true;
PlaySound(26);
playSound(26);
_statPlay = 341;
}
}
@ -445,7 +445,7 @@ void KingdomGame::GPLogic2() {
if (_nodes[35] == 9)
DisplayIcon(139);
else {
PlayMovie(90);
playMovie(90);
InventoryAdd(9);
_nodes[35] = 9;
_currMap = 93;
@ -459,9 +459,9 @@ void KingdomGame::GPLogic2() {
break;
case 0x43E:
_sound = _lastSound;
PlayMovie(_pMovie);
playMovie(_pMovie);
if (_pMovie == 89)
ShowPic(389);
showPic(389);
break;
case 0x445:
_statPlay = 410;
@ -489,8 +489,8 @@ void KingdomGame::GPLogic2() {
} else {
_nodeNum = 35;
DrawLocation();
DsAll();
PlayMovie(92);
dsAll();
playMovie(92);
_currMap = 94;
SetATimer();
_userInput = 0;
@ -503,21 +503,21 @@ void KingdomGame::GPLogic2() {
case 0x429:
InventoryDel(_userInput - 0x428);
_aTimer = 0;
PlayMovie(178);
playMovie(178);
_userInput = 0x2F1;
_loopFlag = true;
// No break on purpose
case 0x2F1:
_aTimer = 0;
DsAll();
PlayMovie(93);
dsAll();
playMovie(93);
_statPlay = 992;
_loopFlag = true;
break;
case 0x42A:
_aTimer = 0;
EnAll();
PlayMovie(179);
enAll();
playMovie(179);
InventoryDel(2);
_nodes[36] = 1;
_userInput = 0;
@ -536,8 +536,8 @@ void KingdomGame::GPLogic2() {
else
_sound = true;
_frameStop = 185;
DsAll();
PlayMovie(94);
dsAll();
playMovie(94);
_currMap = 95;
SetATimer();
_userInput = 0;
@ -547,17 +547,17 @@ void KingdomGame::GPLogic2() {
switch(_userInput) {
case 0x2F1:
_aTimer = 0;
DsAll();
PlayMovie(95);
dsAll();
playMovie(95);
_statPlay = 992;
_loopFlag = true;
break;
case 0x428:
_aTimer = 0;
EnAll();
PlayMovie(97);
enAll();
playMovie(97);
InventoryDel(0);
PlaySound(5);
playSound(5);
_nodes[37] = 1;
_userInput = 0;
_currMap = 10;
@ -572,10 +572,10 @@ void KingdomGame::GPLogic2() {
break;
case 0x42A:
_aTimer = 0;
EnAll();
PlayMovie(98);
enAll();
playMovie(98);
InventoryDel(2);
PlaySound(5);
playSound(5);
_nodes[37] = 1;
_userInput = 0;
_currMap = 10;
@ -583,10 +583,10 @@ void KingdomGame::GPLogic2() {
break;
case 0x42E:
_aTimer = 0;
EnAll();
PlayMovie(100);
enAll();
playMovie(100);
InventoryDel(6);
PlaySound(5);
playSound(5);
_nodes[37] = 1;
_userInput = 0;
_currMap = 10;
@ -594,9 +594,9 @@ void KingdomGame::GPLogic2() {
break;
case 0x431:
_aTimer = 0;
EnAll();
PlayMovie(96);
PlaySound(5);
enAll();
playMovie(96);
playSound(5);
_nodes[37] = 9;
_userInput = 0;
_currMap = 10;
@ -607,8 +607,8 @@ void KingdomGame::GPLogic2() {
break;
case 0x437:
_aTimer = 0;
DsAll();
PlayMovie(99);
dsAll();
playMovie(99);
_statPlay = 992;
_loopFlag = true;
break;
@ -620,7 +620,7 @@ void KingdomGame::GPLogic2() {
break;
case 0x43E:
_sound = _lastSound;
PlayMovie(_pMovie);
playMovie(_pMovie);
break;
}
break;
@ -632,8 +632,8 @@ void KingdomGame::GPLogic2() {
DrawLocation();
_userInput = 0;
_nodes[38] = 0;
PlayMovie(102);
PlaySound(20);
playMovie(102);
playSound(20);
_currMap = 109;
_statPlay = 371;
break;
@ -652,7 +652,7 @@ void KingdomGame::GPLogic2() {
break;
case 0x43E:
_sound = _lastSound;
PlayMovie(_pMovie);
playMovie(_pMovie);
break;
}
break;
@ -665,9 +665,9 @@ void KingdomGame::GPLogic2() {
if (!ChkDesertObstacles()) {
DrawLocation();
_userInput = 0;
PlayMovie(159);
playMovie(159);
_currMap = 10;
PlaySound(7);
playSound(7);
_nodes[39] = 1;
_statPlay = 381;
}
@ -679,23 +679,23 @@ void KingdomGame::GPLogic2() {
case 0x42A:
if (_wizard && _nodes[39] != 9) {
InventoryDel(_userInput - 0x428);
SaveAS();
PlayMovie(178);
RestoreAS();
saveAS();
playMovie(178);
restoreAS();
}
_userInput = 0;
break;
case 0x430:
if (_wizard && _nodes[39] != 9) {
DsAll();
PlayMovie(162);
dsAll();
playMovie(162);
_statPlay = 992;
_loopFlag = true;
}
break;
case 0x433:
if (_wizard && _nodes[39] != 9) {
PlayMovie(161);
playMovie(161);
InventoryDel(11);
_nodes[51] = 0;
_userInput = 0;
@ -704,7 +704,7 @@ void KingdomGame::GPLogic2() {
break;
case 0x435:
if (_wizard && _nodes[39] != 9) {
PlayMovie(160);
playMovie(160);
InventoryDel(13);
_nodes[39] = 9;
_nodes[59] = 0;
@ -715,7 +715,7 @@ void KingdomGame::GPLogic2() {
break;
case 0x437:
if (_wizard && _nodes[39] != 9) {
PlayMovie(163);
playMovie(163);
InventoryDel(15);
_nodes[12] = 0;
}
@ -729,7 +729,7 @@ void KingdomGame::GPLogic2() {
break;
case 0x43E:
_sound = _lastSound;
PlayMovie(_pMovie);
playMovie(_pMovie);
break;
case 0x456:
_statPlay = 370;
@ -748,9 +748,9 @@ void KingdomGame::GPLogic2() {
_nodeNum = 39;
DrawLocation();
_aTimer = 0;
DsAll();
PlayMovie(104);
PlaySound(34);
dsAll();
playMovie(104);
playSound(34);
_statPlay = 992;
_loopFlag = true;
break;
@ -766,8 +766,8 @@ void KingdomGame::GPLogic2() {
_sound = true;
}
} else {
DsAll();
PlayMovie(105);
dsAll();
playMovie(105);
_currMap = 10;
SetATimer();
}
@ -779,8 +779,8 @@ void KingdomGame::GPLogic2() {
switch(_userInput) {
case 0x2F1:
_aTimer = 0;
DsAll();
PlayMovie(106);
dsAll();
playMovie(106);
_statPlay = 992;
_loopFlag = true;
break;
@ -790,7 +790,7 @@ void KingdomGame::GPLogic2() {
if (!_nodes[41]) {
InventoryDel(_userInput - 0x428);
_aTimer = 0;
PlayMovie(178);
playMovie(178);
_userInput = 753;
_loopFlag = true;
_currMap = 10;
@ -799,8 +799,8 @@ void KingdomGame::GPLogic2() {
case 0x42C:
if (!_nodes[41]) {
_aTimer = 0;
DsAll();
PlayMovie(108);
dsAll();
playMovie(108);
_userInput = 0;
_statPlay = 992;
_loopFlag = true;
@ -809,7 +809,7 @@ void KingdomGame::GPLogic2() {
case 0x42E:
if (!_nodes[41]) {
_aTimer = 0;
PlayMovie(109);
playMovie(109);
InventoryDel(6);
_nodes[43] = 0;
_userInput = 0;
@ -823,8 +823,8 @@ void KingdomGame::GPLogic2() {
_replay = true;
_pouch = true;
_fstFwd = true;
PlayMovie(107);
PlaySound(26);
playMovie(107);
playSound(26);
_nodes[41] = 1;
_userInput = 0;
_currMap = 96;
@ -835,7 +835,7 @@ void KingdomGame::GPLogic2() {
case 0x43E:
_aTimer = 0;
_sound = _lastSound;
PlayMovie(_pMovie);
playMovie(_pMovie);
break;
case 0x441:
_statPlay = 460;
@ -857,8 +857,8 @@ void KingdomGame::GPLogic2() {
_sound = true;
_eye = false;
PlayMovie(111);
PlaySound(26);
playMovie(111);
playSound(26);
_currMap = 97;
_statPlay = 411;
break;
@ -867,18 +867,18 @@ void KingdomGame::GPLogic2() {
case 0x43E:
_sound = _lastSound;
if (_pMovie == 120) {
SaveAS();
saveAS();
_frameStop = 50;
PlayMovie(120);
playMovie(120);
_bTimer = 34;
while(_bTimer != 0) {
checkTimers();
RefreshSound();
CheckMainScreen();
}
RestoreAS();
restoreAS();
}
PlayMovie(_pMovie);
playMovie(_pMovie);
break;
case 0x445:
_userInput = 0;
@ -913,9 +913,9 @@ void KingdomGame::GPLogic2() {
case 0x429:
case 0x42A:
InventoryDel(_userInput - 0x428);
SaveAS();
PlayMovie(178);
RestoreAS();
saveAS();
playMovie(178);
restoreAS();
_userInput = 0;
break;
case 0x42E:
@ -927,7 +927,7 @@ void KingdomGame::GPLogic2() {
} else {
_sound = true;
}
PlayMovie(113);
playMovie(113);
InventoryAdd(6);
_nodes[43] = 9;
_currMap = 10;
@ -942,7 +942,7 @@ void KingdomGame::GPLogic2() {
break;
case 0x43E:
_sound = _lastSound;
PlayMovie(_pMovie);
playMovie(_pMovie);
break;
}
@ -957,18 +957,18 @@ void KingdomGame::GPLogic2() {
_userInput = 0;
if (_nodes[44] == 9) {
_tsIconOnly = true;
PlayMovie(118);
playMovie(118);
_currMap = 80;
} else if (_inventory[12] <= 0) {
PlayMovie(115);
ShowPic(415);
playMovie(115);
showPic(415);
_currMap = 78;
if (!_skylarTimer)
_skylarTimer = 5400;
} else {
_skylarTimer = 0;
PlayMovie(116);
PlaySound(25);
playMovie(116);
playSound(25);
InventoryDel(12);
InventoryAdd(16);
_nodes[44] = 9;
@ -976,13 +976,13 @@ void KingdomGame::GPLogic2() {
_tsIconOnly = true;
}
_statPlay = 431;
PlaySound(20);
playSound(20);
_eye = false;
break;
case 431:
switch(_userInput) {
case 0x40A:
PlayMovie(10);
playMovie(10);
_statPlay = 200;
if (_nodes[44] != 9)
_nodes[20] = 1;
@ -990,19 +990,19 @@ void KingdomGame::GPLogic2() {
_loopFlag = true;
break;
case 0x414:
PlayMovie(10);
playMovie(10);
_statPlay = 390;
_currMap = 10;
_loopFlag = true;
break;
case 0x41D:
PlayMovie(10);
playMovie(10);
_statPlay = 500;
_currMap = 10;
_loopFlag = true;
break;
case 0x422:
PlayMovie(10);
playMovie(10);
_statPlay = 380;
_currMap = 10;
_loopFlag = true;
@ -1012,17 +1012,17 @@ void KingdomGame::GPLogic2() {
case 0x42A:
if (_nodes[44] != 9) {
InventoryDel(_userInput - 0x428);
SaveAS();
PlayMovie(178);
RestoreAS();
saveAS();
playMovie(178);
restoreAS();
}
break;
case 0x438:
if (_nodes[44] == 9) {
DisplayIcon(146);
} else {
DsAll();
PlayMovie(117);
dsAll();
playMovie(117);
_statPlay = 992;
_loopFlag = true;
}
@ -1038,8 +1038,8 @@ void KingdomGame::GPLogic2() {
if (_inventory[12] > 0 || _nodes[44] == 9)
_sound = true;
PlayMovie(119);
PlaySound(20);
playMovie(119);
playSound(20);
_currMap = 100;
_statPlay = 441;
break;
@ -1053,7 +1053,7 @@ void KingdomGame::GPLogic2() {
break;
case 0x43E:
_sound = _lastSound;
PlayMovie(_pMovie);
playMovie(_pMovie);
break;
case 0x452:
_statPlay = 430;
@ -1069,15 +1069,15 @@ void KingdomGame::GPLogic2() {
_nodeNum = 45;
_userInput = 0;
if (!_nodes[41]) {
DsAll();
PlayMovie(120);
dsAll();
playMovie(120);
_statPlay = 992;
_currMap = 10;
_loopFlag = true;
} else {
_fstFwd = false;
_frameStop = 50;
PlayMovie(120);
playMovie(120);
_currMap = 17;
_statPlay = 451;
}
@ -1088,9 +1088,9 @@ void KingdomGame::GPLogic2() {
_sound = _lastSound;
_fstFwd = false;
_frameStop = 50;
PlayMovie(_pMovie);
playMovie(_pMovie);
_currMap = 17;
PlaySound(26);
playSound(26);
break;
case 0x441:
_statPlay = 410;
@ -1110,8 +1110,8 @@ void KingdomGame::GPLogic2() {
_nodes[47] = 0;
_sound = true;
}
PlayMovie(121);
PlaySound(26);
playMovie(121);
playSound(26);
_currMap = 107;
_statPlay = 461;
break;
@ -1119,7 +1119,7 @@ void KingdomGame::GPLogic2() {
switch(_userInput) {
case 0x43E:
_sound = _lastSound;
PlayMovie(_pMovie);
playMovie(_pMovie);
break;
case 0x445:
_statPlay = 340;
@ -1142,7 +1142,7 @@ void KingdomGame::GPLogic2() {
case 480:
_nodeNum = 48;
_userInput = 0;
PlayMovie(114);
playMovie(114);
_currMap = 10;
_statPlay = 481;
_nodes[49] = 1;
@ -1157,7 +1157,7 @@ void KingdomGame::GPLogic2() {
break;
case 0x43E:
_sound = _lastSound;
PlayMovie(_pMovie);
playMovie(_pMovie);
break;
}
break;
@ -1167,9 +1167,9 @@ void KingdomGame::GPLogic2() {
case 490:
_nodeNum = 49;
DrawLocation();
DsAll();
PlayMovie(180);
PlaySound(18);
dsAll();
playMovie(180);
playSound(18);
_currMap = 101;
_statPlay = 491;
_aTimer = 0;
@ -1182,13 +1182,13 @@ void KingdomGame::GPLogic2() {
case 0x42B:
InventoryDel(_userInput - 0x428);
_aTimer = 0;
PlayMovie(178);
playMovie(178);
_userInput = 753;
_loopFlag = true;
_currMap = 10;
break;
case 0x442:
PlayMovie(182);
playMovie(182);
_statPlay = 992;
_loopFlag = true;
break;
@ -1196,8 +1196,8 @@ void KingdomGame::GPLogic2() {
_currMap = 10;
_userInput = 0;
_aTimer = 0;
EnAll();
PlayMovie(181);
enAll();
playMovie(181);
_nodes[29] = 9;
_nodes[49] = 0;
_statPlay = _nextNode * 10;
@ -1209,9 +1209,9 @@ void KingdomGame::GPLogic2() {
}
void KingdomGame::GPLogic2_SubSP361() {
EnAll();
enAll();
_userInput = 0;
PlaySound(19);
playSound(19);
if (_nodes[29] == 1) {
_statPlay = 480;
_loopFlag = true;
@ -1224,12 +1224,12 @@ void KingdomGame::GPLogic2_SubSP361() {
_sound = true;
_nodes[43] = 2;
}
PlayMovie(122);
playMovie(122);
_currMap = 10;
_tsIconOnly = true;
_statPlay = 421;
} else {
PlayMovie(112);
playMovie(112);
_currMap = 98;
_statPlay = 421;
}

File diff suppressed because it is too large Load Diff

View File

@ -28,7 +28,7 @@ void KingdomGame::GPLogic4() {
switch(_statPlay) {
case 900:
if (_aTimer > 0) {
PlaySound(0);
playSound(0);
_aTimer = 133;
}
if (_asMode) {
@ -37,17 +37,17 @@ void KingdomGame::GPLogic4() {
_oldStatPlay--;
_asMode = false;
}
SaveAS();
saveAS();
fadeToBlack2();
if (_health == 10 || _health == 6 || _health == 2) {
ShowPic(121);
showPic(121);
_bTimer = 38;
ReadMouse();
readMouse();
while (_bTimer && !_mouseButton) {
checkTimers();
RefreshSound();
ReadMouse();
readMouse();
}
if (_aTimer > 0)
@ -60,7 +60,7 @@ void KingdomGame::GPLogic4() {
SetATimer();
_aTimer = 133;
}
ShowPic(120);
showPic(120);
_statPlay = 901;
}
break;
@ -70,20 +70,20 @@ void KingdomGame::GPLogic4() {
case 991:
_currMap = 10;
_userInput = 0;
PlaySound(0);
playSound(0);
if (_health == 10 || _health == 6 || _health == 2)
_health -= 2;
else
_health -= 4;
if (_health == 0) {
PlayMovie(194);
playMovie(194);
_noIFScreen = true;
FShowPic(107);
fShowPic(107);
_currMap = 3;
DsAll();
dsAll();
_pouch = false;
PlaySound(1);
playSound(1);
memset(_inventory, -1, 19);
_statPlay = 994;
} else {
@ -104,13 +104,13 @@ void KingdomGame::GPLogic4() {
DrawPic(179);
_skylarTimer = 0;
_skylarTimerFlag = false;
EnAll();
enAll();
_mapEx = true;
_nodeNum = 5;
DrawLocation();
PlaySound(0);
playSound(0);
if (_nodes[5] > 0) {
PlayMovie(197);
playMovie(197);
_resurrect = true;
}
InventoryDel(12);
@ -120,20 +120,20 @@ void KingdomGame::GPLogic4() {
case 992:
_currMap = 10;
_userInput = 0;
PlaySound(0);
playSound(0);
if (_health == 10 || _health == 6 || _health == 2)
_health -= 2;
else
_health -= 4;
if (_health == 0) {
PlayMovie(194);
playMovie(194);
_noIFScreen = true;
FShowPic(107);
fShowPic(107);
_currMap = 3;
DsAll();
dsAll();
_pouch = false;
PlaySound(1);
playSound(1);
memset(_inventory, -1, 19);
_statPlay = 994;
} else {
@ -154,13 +154,13 @@ void KingdomGame::GPLogic4() {
DrawPic(179);
_skylarTimer = 0;
_skylarTimerFlag = false;
EnAll();
enAll();
_mapEx = true;
_nodeNum = 27;
DrawLocation();
_resurrect = true;
PlaySound(0);
PlayMovie(195);
playSound(0);
playMovie(195);
InventoryDel(12);
_statPlay = 270;
}
@ -168,20 +168,20 @@ void KingdomGame::GPLogic4() {
case 993:
_currMap = 10;
_userInput = 0;
PlaySound(0);
playSound(0);
if (_health == 10 || _health == 6 || _health == 2)
_health -= 2;
else
_health -= 4;
if (_health == 0) {
PlayMovie(194);
playMovie(194);
_noIFScreen = true;
FShowPic(107);
fShowPic(107);
_currMap = 3;
DsAll();
dsAll();
_pouch = false;
PlaySound(1);
playSound(1);
memset(_inventory, -1, 19);
_statPlay = 994;
} else {
@ -204,13 +204,13 @@ void KingdomGame::GPLogic4() {
DrawPic(179);
_skylarTimer = 0;
_skylarTimerFlag = false;
EnAll();
enAll();
_mapEx = true;
_nodeNum = 52;
DrawLocation();
_resurrect = true;
PlaySound(0);
PlayMovie(196);
playSound(0);
playMovie(196);
InventoryDel(12);
_statPlay = 520;
}
@ -232,10 +232,10 @@ void KingdomGame::GPLogic4() {
}
void KingdomGame::GPLogic4_SP901() {
SetMouse();
setMouse();
EraseCursor();
fadeToBlack2();
ShowPic(106);
showPic(106);
DrawIcon(4, 0, 12 - _healthOld);
if (_tideCntl)
DrawPic(178);
@ -245,22 +245,22 @@ void KingdomGame::GPLogic4_SP901() {
_iconRedraw = true;
if (_userInput == 0x2F1) {
_asMode = false;
RestoreAS();
restoreAS();
_statPlay = _oldStatPlay;
_loopFlag = true;
} else {
if (_health == 10 || _health == 6 || _health == 2 || _userInput < 0x400 || _userInput > 0x427) {
_asMode = false;
RestoreAS();
restoreAS();
_statPlay = _oldStatPlay;
} else {
_statPlay = _mapExit[_userInput - 0x400];
_userInput = 0;
Wound();
PlayMovie(10);
playMovie(10);
InventoryDel(3);
_tsIconOnly = false;
EnAll();
enAll();
SwitchAS();
_mapStat = 0;
}

View File

@ -273,13 +273,13 @@ void KingdomGame::setupPics() {
}
void KingdomGame::initTools() {
InitMouse();
initMouse();
//CHECKME: InitTimers?
ShowPic(124);
InitCursor();
SetMouse();
showPic(124);
initCursor();
setMouse();
fadeToBlack2();
InitMPlayer();
initMPlayer();
}
void KingdomGame::titlePage() {
@ -291,11 +291,11 @@ void KingdomGame::titlePage() {
_noIFScreen = true;
_sound = false;
fadeToBlack2();
PlayMovie(200);
playMovie(200);
fadeToBlack2();
PlayMovie(206);
playMovie(206);
fadeToBlack2();
PlayMovie(198);
playMovie(198);
fadeToBlack2();
}
@ -338,7 +338,7 @@ void KingdomGame::initPlay() {
_treeRightSta = 1;
_tsIconOnly = false;
_lastObs = false;
EnAll();
enAll();
_pouch = true;
_noIFScreen = true;
_noMusic = false;
@ -360,11 +360,11 @@ void KingdomGame::fadeToBlack2() {
debug("STUB: FadeToBlack2");
}
void KingdomGame::GameHelp_Sub43C() {
void KingdomGame::gameHelp_Sub43C() {
fadeToBlack1();
_currMap = _asMap;
DrawRect(4, 17, 228, 161, 0);
RestoreAS();
drawRect(4, 17, 228, 161, 0);
restoreAS();
_userInput = 0;
_gameMode = 0;
_iconsClosed = false;
@ -377,12 +377,12 @@ void KingdomGame::GameHelp_Sub43C() {
void KingdomGame::gameHelp() {
if (!_gameMode) {
if (_userInput == 0x43C) {
SaveAS();
saveAS();
_asMap = _currMap;
_currMap = 0;
fadeToBlack1();
DrawRect(4, 17, 228, 161, 0);
DrawHelpScreen();
drawRect(4, 17, 228, 161, 0);
drawHelpScreen();
_gameMode = 1;
_oldTLS = _treeLeftSta;
_treeLeftSta = 0;
@ -395,7 +395,7 @@ void KingdomGame::gameHelp() {
_userInput = 0;
}
if (_userInput == 0x44F) {
SaveAS();
saveAS();
_asMap = _currMap;
_gameMode = 2;
_oldTLS = _treeLeftSta;
@ -407,8 +407,8 @@ void KingdomGame::gameHelp() {
_help = false;
_oldPouch = _pouch;
fadeToBlack1();
DrawRect(4, 17, 228, 161, 0);
DrawInventory();
drawRect(4, 17, 228, 161, 0);
drawInventory();
if (_nodes[68] == 1 || _nodes[29] == 1 || _itemInhibit)
_currMap = 10;
@ -427,35 +427,35 @@ void KingdomGame::gameHelp() {
//TODO: Set _quitFlag to 1
break;
case 0x241:
GameHelp_Sub43C();
gameHelp_Sub43C();
return;
break;
case 0x242:
if (_noMusic) {
_noMusic = false;
PlaySound(1);
playSound(1);
} else {
_noMusic = true;
PlaySound(0);
playSound(0);
}
DrawHelpScreen();
drawHelpScreen();
break;
case 0x243: {
fadeToBlack2();
_keyActive = false;
_noIFScreen = true;
PlaySound(0);
playSound(0);
int var = _pMovie;
while(!_keyActive) {
PlayMovie(54);
playMovie(54);
fadeToBlack2();
}
_pMovie = var;
_noIFScreen = false;
ShowPic(106);
DrawHelpScreen();
showPic(106);
drawHelpScreen();
_iconRedraw = true;
PlaySound(1);
playSound(1);
}
break;
case 0x244:
@ -465,14 +465,14 @@ void KingdomGame::gameHelp() {
case 0x245: {
fadeToBlack1();
int var = _pMovie;
DrawRect(4, 17, 228, 161, 0);
PlayMovie(205);
drawRect(4, 17, 228, 161, 0);
playMovie(205);
fadeToBlack1();
DrawRect(4, 17, 228, 161, 0);
PlayMovie(199);
drawRect(4, 17, 228, 161, 0);
playMovie(199);
fadeToBlack1();
DrawRect(4, 17, 228, 161, 0);
DrawHelpScreen();
drawRect(4, 17, 228, 161, 0);
drawHelpScreen();
_pMovie = var;
}
break;
@ -482,15 +482,15 @@ void KingdomGame::gameHelp() {
case 0x43B:
case 0x43C:
case 0x44F:
GameHelp_Sub43C();
gameHelp_Sub43C();
return;
}
if (_userInput > 0x427 && _userInput < 0x43A)
FShowPic(130 + _userInput - 0x428);
fShowPic(130 + _userInput - 0x428);
if (_userInput == 0x260) {
DrawInventory();
drawInventory();
if (_nodes[68] == 1 || _nodes[29] == 1)
_currMap = 10;
else
@ -501,7 +501,7 @@ void KingdomGame::gameHelp() {
}
void KingdomGame::LoadKingArt() {
LoadAResource(0x97);
loadAResource(0x97);
Common::SeekableReadStream *kingartStream = _rezPointers[0x97];
int val = kingartStream->readUint32LE();
int size = val / 4;
@ -526,7 +526,7 @@ void KingdomGame::LoadKingArt() {
delete[] kingartIdx;
}
void KingdomGame::LoadAResource(int reznum) {
void KingdomGame::loadAResource(int reznum) {
Common::String path = Common::String(_rezNames[reznum]);
path.toUppercase();
@ -545,17 +545,17 @@ void KingdomGame::LoadAResource(int reznum) {
}
}
void KingdomGame::ReleaseAResource(int reznum) {
void KingdomGame::releaseAResource(int reznum) {
if (_rezSize[reznum]) {
delete _rezPointers[reznum];
_rezSize[reznum] = 0;
}
}
void KingdomGame::ShowPic(int reznum) {
void KingdomGame::showPic(int reznum) {
EraseCursor();
LoadAResource(reznum);
loadAResource(reznum);
Image::IFFDecoder decoder;
if (!decoder.loadStream(*_rezPointers[reznum]))
return;
@ -579,38 +579,38 @@ void KingdomGame::ShowPic(int reznum) {
g_system->unlockScreen();
g_system->updateScreen();
ReleaseAResource(reznum);
releaseAResource(reznum);
}
void KingdomGame::FShowPic(int reznum) {
void KingdomGame::fShowPic(int reznum) {
EraseCursor();
fadeToBlack1();
DrawRect(4, 17, 228, 161, 0);
ShowPic(reznum);
drawRect(4, 17, 228, 161, 0);
showPic(reznum);
}
void KingdomGame::InitCursor() {
InitMouse();
void KingdomGame::initCursor() {
initMouse();
SetCursor(0x19C / 4);
_cursorDrawn = false;
DrawCursor();
}
void KingdomGame::InitMouse() {
void KingdomGame::initMouse() {
// No implementation required
}
void KingdomGame::SetMouse() {
void KingdomGame::setMouse() {
g_system->warpMouse(272, 157);
_cursorX = 272;
_cursorY = 157;
}
void KingdomGame::InitMPlayer() {
void KingdomGame::initMPlayer() {
debug("STUB: InitMPlayer");
}
void KingdomGame::PlayMovie(int movieNum) {
void KingdomGame::playMovie(int movieNum) {
debug("STUB: PlayMovie");
if (movieNum == 1 || movieNum == 3 || movieNum == 54 || movieNum == 198 || movieNum == 200 || movieNum == 206)
@ -631,13 +631,13 @@ void KingdomGame::PlayMovie(int movieNum) {
_iconSel = _iconSelect;
_iconsClosed = true;
CheckMainScreen();
SetMouse();
setMouse();
_oldCursorX = _cursorX;
_oldCursorY = _cursorY;
}
_pMovie = movieNum;
ReadMouse();
readMouse();
_mouseButton = 0;
_keyActive = false;
const char *path = _movieNames[movieNum];
@ -671,7 +671,7 @@ void KingdomGame::PlayMovie(int movieNum) {
}
}
void KingdomGame::EnAll() {
void KingdomGame::enAll() {
_help = true;
_eye = true;
_replay = true;
@ -679,7 +679,7 @@ void KingdomGame::EnAll() {
_fstFwd = true;
}
void KingdomGame::DsAll() {
void KingdomGame::dsAll() {
_help = false;
_eye = false;
_replay = false;
@ -687,7 +687,7 @@ void KingdomGame::DsAll() {
_fstFwd = false;
}
void KingdomGame::SaveAS() {
void KingdomGame::saveAS() {
byte palette[256 * 3];
delete[] _asPtr;
_asPtr = new byte[224 * 146 + 768];
@ -708,7 +708,7 @@ void KingdomGame::SaveAS() {
g_system->updateScreen();
}
void KingdomGame::RestoreAS() {
void KingdomGame::restoreAS() {
byte palette[256 * 3];
for (uint i = 0; i < 768; i++)
palette[i] = _asPtr[224 * 146 + i];
@ -739,7 +739,7 @@ void KingdomGame::SwitchAS() {
_iconsClosed = _oldIconsClosed;
}
void KingdomGame::DrawHelpScreen() {
void KingdomGame::drawHelpScreen() {
int picNum;
switch(_health) {
@ -767,10 +767,10 @@ void KingdomGame::DrawHelpScreen() {
if (_noMusic)
picNum += 6;
ShowPic(picNum);
showPic(picNum);
}
void KingdomGame::DrawRect(uint minX, uint minY, uint maxX, uint maxY, int color) {
void KingdomGame::drawRect(uint minX, uint minY, uint maxX, uint maxY, int color) {
::Graphics::Surface *screen = g_system->lockScreen();
for (uint curX = minX; curX < maxX; curX++) {
for (uint curY = minY; curY < maxY; curY++) {
@ -782,8 +782,8 @@ void KingdomGame::DrawRect(uint minX, uint minY, uint maxX, uint maxY, int color
g_system->updateScreen();
}
void KingdomGame::DrawInventory() {
FShowPic(108);
void KingdomGame::drawInventory() {
fShowPic(108);
if (_nodes[29] == 1 || _nodes[68] == 1 || _itemInhibit)
return;
@ -925,7 +925,7 @@ Common::Error KingdomGame::loadGameState(int slot) {
delete[] _asPtr;
_asPtr = nullptr;
PlaySound(_soundNumber);
playSound(_soundNumber);
for (int i = 0; i < 7; i++)
_iconPic[i] = 89 + i;
@ -944,10 +944,10 @@ Common::Error KingdomGame::loadGameState(int slot) {
_treeEyePic = 0;
_treeHGUPic = 0;
_cursorDrawn = false;
ShowPic(106);
showPic(106);
_gameMode = 0;
_iconsClosed = false;
DrawRect(4, 17, 228, 161, 0);
drawRect(4, 17, 228, 161, 0);
_userInput = 0x43E;
_loopFlag = true;
@ -1067,14 +1067,14 @@ bool KingdomGame::readSavegameHeader(Common::InSaveFile *in, KingdomSavegameHead
return true;
}
void KingdomGame::PlaySound(int idx) {
void KingdomGame::playSound(int idx) {
if (idx > 43 || _soundNumber == idx)
return;
// Stop Sound
if (_mixer->isSoundHandleActive(_soundHandle)) {
_mixer->stopHandle(_soundHandle);
ReleaseAResource(idx);
releaseAResource(idx);
}
_soundNumber = idx;
@ -1083,7 +1083,7 @@ void KingdomGame::PlaySound(int idx) {
int realIdx = _soundNumber + 200; // Or +250, depending in the original on the sound card
debug("PlaySound %d : %s", idx, _rezNames[realIdx]);
LoadAResource(realIdx);
loadAResource(realIdx);
Common::SeekableReadStream *soundStream = _rezPointers[realIdx];
Audio::RewindableAudioStream *rewindableStream = Audio::makeRawStream(soundStream, 22050, Audio::FLAG_UNSIGNED | Audio::FLAG_LITTLE_ENDIAN, DisposeAfterUse::NO);
@ -1100,7 +1100,7 @@ void KingdomGame::EraseCursor() {
CursorMan.showMouse(false);
}
void KingdomGame::ReadMouse() {
void KingdomGame::readMouse() {
_mouseButton = 0;
Common::Event event;
@ -1157,7 +1157,7 @@ void KingdomGame::DrawLocation() {
if (_daelonCntr > 0)
_daelonCntr--;
PlaySound(0);
playSound(0);
_iconsClosed = true;
_tsIconOnly = false;
_aTimer = 0;
@ -1165,7 +1165,7 @@ void KingdomGame::DrawLocation() {
int emlValue = _emlTable[_nodeNum];
if (emlValue > 0)
EnAll();
enAll();
if (!_mapEx || !emlValue || _resurrect) {
if (_statPlay != 50)
@ -1173,8 +1173,8 @@ void KingdomGame::DrawLocation() {
_iconsClosed = false;
} else {
_mapEx = false;
SaveAS();
FShowPic(emlValue);
saveAS();
fShowPic(emlValue);
_bTimer = 16;
while(_bTimer) {
checkTimers();
@ -1182,7 +1182,7 @@ void KingdomGame::DrawLocation() {
CheckMainScreen();
}
fadeToBlack1();
DrawRect(4, 17, 228, 161, 0);
drawRect(4, 17, 228, 161, 0);
_iconsClosed = false;
_tsIconOnly = false;
}
@ -1192,7 +1192,7 @@ void KingdomGame::ProcessMap(int mapNum, int zoom) {
int var6 = _zoomTable[mapNum][zoom][0];
if (!_asMode)
SwitchAtoM();
FShowPic(var6);
fShowPic(var6);
_currMap = _zoomTable[mapNum][zoom][1];
if (zoom > 0)
@ -1260,7 +1260,7 @@ void KingdomGame::InventoryAdd(int item) {
void KingdomGame::DrawPic(int reznum) {
EraseCursor();
LoadAResource(reznum);
loadAResource(reznum);
Image::IFFDecoder decoder;
if (!decoder.loadStream(*_rezPointers[reznum]))
@ -1281,26 +1281,26 @@ void KingdomGame::DrawPic(int reznum) {
g_system->unlockScreen();
g_system->updateScreen();
ReleaseAResource(reznum);
releaseAResource(reznum);
}
void KingdomGame::DisplayIcon(int reznum) {
PlaySound(0);
PlaySound(30);
SaveAS();
FShowPic(reznum);
playSound(0);
playSound(30);
saveAS();
fShowPic(reznum);
_bTimer = 76;
ReadMouse();
readMouse();
while(_bTimer != 0 && _mouseButton == 0) {
checkTimers();
RefreshSound();
ReadMouse();
readMouse();
}
fadeToBlack1();
DrawRect(4, 17, 228, 161, 0);
RestoreAS();
drawRect(4, 17, 228, 161, 0);
restoreAS();
}
void KingdomGame::SetATimer() {
@ -1321,8 +1321,8 @@ void KingdomGame::SetATimer() {
if (_inventory[idx] > 0) {
_aTimerFlag = false;
_aTimer = _wizard ? 114 : 133;
PlaySound(0);
PlaySound(34);
playSound(0);
playSound(34);
break;
}
}
@ -1610,7 +1610,7 @@ bool KingdomGame::ChkDesertObstacles() {
void KingdomGame::SwitchAtoM() {
_asMode = true;
_asMap = _currMap;
SaveAS();
saveAS();
_iconSel = 9;
_oldTLS = _treeLeftSta;
_oldTRS = _treeRightSta;
@ -1627,8 +1627,8 @@ void KingdomGame::SwitchAtoM() {
void KingdomGame::SwitchMtoA() {
SwitchAS();
fadeToBlack1();
DrawRect(4, 17, 228, 161, 0);
RestoreAS();
drawRect(4, 17, 228, 161, 0);
restoreAS();
}
void KingdomGame::DrawIcon(int x, int y, int index) {
@ -1717,7 +1717,7 @@ int KingdomGame::WaitKey() {
}
void KingdomGame::DrawCursor() {
ReadMouse();
readMouse();
CursorType();
SetCursor(_cursorDef);

View File

@ -225,25 +225,25 @@ namespace Kingdom {
void GPLogic3();
void GPLogic4();
void GPLogic4_SP901();
void LoadAResource(int reznum);
void ReleaseAResource(int reznum);
void ShowPic(int reznum);
void FShowPic(int reznum);
void InitCursor();
void InitMouse();
void SetMouse();
void ReadMouse();
void InitMPlayer();
void PlayMovie(int movieNum);
void EnAll();
void DsAll();
void SaveAS();
void RestoreAS();
void DrawHelpScreen();
void DrawRect(uint v1, uint v2, uint v3, uint v4, int v5);
void DrawInventory();
void GameHelp_Sub43C();
void PlaySound(int v1);
void loadAResource(int reznum);
void releaseAResource(int reznum);
void showPic(int reznum);
void fShowPic(int reznum);
void initCursor();
void initMouse();
void setMouse();
void readMouse();
void initMPlayer();
void playMovie(int movieNum);
void enAll(); // TODO: Rename later as enableAll
void dsAll(); // TODO: Rename later as disableAll
void saveAS(); // TODO: Rename later as saveVideoBackground
void restoreAS(); // TODO: Rename later as restoreVideoBackground
void drawHelpScreen();
void drawRect(uint minX, uint minY, uint maxX, uint maxY, int color);
void drawInventory();
void gameHelp_Sub43C();
void playSound(int idx);
void EraseCursor();
void GetUserInput();
void EraseCursorAsm();