[Scummvm-cvs-logs] SF.net SVN: scummvm: [28810] scummvm/trunk/engines/agi
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sun Sep 2 01:30:37 CEST 2007
Revision: 28810
http://scummvm.svn.sourceforge.net/scummvm/?rev=28810&view=rev
Author: thebluegr
Date: 2007-09-01 16:30:37 -0700 (Sat, 01 Sep 2007)
Log Message:
-----------
Implemented the rnd() function. Some cleanup to remove unneeded functionality
Modified Paths:
--------------
scummvm/trunk/engines/agi/agi.h
scummvm/trunk/engines/agi/preagi_mickey.cpp
Modified: scummvm/trunk/engines/agi/agi.h
===================================================================
--- scummvm/trunk/engines/agi/agi.h 2007-09-01 23:02:36 UTC (rev 28809)
+++ scummvm/trunk/engines/agi/agi.h 2007-09-01 23:30:37 UTC (rev 28810)
@@ -1000,7 +1000,7 @@
int getSelection(int type);
bool waitAnyKeyChoice();
void waitAnyKey(bool anim = false);
-
+ int rnd(int hi) { return (rand() % hi + 1); }
};
} // End of namespace Agi
Modified: scummvm/trunk/engines/agi/preagi_mickey.cpp
===================================================================
--- scummvm/trunk/engines/agi/preagi_mickey.cpp 2007-09-01 23:02:36 UTC (rev 28809)
+++ scummvm/trunk/engines/agi/preagi_mickey.cpp 2007-09-01 23:30:37 UTC (rev 28810)
@@ -195,6 +195,7 @@
for (iRow = IDI_MSA_ROW_MENU_0; iRow < nRows; iRow++) {
iCol = *(buffer + pc++);
+ //_vm->printText(buffer + pc, 0, iRow, iCol, strlen(buffer + pc), 0x0f & 0x0f, (0x0f & 0xf0) / 0x10);
// drawStr(iRow, iCol, buffer + pc); // TODO
pc += strlen(buffer + pc) + 1;
}
@@ -318,10 +319,8 @@
exit(0);
case Common::EVENT_MOUSEMOVE:
if (iRow < 2) {
- // TODO
- x = y = 0; // TODO: remove this
- //x = event.mouse.x / getFontWidth();
- //y = event.mouse.y / getFontHeight();
+ x = event.mouse.x / 8;
+ y = event.mouse.y / 8;
getMouseMenuSelRow(menu, sel0, sel1, iRow, x, y);
drawMenu(menu, *sel0, *sel1);
}
@@ -353,16 +352,6 @@
break;
case Common::EVENT_KEYDOWN:
switch (event.kbd.keycode) {
- case Common::KEYCODE_F11:
- //flipCGA(); // TODO
- drawRoom();
- drawMenu(menu, *sel0, *sel1);
- break;
- case Common::KEYCODE_F12:
- //flipDblSize(); // TODO
- drawRoom();
- drawMenu(menu, *sel0, *sel1);
- break;
case Common::KEYCODE_2:
hidden();
break;
@@ -545,7 +534,7 @@
switch(iSound) {
case IDI_MSA_SND_XL30:
for (int iNote = 0; iNote < 6; iNote++) {
- note.counter = _vm->Rnd(59600) + 59;
+ note.counter = _vm->rnd(59600) + 59;
note.length = 4;
_PlayNote(note);
}
@@ -1154,7 +1143,7 @@
} else {
done = false;
while (!done) {
- //iPlanet = _vm->rnd(IDI_MSA_MAX_PLANET); // TODO
+ iPlanet = _vm->rnd(IDI_MSA_MAX_PLANET);
done = true;
for (int j = 0; j < IDI_MSA_MAX_PLANET; j++) {
if (game.iPlanetXtal[j] == iPlanet) {
@@ -1169,7 +1158,7 @@
done = false;
while (!done) {
- //iHint = _vm->rnd(5); // TODO
+ iHint = _vm->rnd(5);
done = true;
}
@@ -1220,9 +1209,7 @@
drawRoom();
printRoomDesc();
-#ifdef _DEBUG
- PlaySound(IDI_MSA_SND_SHIP_LAND);
-#endif
+ //playSound(IDI_MSA_SND_SHIP_LAND); // TODO
flashScreen();
flashScreen();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list