[Scummvm-cvs-logs] SF.net SVN: scummvm:[39813] scummvm/trunk/engines/parallaction
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Fri Apr 3 18:32:47 CEST 2009
Revision: 39813
http://scummvm.svn.sourceforge.net/scummvm/?rev=39813&view=rev
Author: peres001
Date: 2009-04-03 16:32:47 +0000 (Fri, 03 Apr 2009)
Log Message:
-----------
Moved Nippon Safes specific code from Parallaction to Parallaction_ns and adapted client code.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/gui_ns.cpp
scummvm/trunk/engines/parallaction/parallaction.cpp
scummvm/trunk/engines/parallaction/parallaction.h
scummvm/trunk/engines/parallaction/parallaction_ns.cpp
scummvm/trunk/engines/parallaction/parser_ns.cpp
Modified: scummvm/trunk/engines/parallaction/gui_ns.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/gui_ns.cpp 2009-04-03 15:12:46 UTC (rev 39812)
+++ scummvm/trunk/engines/parallaction/gui_ns.cpp 2009-04-03 16:32:47 UTC (rev 39813)
@@ -291,12 +291,12 @@
class NewGameInputState_NS : public MenuInputState {
- Parallaction *_vm;
+ Parallaction_ns *_vm;
static const char *introMsg3[4];
public:
- NewGameInputState_NS(Parallaction *vm, MenuInputHelper *helper) : MenuInputState("newgame", helper), _vm(vm) {
+ NewGameInputState_NS(Parallaction_ns *vm, MenuInputHelper *helper) : MenuInputState("newgame", helper), _vm(vm) {
}
virtual MenuInputState* run() {
@@ -318,7 +318,7 @@
}
virtual void enter() {
- _vm->setBackground("test", NULL, NULL);
+ _vm->changeBackground("test");
_vm->_input->setMouseState(MOUSE_ENABLED_HIDE);
uint id[4];
Modified: scummvm/trunk/engines/parallaction/parallaction.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction.cpp 2009-04-03 15:12:46 UTC (rev 39812)
+++ scummvm/trunk/engines/parallaction/parallaction.cpp 2009-04-03 16:32:47 UTC (rev 39813)
@@ -268,12 +268,6 @@
}
-void Parallaction::setBackground(const char* name, const char* mask, const char* path) {
- BackgroundInfo *info = new BackgroundInfo;
- _disk->loadScenery(*info, name, mask, path);
- _gfx->setBackground(kBackgroundLocation, info);
-}
-
void Parallaction::showLocationComment(const Common::String &text, bool end) {
_balloonMan->setLocationBalloon(text.c_str(), end);
}
Modified: scummvm/trunk/engines/parallaction/parallaction.h
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction.h 2009-04-03 15:12:46 UTC (rev 39812)
+++ scummvm/trunk/engines/parallaction/parallaction.h 2009-04-03 16:32:47 UTC (rev 39813)
@@ -356,7 +356,6 @@
bool pickupItem(ZonePtr z);
void updateDoor(ZonePtr z, bool close);
void showZone(ZonePtr z, bool visible);
- void setBackground(const char *background, const char *mask, const char *path);
void highlightInventoryItem(ItemPosition pos);
int16 getHoverInventoryItem(int16 x, int16 y);
int addInventoryItem(ItemName item);
@@ -406,7 +405,7 @@
virtual void scheduleWalk(int16 x, int16 y, bool fromUser);
virtual DialogueManager *createDialogueManager(ZonePtr z);
- void switchBackground(const char* background, const char* mask);
+ void changeBackground(const char *background, const char *mask = 0, const char *path = 0);
private:
bool _inTestResult;
Modified: scummvm/trunk/engines/parallaction/parallaction_ns.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction_ns.cpp 2009-04-03 15:12:46 UTC (rev 39812)
+++ scummvm/trunk/engines/parallaction/parallaction_ns.cpp 2009-04-03 16:32:47 UTC (rev 39813)
@@ -260,9 +260,7 @@
return Common::kNoError;
}
-void Parallaction_ns::switchBackground(const char* background, const char* mask) {
-// printf("switchBackground(%s)", name);
-
+void Parallaction_ns::changeBackground(const char* background, const char* mask, const char* path) {
Palette pal;
uint16 v2 = 0;
@@ -278,9 +276,13 @@
_gfx->updateScreen();
}
- setBackground(background, mask, mask);
+ if (path == 0) {
+ path = mask;
+ }
- return;
+ BackgroundInfo *info = new BackgroundInfo;
+ _disk->loadScenery(*info, background, mask, path);
+ _gfx->setBackground(kBackgroundLocation, info);
}
Modified: scummvm/trunk/engines/parallaction/parser_ns.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parser_ns.cpp 2009-04-03 15:12:46 UTC (rev 39812)
+++ scummvm/trunk/engines/parallaction/parser_ns.cpp 2009-04-03 16:32:47 UTC (rev 39813)
@@ -918,7 +918,7 @@
}
strcpy(_vm->_location._name, _tokens[1]);
- _vm->switchBackground(_vm->_location._name, mask);
+ _vm->changeBackground(_vm->_location._name, mask);
if (_tokens[2][0] != '\0') {
_vm->_char._ani->setX(atoi(_tokens[2]));
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