[Scummvm-cvs-logs] SF.net SVN: scummvm: [32956] scummvm/branches/gsoc2008-rtl/engines/agi
cpage88 at users.sourceforge.net
cpage88 at users.sourceforge.net
Tue Jul 8 03:33:58 CEST 2008
Revision: 32956
http://scummvm.svn.sourceforge.net/scummvm/?rev=32956&view=rev
Author: cpage88
Date: 2008-07-07 18:33:57 -0700 (Mon, 07 Jul 2008)
Log Message:
-----------
PreAGI works with the new GMM implementation
Modified Paths:
--------------
scummvm/branches/gsoc2008-rtl/engines/agi/loader_v3.cpp
scummvm/branches/gsoc2008-rtl/engines/agi/preagi.cpp
scummvm/branches/gsoc2008-rtl/engines/agi/preagi_common.cpp
scummvm/branches/gsoc2008-rtl/engines/agi/preagi_mickey.cpp
scummvm/branches/gsoc2008-rtl/engines/agi/preagi_troll.cpp
scummvm/branches/gsoc2008-rtl/engines/agi/preagi_winnie.cpp
Modified: scummvm/branches/gsoc2008-rtl/engines/agi/loader_v3.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/agi/loader_v3.cpp 2008-07-08 00:16:55 UTC (rev 32955)
+++ scummvm/branches/gsoc2008-rtl/engines/agi/loader_v3.cpp 2008-07-08 01:33:57 UTC (rev 32956)
@@ -27,6 +27,7 @@
#include "agi/lzw.h"
#include "common/config-manager.h"
+#include "common/events.h"
#include "common/fs.h"
namespace Agi {
@@ -231,7 +232,7 @@
debugC(3, kDebugLevelResources, "x = %x %x", x[0], x[1]);
error("ACK! BAD RESOURCE");
- g_system->quit();
+ g_system->getEventManager()->pushEvent(Common::EVENT_QUIT);
}
agid->len = READ_LE_UINT16((uint8 *) x + 3); /* uncompressed size */
Modified: scummvm/branches/gsoc2008-rtl/engines/agi/preagi.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/agi/preagi.cpp 2008-07-08 00:16:55 UTC (rev 32955)
+++ scummvm/branches/gsoc2008-rtl/engines/agi/preagi.cpp 2008-07-08 01:33:57 UTC (rev 32956)
@@ -228,7 +228,7 @@
error("Unknown preagi engine");
break;
}
- return 0;
+ return _eventMan->shouldRTL();
}
} // End of namespace Agi
Modified: scummvm/branches/gsoc2008-rtl/engines/agi/preagi_common.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/agi/preagi_common.cpp 2008-07-08 00:16:55 UTC (rev 32955)
+++ scummvm/branches/gsoc2008-rtl/engines/agi/preagi_common.cpp 2008-07-08 01:33:57 UTC (rev 32956)
@@ -122,11 +122,11 @@
int PreAgiEngine::getSelection(SelectionTypes type) {
Common::Event event;
- for (;;) {
+ while (!_eventMan->shouldQuit()) {
while (_eventMan->pollEvent(event)) {
switch(event.type) {
case Common::EVENT_QUIT:
- _system->quit();
+ return 0;
case Common::EVENT_RBUTTONUP:
return 0;
case Common::EVENT_LBUTTONUP:
Modified: scummvm/branches/gsoc2008-rtl/engines/agi/preagi_mickey.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/agi/preagi_mickey.cpp 2008-07-08 00:16:55 UTC (rev 32955)
+++ scummvm/branches/gsoc2008-rtl/engines/agi/preagi_mickey.cpp 2008-07-08 01:33:57 UTC (rev 32956)
@@ -343,11 +343,11 @@
drawMenu(menu, *sel0, *sel1);
- for (;;) {
+ while (!_vm->_system->getEventManager()->shouldQuit()) {
while (_vm->_system->getEventManager()->pollEvent(event)) {
switch(event.type) {
case Common::EVENT_QUIT:
- exit(0);
+ return 0;
case Common::EVENT_MOUSEMOVE:
if (iRow < 2) {
x = event.mouse.x / 8;
@@ -641,7 +641,6 @@
while (_vm->_system->getEventManager()->pollEvent(event)) {
switch(event.type) {
case Common::EVENT_QUIT:
- _vm->_system->quit();
case Common::EVENT_LBUTTONUP:
case Common::EVENT_RBUTTONUP:
case Common::EVENT_KEYDOWN:
@@ -2054,7 +2053,6 @@
while (_vm->_system->getEventManager()->pollEvent(event)) {
switch(event.type) {
case Common::EVENT_QUIT:
- _vm->_system->quit();
case Common::EVENT_KEYDOWN:
case Common::EVENT_LBUTTONUP:
case Common::EVENT_RBUTTONUP:
@@ -2153,7 +2151,7 @@
intro();
// Game loop
- for (;;) {
+ while (!_vm->_system->getEventManager()->shouldQuit()) {
drawRoom();
if (_game.fIntro) {
Modified: scummvm/branches/gsoc2008-rtl/engines/agi/preagi_troll.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/agi/preagi_troll.cpp 2008-07-08 00:16:55 UTC (rev 32955)
+++ scummvm/branches/gsoc2008-rtl/engines/agi/preagi_troll.cpp 2008-07-08 01:33:57 UTC (rev 32956)
@@ -58,11 +58,11 @@
drawMenu(szMenu, *iSel);
- for (;;) {
+ while (!_vm->_system->getEventManager()->shouldQuit()) {
while (_vm->_system->getEventManager()->pollEvent(event)) {
switch(event.type) {
case Common::EVENT_QUIT:
- _vm->_system->quit();
+ return 0;
case Common::EVENT_MOUSEMOVE:
y = event.mouse.y / 8;
@@ -206,7 +206,6 @@
while (_vm->_system->getEventManager()->pollEvent(event)) {
switch(event.type) {
case Common::EVENT_QUIT:
- _vm->_system->quit();
case Common::EVENT_LBUTTONUP:
case Common::EVENT_KEYDOWN:
return;
@@ -269,7 +268,7 @@
int iSel = 0;
//char szTreasure[16] = {0};
- for (;;) {
+ while (!_vm->_system->getEventManager()->shouldQuit()) {
_vm->clearScreen(0xFF);
_vm->printStr(IDS_TRO_TUTORIAL_0);
Modified: scummvm/branches/gsoc2008-rtl/engines/agi/preagi_winnie.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/agi/preagi_winnie.cpp 2008-07-08 00:16:55 UTC (rev 32955)
+++ scummvm/branches/gsoc2008-rtl/engines/agi/preagi_winnie.cpp 2008-07-08 01:33:57 UTC (rev 32956)
@@ -241,7 +241,7 @@
// extract header from buffer
parseRoomHeader(&hdr, buffer, sizeof(WTP_ROOM_HDR));
- for (;;) {
+ while (!_vm->_system->getEventManager()->shouldQuit()) {
pc = startpc;
// check if block is to be run
@@ -797,12 +797,11 @@
// Show the mouse cursor for the menu
CursorMan.showMouse(true);
- for (;;) {
+ while (!_vm->_system->getEventManager()->shouldQuit()) {
while (_vm->_system->getEventManager()->pollEvent(event)) {
switch(event.type) {
case Common::EVENT_QUIT:
- _vm->_system->quit();
- break;
+ return;
case Common::EVENT_MOUSEMOVE:
x = event.mouse.x / 8;
y = event.mouse.y / 8;
@@ -1014,7 +1013,7 @@
if (parser(hdr.ofsDesc[iBlock] - _roomOffset, iBlock, roomdata) == IDI_WTP_PAR_BACK)
goto phase1;
}
- for (;;) {
+ while (!_vm->_system->getEventManager()->shouldQuit()) {
for (iBlock = 0; iBlock < IDI_WTP_MAX_BLOCK; iBlock++) {
switch(parser(hdr.ofsBlock[iBlock] - _roomOffset, iBlock, roomdata)) {
case IDI_WTP_PAR_GOTO:
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