aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2007-04-14 03:46:30 +0000
committerPaul Gilbert2007-04-14 03:46:30 +0000
commit8be61535336cd123c96c333bf3b9bc0ef6fea47b (patch)
tree7c24e9eac8ee93384944726619fb1f04df19730f /engines
parentff31d88c9222a5084debd3fd7fceb8d0c264403f (diff)
downloadscummvm-rg350-8be61535336cd123c96c333bf3b9bc0ef6fea47b.tar.gz
scummvm-rg350-8be61535336cd123c96c333bf3b9bc0ef6fea47b.tar.bz2
scummvm-rg350-8be61535336cd123c96c333bf3b9bc0ef6fea47b.zip
Added script method for barmen serving player
svn-id: r26463
Diffstat (limited to 'engines')
-rw-r--r--engines/lure/scripts.cpp16
-rw-r--r--engines/lure/scripts.h1
2 files changed, 17 insertions, 0 deletions
diff --git a/engines/lure/scripts.cpp b/engines/lure/scripts.cpp
index 75c02767d8..27c30a2364 100644
--- a/engines/lure/scripts.cpp
+++ b/engines/lure/scripts.cpp
@@ -439,6 +439,21 @@ void Script::setVillageSkorlTickProc(uint16 v1, uint16 v2, uint16 v3) {
hotspot->tickProcOffset = 0x7efa;
}
+// Barman serving the player
+
+void Script::barmanServe(uint16 v1, uint16 v2, uint16 v3) {
+ Resources &res = Resources::getReference();
+ Hotspot *player = res.getActiveHotspot(PLAYER_ID);
+ BarEntry &barEntry = res.barmanLists().getDetails(player->roomNumber());
+
+ for (int index = 0; index < NUM_SERVE_CUSTOMERS; ++index) {
+ if (barEntry.customers[index].hotspotId == PLAYER_ID) {
+ barEntry.customers[index].serveFlags |= 5;
+ break;
+ }
+ }
+}
+
// Stores the current number of groats in the general field
void Script::getNumGroats(uint16 v1, uint16 v2, uint16 v3) {
@@ -534,6 +549,7 @@ SequenceMethodRecord scriptMethods[] = {
{50, Script::givePlayerItem},
{51, Script::decreaseNumGroats},
{54, Script::setVillageSkorlTickProc},
+ {56, Script::barmanServe},
{57, Script::getNumGroats},
{62, Script::animationLoad},
{63, Script::addActions},
diff --git a/engines/lure/scripts.h b/engines/lure/scripts.h
index 5c1cc2b135..22bd74fa0b 100644
--- a/engines/lure/scripts.h
+++ b/engines/lure/scripts.h
@@ -116,6 +116,7 @@ public:
static void givePlayerItem(uint16 hotspotId, uint16 v2, uint16 v3);
static void decreaseNumGroats(uint16 characterId, uint16 numGroats, uint16 v3);
static void setVillageSkorlTickProc(uint16 v1, uint16 v2, uint16 v3);
+ static void barmanServe(uint16 v1, uint16 v2, uint16 v3);
static void getNumGroats(uint16 v1, uint16 v2, uint16 v3);
static void animationLoad(uint16 hotspotId, uint16 v2, uint16 v3);
static void addActions(uint16 hotspotId, uint16 actions, uint16 v3);