Initial commit

This commit is contained in:
2026-02-02 04:50:13 +01:00
commit 5b11698731
22592 changed files with 7677434 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,287 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef GNAP_ARCADE_H
#define GNAP_ARCADE_H
#include "gnap/debugger.h"
namespace Gnap {
class GnapEngine;
class CutScene;
struct Scene49Obstacle {
int _currSequenceId;
int _closerSequenceId;
int _passedSequenceId;
int _splashSequenceId;
int _collisionSequenceId;
int _prevId;
int _currId;
int _laneNum;
};
struct ObstacleDef {
int _sequenceId;
int _ticks;
};
class Scene49: public Scene {
public:
Scene49(GnapEngine *vm);
~Scene49() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
private:
int _scoreBarPos;
int _scoreLevel;
bool _scoreBarFlash;
int _obstacleIndex;
Scene49Obstacle _obstacles[5];
int _truckSequenceId;
int _truckId;
int _truckLaneNum;
void checkObstacles();
void updateObstacle(int id);
void increaseScore(int amount);
void decreaseScore(int amount);
void refreshScoreBar();
void clearObstacle(int index);
};
/*****************************************************************************/
class Scene50: public Scene {
public:
Scene50(GnapEngine *vm);
~Scene50() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
private:
bool _fightDone;
int _timesPlayed;
int _timesPlayedModifier;
int _attackCounter;
int _roundNum;
int _timeRemaining;
int _leftTongueRoundsWon;
int _rightTongueRoundsWon;
int _leftTongueEnergyBarPos;
int _rightTongueEnergyBarPos;
int _leftTongueSequenceId;
int _leftTongueId;
int _leftTongueNextSequenceId;
int _leftTongueNextId;
int _leftTongueNextIdCtr;
int _rightTongueSequenceId;
int _rightTongueId;
int _rightTongueNextSequenceId;
int _rightTongueNextId;
int _rightTongueNextIdCtr;
int _leftTongueEnergy;
int _rightTongueEnergy;
bool tongueWinsRound(int tongueNum);
void playWinAnim(int tongueNum, bool fightOver);
void delayTicks();
void initRound();
bool updateCountdown();
void drawCountdown(int value);
void playTonguesIdle();
void playRoundAnim(int roundNum);
bool updateEnergyBars(int newLeftBarPos, int newRightBarPos);
void waitForAnim(int animationIndex);
int checkInput();
int getRightTongueAction();
int getRightTongueActionTicks();
int getLeftTongueNextId();
int getRightTongueNextId();
void playWinBadgeAnim(int tongueNum);
};
/*****************************************************************************/
struct Scene51Item {
int _currSequenceId;
int _droppedSequenceId;
int _x, _y;
int _collisionX;
bool _canCatch;
bool _isCollision;
int _x2;
int _id;
};
class Scene51: public Scene {
public:
Scene51(GnapEngine *vm);
~Scene51() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override {};
void updateAnimationsCb() override {};
private:
bool _dropLoseCash;
int _cashAmount;
int _digits[4];
int _digitSequenceIds[4];
int _guySequenceId;
int _guyNextSequenceId;
int _itemsCaughtCtr;
int _dropSpeedTicks;
int _nextDropItemKind;
int _itemInsertX;
int _itemInsertDirection;
int _platypusSequenceId;
int _platypusNextSequenceId;
int _platypusJumpSequenceId;
int _itemsCtr;
int _itemsCtr1;
int _itemsCtr2;
Scene51Item _items[6];
void clearItem(Scene51Item *item);
void dropNextItem();
void updateItemAnimations();
int checkCollision(int sequenceId);
void updateItemAnimation(Scene51Item *item, int index);
void removeCollidedItems();
int itemIsCaught(Scene51Item *item);
bool isJumpingRight(int sequenceId);
bool isJumpingLeft(int sequenceId);
bool isJumping(int sequenceId);
void waitForAnim(int animationIndex);
int getPosRight(int sequenceId);
int getPosLeft(int sequenceId);
void playIntroAnim();
void updateGuyAnimation();
int incCashAmount(int sequenceId);
void winMinigame();
void playCashAppearAnim();
void updateCash(int amount);
void drawDigit(int digit, int position);
void initCashDisplay();
};
/*****************************************************************************/
class Scene52: public Scene {
public:
Scene52(GnapEngine *vm);
~Scene52() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override {};
void updateAnimationsCb() override {};
private:
int _liveAlienRows;
int _gameScore;
bool _soundToggle;
int _arcadeScreenBottom;
int _shipsLeft;
int _shieldSpriteIds[3];
int _shieldPosX[3];
int _shipPosX;
int _shipCannonPosX, _shipCannonPosY;
bool _shipCannonFiring;
bool _shipCannonFired;
int _shipCannonWidth, _shipCannonHeight;
int _shipCannonTopY;
int _shipMidX, _shipMidY;
bool _shipFlag;
bool _aliensInitialized;
int _alienSpeed, _alienDirection;
int _alienWidth, _alienHeight;
int _alienLeftX, _alienTopY;
int _alienRowDownCtr;
int _alienRowKind[8];
int _alienRowAnims[8];
int _alienRowIds[8];
int _alienRowXOfs[8];
int _alienCannonFired[3];
int _alienCannonPosX[3];
int _alienCannonPosY[3];
int _alienCannonSequenceIds[3];
int _alienCannonIds[3];
bool _alienWave, _alienSingle;
int _alienCounter;
bool _bottomAlienFlag;
int _aliensCount;
int _items[8][5];
int _nextUfoSequenceId, _ufoSequenceId;
void update();
void initShipCannon(int bottomY);
void initAlienCannons();
void fireShipCannon(int posX);
void fireAlienCannon();
int getFreeShipCannon();
int getFreeAlienCannon();
void updateShipCannon();
void updateAlienCannons();
void initAliens();
void initAlienRowKind(int rowNum, int alienKind);
void insertAlienRow(int rowNum);
void insertAlienRowAliens(int rowNum);
void updateAlienRow(int rowNum);
void moveDownAlienRow();
int updateHitAlien();
int getHitAlienNum(int rowNum);
int alienCannonHitShip(int cannonNum);
int alienCannonHitShield(int cannonNum);
bool shipCannonHitShield(int cannonNum);
bool shipCannonHitAlien();
void shipExplode();
bool checkAlienRow(int rowNum);
void updateAlienRowXOfs();
void initAlienSize();
void playSound();
void updateAliens();
void updateAlien(int rowNum);
void loseShip();
void initShields();
void initAnims();
void drawScore(int score);
};
} // End of namespace Gnap
#endif // GNAP_ARCADE_H

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,400 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef GNAP_GROUP0_H
#define GNAP_GROUP0_H
#include "gnap/debugger.h"
namespace Gnap {
enum {
kHS01Platypus = 0,
kHS01ExitTruck = 1,
kHS01Mud = 2,
kHS01Pigs = 3,
kHS01Spaceship = 4,
kHS01Device = 5,
kHS01WalkArea1 = 6,
kHS01WalkArea2 = 7,
kHS01WalkArea3 = 8,
kHS01WalkArea4 = 9,
kHS01WalkArea5 = 10,
kHS01WalkArea6 = 11,
kHS01WalkArea7 = 12,
kHS01WalkArea8 = 13
};
enum {
kHS02Platypus = 0,
kHS02Chicken = 1,
kHS02Truck1 = 2,
kHS02Truck2 = 3,
kHS02TruckGrill = 4,
kHS02Device = 5,
kHS02ExitHouse = 6,
kHS02ExitBarn = 7,
kHS02ExitCreek = 8,
kHS02ExitPigpen = 9,
kHS02WalkArea1 = 10,
kHS02WalkArea2 = 11,
kHS02WalkArea3 = 12,
kHS02WalkArea4 = 13
};
enum {
kHS03Platypus = 0,
kHS03Grass = 1,
kHS03ExitTruck = 2,
kHS03Creek = 3,
kHS03TrappedPlatypus = 4,
kHS03Device = 5,
kHS03WalkAreas1 = 6,
kHS03WalkAreas2 = 7,
kHS03PlatypusWalkArea = 8,
kHS03WalkAreas3 = 9
};
enum {
kHS04Platypus = 0,
kHS04Twig = 1,
kHS04Dog = 2,
kHS04Axe = 3,
kHS04Door = 4,
kHS04ExitTruck = 5,
kHS04Device = 6,
kHS04Window = 7,
kHS04ExitBarn = 8,
kHS04WalkArea1 = 9,
kHS04WalkArea2 = 10
};
enum {
kHS05Platypus = 0,
kHS05Haystack = 1,
kHS05Padlock = 2,
kHS05Ladder = 3,
kHS05ExitHouse = 4,
kHS05Chicken = 5,
kHS05Device = 6,
kHS05WalkArea1 = 7,
kHS05WalkArea2 = 8,
kHS05WalkArea3 = 9
};
enum {
kHS06Platypus = 0,
kHS06Gas = 1,
kHS06Ladder = 2,
kHS06Horse = 3,
kHS06ExitOutsideBarn = 4,
kHS06Device = 5,
kHS06WalkArea1 = 6,
kHS06WalkArea2 = 7,
kHS06WalkArea3 = 8,
kHS06WalkArea4 = 9,
kHS06WalkArea5 = 10
};
enum {
kHS07Platypus = 0,
kHS07ExitHouse = 1,
kHS07Dice = 2,
kHS07Device = 3,
kHS07WalkArea1 = 4,
kHS07WalkArea2 = 5,
kHS07WalkArea3 = 6
};
enum {
kH08SPlatypus = 0,
kHS08ExitBackdoor = 1,
kHS08ExitCrash = 2,
kHS08Man = 3,
kHS08Door = 4,
kHS08Meat = 5,
kHS08Bone = 6,
kHS08Toy = 7,
kHS08WalkArea1 = 8,
kHS08Device = 9,
kHS08WalkArea2 = 10
};
enum {
kHS09Platypus = 0,
kHS09ExitKitchen = 1,
kHS09ExitHouse = 2,
kHS09Trash = 3,
kHS09Device = 4,
kHS09WalkArea1 = 5,
kHS09WalkArea2 = 6,
kHS09WalkArea3 = 7
};
enum {
kAS01LookSpaceship = 1,
kAS01LookSpaceshipDone = 2,
kAS01LeaveScene = 3,
kAS01TakeMud = 5,
kAS01LookPigs = 6,
kAS01UsePigs = 7
};
enum {
kAS02UseTruckNoKeys = 0,
kAS02UseGasWithTruck = 1,
kAS02UseTruckGas = 2,
kAS02UseTruckNoGas = 3,
kAS02GrabTruckGrill = 5,
kAS02LeaveScene = 6,
kAS02TalkChicken = 7,
kAS02GrabChicken = 8,
kAS02GrabChickenDone = 9,
kAS02UseTruckNoKeysDone = 11,
kAS02UseGasWithTruckDone = 12,
kAS02UseTwigWithChicken = 16
};
enum {
kAS03LeaveScene = 0,
kAS03FreePlatypus = 1,
kAS03HypnotizePlat = 2,
kAS03HypnotizeScaredPlat= 3,
kAS03FreePlatypusDone = 4,
kAS03GrabPlatypus = 5,
kAS03GrabCreek = 6,
kAS03GrabCreekDone = 7,
kAS03GrabScaredPlatypus = 8
};
enum {
kAS04OpenDoor = 1,
kAS04GetKeyFirst = 2,
kAS04GetKeyAnother = 3,
kAS04LeaveScene = 4,
kAS04GetKeyFirstDone = 6,
kAS04GetKeyFirst2 = 7,
kAS04GetKeyAnother2 = 8,
kAS04GetKeyAnotherDone = 9,
kAS04OpenDoorDone = 10,
kAS04GrabDog = 12,
kAS04GrabAxe = 13
};
enum {
kAS05PlatSearchHaystack = 0,
kAS05TryPickPadlock = 1,
kAS05PickPadlock = 2,
kAS05TalkChicken = 3,
kAS05GrabChicken = 4,
kAS05GrabLadder = 5,
kAS05EnterBarn = 6,
kAS05UseTwigWithChicken = 11,
kAS05LeaveScene = 12
};
enum {
kAS06TryToGetGas = 0,
kAS06TryToClimbLadder = 1,
kAS06TryToClimbLadderDone = 2,
kAS06TalkToHorse = 3,
kAS06UseTwigOnHorse = 4,
kAS06LeaveScene = 5
};
enum {
kAS07Wait = 0,
kAS07LeaveScene = 1
};
enum {
kAS08LeaveScene = 0,
kAS08TalkMan = 1,
kAS08LookMan = 2,
kAS08LookDog = 3,
kAS08GrabDog = 4,
kAS08TalkDog = 5,
kAS08PlatWithMan = 6,
kAS08PlatWithDog = 7
};
enum {
kAS09LeaveScene = 0,
kAS09SearchTrash = 1,
kAS09SearchTrashDone = 2
};
/*****************************************************************************/
class GnapEngine;
class CutScene;
class Scene01: public Scene {
public:
Scene01(GnapEngine *vm);
~Scene01() override;
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {}
private:
int _pigsIdCtr;
int _smokeIdCtr;
Graphics::Surface *_spaceshipSurface;
};
class Scene02: public Scene {
public:
Scene02(GnapEngine *vm);
~Scene02() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {}
private:
int _truckGrillCtr;
int _nextChickenSequenceId;
int _currChickenSequenceId;
int _gnapTruckSequenceId;
};
class Scene03: public Scene {
public:
Scene03(GnapEngine *vm);
~Scene03() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {}
private:
bool _platypusHypnotized;
bool _platypusScared;
int _nextPlatSequenceId;
int _nextFrogSequenceId;
int _currFrogSequenceId;
};
class Scene04: public Scene {
public:
Scene04(GnapEngine *vm);
~Scene04() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {}
private:
bool _triedWindow;
int _dogIdCtr;
int _nextDogSequenceId;
int _currDogSequenceId;
};
class Scene05: public Scene {
public:
Scene05(GnapEngine *vm);
~Scene05() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {}
private:
int _nextChickenSequenceId;
int _currChickenSequenceId;
};
class Scene06: public Scene {
public:
Scene06(GnapEngine *vm);
~Scene06() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {}
private:
bool _horseTurnedBack;
int _nextPlatSequenceId;
int _nextHorseSequenceId;
int _currHorseSequenceId;
};
class Scene07: public Scene {
public:
Scene07(GnapEngine *vm);
~Scene07() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {}
};
class Scene08: public Scene {
public:
Scene08(GnapEngine *vm);
~Scene08() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override;
private:
int _nextDogSequenceId;
int _currDogSequenceId;
int _nextManSequenceId;
int _currManSequenceId;
};
class Scene09: public Scene {
public:
Scene09(GnapEngine *vm);
~Scene09() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {}
};
} // End of namespace Gnap
#endif // GNAP_GROUP0_H

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,453 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef GNAP_GROUP1_H
#define GNAP_GROUP1_H
#include "gnap/debugger.h"
namespace Gnap {
enum {
kHS10Platypus = 0,
kHS10ExitBar = 1,
kHS10ExitBackdoor = 2,
kHS10Cook = 3,
kHS10Tongs = 4,
kHS10Box = 5,
kHS10Oven = 6,
kHS10WalkArea1 = 7,
kHS10Device = 8,
kHS10WalkArea2 = 9,
kHS10WalkArea3 = 10,
kHS10WalkArea4 = 11
};
enum {
kHS11Platypus = 0,
kHS11ExitKitchen = 1,
kHS11ExitToilet = 2,
kHS11ExitLeft = 3,
kHS11GoggleGuy = 4,
kHS11HookGuy = 5,
kHS11Billard = 6,
kHS11WalkArea1 = 7,
kHS11Device = 8,
kHS11WalkArea2 = 9,
kHS11WalkArea3 = 10,
kHS11WalkArea4 = 11,
kHS11WalkArea5 = 12
};
enum {
kHS12Platypus = 0,
kHS12ExitRight = 1,
kHS12ToothGuy = 2,
kHS12Barkeeper = 3,
kHS12BeardGuy = 4,
kHS12Jukebox = 5,
kHS12WalkArea1 = 6,
kHS12Device = 7,
kHS12WalkArea2 = 8,
kHS12WalkArea3 = 9,
kHS12WalkArea4 = 10
};
enum {
kHS13Platypus = 0,
kHS13ExitBar = 1,
kHS13WalkArea1 = 2,
kHS13BackToilet = 3,
kHS13FrontToilet= 4,
kHS13Urinal = 5,
kHS13Scribble = 6,
kHS13Sink = 7,
kHS13WalkArea2 = 8,
kHS13Device = 9,
kHS13WalkArea3 = 10,
kHS13WalkArea4 = 11,
kHS13WalkArea5 = 12,
kHS13WalkArea6 = 13,
kHS13WalkArea7 = 14,
kHS13WalkArea8 = 15,
kHS13WalkArea9 = 16
};
enum {
kHS14Platypus = 0,
kHS14Exit = 1,
kHS14Coin = 2,
kHS14Toilet = 3,
kHS14Device = 4
};
enum {
kHS15Platypus = 0,
kHS15Exit = 1,
kHS15Button1 = 2,
kHS15Button2 = 3,
kHS15Button3 = 4,
kHS15Button4 = 5,
kHS15Button5 = 6,
kHS15Button6 = 7,
kHS15ButtonA = 8,
kHS15ButtonB = 9,
kHS15ButtonC = 10,
kHS15ButtonD = 11,
kHS15ButtonE = 12,
kHS15ButtonF = 13,
kHS15CoinSlot = 14,
kHS15PlayButton = 15,
kHS15Device = 16
};
enum {
kHS17Platypus = 0,
kHS17Phone1 = 1,
kHS17Phone2 = 2,
kHS17ExitGrubCity = 3,
kHS17Device = 4,
kHS17ExitToyStore = 5,
kHS17Wrench = 6,
kHS17WalkArea1 = 7,
kHS17WalkArea2 = 8,
kHS17WalkArea3 = 9
};
enum {
kHS18Platypus = 0,
kHS18GarbageCan = 1,
kHS18Device = 2,
kHS18ExitToyStore = 3,
kHS18ExitPhoneBooth = 4,
kHS18ExitGrubCity = 5,
kHS18HydrantTopValve = 6,
kHS18HydrantRightValve = 7,
kHS18CowboyHat = 8,
kHS18WalkArea1 = 9,
kHS18WalkArea2 = 10
};
enum {
kHS19Platypus = 0,
kHS19ExitOutsideToyStore= 1,
kHS19Device = 2,
kHS19Picture = 3,
kHS19ShopAssistant = 4,
kHS19Toy1 = 5,
kHS19Toy2 = 6,
kHS19Toy3 = 7,
kHS19Phone = 8,
kHS19Toy4 = 9,
kHS19Toy5 = 10,
kHS19Toy6 = 11,
kHS19Toy7 = 12,
kHS19WalkArea1 = 13,
kHS19WalkArea2 = 14,
kHS19WalkArea3 = 15
};
enum {
kAS10LeaveScene = 0,
kAS10AnnoyCook = 1,
kAS10PlatWithBox = 4
};
enum {
kAS11LeaveScene = 0,
kAS11ShowMagazineToGoggleGuy = 3,
kAS11TalkGoggleGuy = 4,
kAS11GrabHookGuy = 6,
kAS11ShowItemToHookGuy = 8,
kAS11TalkHookGuy = 9,
kAS11GrabBillardBall = 11
};
enum {
kAS12LeaveScene = 0,
kAS12QuarterToToothGuyDone = 1,
kAS12TalkToothGuy = 2,
kAS12GrabToothGuy = 4,
kAS12ShowItemToToothGuy = 5,
kAS12QuarterWithHoleToToothGuy = 6,
kAS12QuarterToToothGuy = 7,
kAS12TalkBeardGuy = 8,
kAS12LookBeardGuy = 9,
kAS12GrabBeardGuy = 10,
kAS12ShowItemToBeardGuy = 11,
kAS12TalkBarkeeper = 12,
kAS12LookBarkeeper = 13,
kAS12ShowItemToBarkeeper = 15,
kAS12QuarterWithBarkeeper = 16,
kAS12PlatWithBarkeeper = 17,
kAS12PlatWithToothGuy = 18,
kAS12PlatWithBeardGuy = 19
};
enum {
kAS13LeaveScene = 0,
kAS13BackToilet = 1,
kAS13FrontToilet = 2,
kAS13LookScribble = 6,
kAS13GrabSink = 7,
kAS13GrabSinkDone = 8,
kAS13Wait = 12,
kAS13GrabUrinal = 13
};
enum {
kAS17TryGetWrench = 0,
kAS17GetWrench2 = 1,
kAS17GetWrenchDone = 2,
kAS17GetWrench1 = 3,
kAS17PlatUsePhone = 4,
kAS17PutCoinIntoPhone = 5,
kAS17GetCoinFromPhone = 6,
kAS17GetCoinFromPhoneDone = 7,
kAS17PutCoinIntoPhoneDone = 8,
kAS17GnapUsePhone = 9,
kAS17GetWrenchGnapReady = 10,
kAS17GnapHangUpPhone = 11,
kAS17PlatPhoningAssistant = 12,
kAS17PlatHangUpPhone = 14,
kAS17LeaveScene = 15
};
enum {
kAS18OpenRightValveNoGarbageCanDone = 0,
kAS18OpenRightValveNoGarbageCan = 1,
kAS18CloseRightValveNoGarbageCan = 2,
kAS18OpenTopValveDone = 3,
kAS18OpenTopValve = 4,
kAS18CloseTopValve = 5,
kAS18GrabGarbageCanFromStreet = 6,
kAS18GrabCowboyHat = 7,
kAS18GrabGarbageCanFromHydrant = 8,
kAS18PutGarbageCanOnRunningHydrant = 9,
kAS18PutGarbageCanOnRunningHydrant2 = 10,
kAS18GrabCowboyHatDone = 11,
kAS18StandingOnHydrant = 12,
kAS18OpenRightValveWithGarbageCan = 13,
kAS18OpenRightValveWithGarbageCanDone = 14,
kAS18CloseRightValveWithGarbageCan = 15,
kAS18PutGarbageCanOnHydrant = 16,
kAS18PutGarbageCanOnHydrantDone = 17,
kAS18PlatComesHere = 18,
kAS18CloseRightValveWithGarbageCanDone = 19,
kAS18LeaveScene = 20
};
enum {
kAS19UsePhone = 0,
kAS19GrabToy = 1,
kAS19GrabPicture = 2,
kAS19GrabPictureDone = 3,
kAS19TalkShopAssistant = 4,
kAS19LeaveScene = 5
};
/*****************************************************************************/
class GnapEngine;
class CutScene;
class Scene10: public Scene {
public:
Scene10(GnapEngine *vm);
~Scene10() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override;
private:
int _nextCookSequenceId;
int _currCookSequenceId;
};
class Scene11: public Scene {
public:
Scene11(GnapEngine *vm);
~Scene11() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
private:
int _billardBallCtr;
int _nextHookGuySequenceId;
int _currHookGuySequenceId;
int _nextGoggleGuySequenceId;
int _currGoggleGuySequenceId;
};
class Scene12: public Scene {
public:
Scene12(GnapEngine *vm);
~Scene12() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
private:
int _nextBeardGuySequenceId;
int _currBeardGuySequenceId;
int _nextToothGuySequenceId;
int _currToothGuySequenceId;
int _nextBarkeeperSequenceId;
int _currBarkeeperSequenceId;
};
class Scene13: public Scene {
public:
Scene13(GnapEngine *vm);
~Scene13() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
private:
int _backToiletCtr;
void showScribble();
};
class Scene14: public Scene {
public:
Scene14(GnapEngine *vm);
~Scene14() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
};
class Scene15: public Scene {
public:
Scene15(GnapEngine *vm);
~Scene15() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
private:
int _nextRecordSequenceId;
int _currRecordSequenceId;
int _nextSlotSequenceId;
int _currSlotSequenceId;
int _nextUpperButtonSequenceId;
int _currUpperButtonSequenceId;
int _nextLowerButtonSequenceId;
int _currLowerButtonSequenceId;
};
class Scene17: public Scene {
public:
Scene17(GnapEngine *vm);
~Scene17() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
private:
bool _canTryGetWrench;
int _wrenchCtr;
int _platPhoneCtr;
int _platTryGetWrenchCtr;
int _nextPhoneSequenceId;
int _currPhoneSequenceId;
int _nextWrenchSequenceId;
int _currWrenchSequenceId;
int _nextCarWindowSequenceId;
int _currCarWindowSequenceId;
void update();
void platHangUpPhone();
};
class Scene18: public Scene {
public:
Scene18(GnapEngine *vm);
~Scene18() override;
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
private:
Graphics::Surface *_cowboyHatSurface;
int _platPhoneCtr;
int _platPhoneIter;
int _nextPhoneSequenceId;
int _currPhoneSequenceId;
void gnapCarryGarbageCanTo(int a5);
void putDownGarbageCan(int animationIndex);
void platEndPhoning(bool platFl);
void closeHydrantValve();
void waitForGnapAction();
};
class Scene19: public Scene {
public:
Scene19(GnapEngine *vm);
~Scene19() override;
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
private:
int _currShopAssistantSequenceId;
int _nextShopAssistantSequenceId;
int _toyGrabCtr;
int _shopAssistantCtr;
Graphics::Surface *_pictureSurface;
};
} // End of namespace Gnap
#endif // GNAP_GROUP1_H

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,406 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef GNAP_GROUP2_H
#define GNAP_GROUP2_H
#include "gnap/debugger.h"
namespace Gnap {
enum {
kHS20Platypus = 0,
kHS20GroceryStoreHat = 1,
kHS20ExitParkingLot = 2,
kHS20StonerGuy = 3,
kHS20GroceryStoreGuy = 4,
kHS20Device = 5,
kHS20ExitInsideGrubCity = 6,
kHS20ExitOutsideCircusWorld = 7,
kHS20ExitOutsideToyStore = 8,
kHS20ExitPhone = 9,
kHS20WalkArea1 = 10,
kHS20WalkArea2 = 11
};
enum {
kHS21Platypus = 0,
kHS21Banana = 1,
kHS21OldLady = 2,
kHS21Device = 3,
kHS21ExitOutsideGrubCity = 4,
kHS21WalkArea1 = 5,
kHS21WalkArea2 = 6
};
enum {
kHS22Platypus = 0,
kHS22ExitOutsideGrubCity = 1,
kHS22ExitBackGrubCity = 2,
kHS22Cashier = 3,
kHS22Device = 4,
kHS22WalkArea1 = 5,
kHS22WalkArea2 = 6
};
enum {
kHS23Platypus = 0,
kHS23ExitFrontGrubCity = 1,
kHS23Device = 2,
kHS23Cereals = 3,
kHS23WalkArea1 = 4,
kHS23WalkArea2 = 5
};
enum {
kHS24Platypus = 0,
kHS24ExitCircusWorld = 1,
kHS24ExitOutsideGrubCity = 2,
kHS24Device = 3,
kHS24WalkArea1 = 4,
kHS24WalkArea2 = 5,
kHS24WalkArea3 = 6
};
enum {
kHS25Platypus = 0,
kHS25TicketVendor = 1,
kHS25ExitOutsideCircusWorld = 2,
kHS25ExitInsideCircusWorld = 3,
kHS25Device = 4,
kHS25Posters1 = 5,
kHS25Posters2 = 6,
kHS25Posters3 = 7,
kHS25Posters4 = 8,
kHS25WalkArea1 = 9,
kHS25WalkArea2 = 10
};
enum {
kHS26Platypus = 0,
kHS26ExitOutsideCircusWorld = 1,
kHS26ExitOutsideClown = 2,
kHS26ExitArcade = 3,
kHS26ExitElephant = 4,
kHS26ExitBeerStand = 5,
kHS26Device = 6,
kHS26WalkArea1 = 7,
kHS26WalkArea2 = 8
};
enum {
kHS27Platypus = 0,
kHS27Janitor = 1,
kHS27Device = 2,
kHS27Bucket = 3,
kHS27ExitCircus = 4,
kHS27ExitArcade = 5,
kHS27ExitBeerStand = 6,
kHS27ExitClown = 7,
kHS27WalkArea1 = 8
};
enum {
kHS28Platypus = 0,
kHS28Horn = 1,
kHS28Clown = 2,
kHS28ExitOutsideClown = 3,
kHS28EmptyBucket = 4,
kHS28Device = 5,
kHS28WalkArea1 = 6,
kHS28WalkArea2 = 7
};
enum {
kHS29Platypus = 0,
kHS29Monkey = 1,
kHS29Device = 2,
kHS29ExitCircus = 3,
kHS29ExitOutsideClown = 4,
kHS29Arcade = 5,
kHS29WalkArea1 = 6
};
enum {
kAS20LeaveScene = 0,
kAS20TalkStonerGuyNoJoint = 2,
kAS20TalkStonerGuyHasJoint = 3,
kAS20GrabJoint = 4,
kAS20ActionDone = 5,
kAS20TalkGroceryStoreGuy = 6,
kAS20GrabGroceryStoreGuy = 9,
kAS20GrabGroceryStoreHat = 10,
kAS20SwitchGroceryStoreHat = 11,
kAS20SwitchGroceryStoreHatDone = 12,
kAS20GrabJointDone = 13
};
enum {
kAS21TalkOldLady = 0,
kAS21GrabBanana = 1,
kAS21GrabBananaDone = 2,
kAS21GrabOldLady = 3,
kAS21UseHatWithOldLady = 4,
kAS21UseHatWithOldLadyDone = 5,
kAS21LeaveScene = 6
};
enum {
kAS22LeaveScene = 0,
kAS22TalkCashier = 1
};
enum {
kAS23LookCereals = 0,
kAS23GrabCereals = 1,
kAS23GrabCerealsDone = 2,
kAS23LeaveScene = 3
};
enum {
kAS24LeaveScene = 0
};
enum {
kAS25TalkTicketVendor = 0,
kAS25EnterCircusWihoutTicket = 1,
kAS25ShowTicketToVendor = 2,
kAS25ShowTicketToVendorDone = 3,
kAS25EnterCircusWihoutTicketDone = 4,
kAS25LeaveScene = 5
};
enum {
kAS26LeaveScene = 0
};
enum {
kAS27TalkJanitor = 0,
kAS27GrabBucket = 1,
kAS27GrabBucketDone = 2,
kAS27ShowPictureToJanitor = 3,
kAS27TryEnterClownTent = 4,
kAS27TryEnterClownTentDone = 5,
kAS27EnterClownTent = 6,
kAS27LeaveScene = 7
};
enum {
kAS28UseBeerBucketWithClown = 0,
kAS28UsePillBucketWithClown = 1,
kAS28GrabHornFails = 2,
kAS28GrabEmptyBucket = 3,
kAS28GrabHornSuccess = 4,
kAS28GrabHornSuccessDone = 5,
kAS28GrabEmptyBucketDone = 6,
kAS28GrabHornFailsDone = 7,
kAS28TalkClown = 8,
kAS28GnapWaiting = 9,
kAS28LeaveScene = 10
};
enum {
kAS29UseBananaWithMonkey = 0,
kAS29LeaveScene = 2
};
class GnapEngine;
class CutScene;
class Scene20: public Scene {
public:
Scene20(GnapEngine *vm);
~Scene20() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override;
private:
int _currStonerGuySequenceId;
int _nextStonerGuySequenceId;
int _currGroceryStoreGuySequenceId;
int _nextGroceryStoreGuySequenceId;
int _stonerGuyCtr;
int _groceryStoreGuyCtr;
bool _stonerGuyShowingJoint;
void stopSounds();
};
class Scene21: public Scene {
public:
Scene21(GnapEngine *vm);
~Scene21() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
private:
int _currOldLadySequenceId;
int _nextOldLadySequenceId;
};
class Scene22: public Scene {
public:
Scene22(GnapEngine *vm);
~Scene22() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
private:
int _currCashierSequenceId;
int _nextCashierSequenceId;
bool _caughtBefore;
int _cashierCtr;
};
class Scene23: public Scene {
public:
Scene23(GnapEngine *vm);
~Scene23() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
private:
int _currStoreClerkSequenceId;
int _nextStoreClerkSequenceId;
};
class Scene24: public Scene {
public:
Scene24(GnapEngine *vm);
~Scene24() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
private:
int _currWomanSequenceId;
int _nextWomanSequenceId;
int _boySequenceId;
int _girlSequenceId;
};
class Scene25: public Scene {
public:
Scene25(GnapEngine *vm);
~Scene25() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
private:
int _currTicketVendorSequenceId;
int _nextTicketVendorSequenceId;
void playAnims(int index);
};
class Scene26: public Scene {
public:
Scene26(GnapEngine *vm);
~Scene26() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
private:
int _currKidSequenceId;
int _nextKidSequenceId;
};
class Scene27: public Scene {
public:
Scene27(GnapEngine *vm);
~Scene27() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
private:
int _nextJanitorSequenceId;
int _currJanitorSequenceId;
};
class Scene28: public Scene {
public:
Scene28(GnapEngine *vm);
~Scene28() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
private:
int _currClownSequenceId;
int _nextClownSequenceId;
int _clownTalkCtr;
};
class Scene29: public Scene {
public:
Scene29(GnapEngine *vm);
~Scene29() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
private:
int _currMonkeySequenceId;
int _nextMonkeySequenceId;
int _currManSequenceId;
int _nextManSequenceId;
};
} // End of namespace Gnap
#endif // GNAP_GROUP1_H

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,239 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef GNAP_GROUP3_H
#define GNAP_GROUP3_H
#include "gnap/debugger.h"
namespace Gnap {
enum {
kHS30Platypus = 0,
kHS30PillMachine = 1,
kHS30Device = 2,
kHS30ExitCircus = 3,
kHS30WalkArea1 = 4
};
enum {
kHS31Platypus = 0,
kHS31MeasuringClown = 1,
kHS31BeerBarrel = 2,
kHS31Device = 3,
kHS31ExitCircus = 4,
kHS31ExitOutsideClown = 5,
kHS31WalkArea1 = 6
};
enum {
kHS32Platypus = 0,
kHS32ExitTruck = 1,
kHS32Device = 2,
kHS32WalkArea1 = 3,
kHS32WalkArea2 = 4,
kHS32WalkArea3 = 5,
kHS32WalkArea4 = 6,
kHS32WalkArea5 = 7,
kHS32WalkArea6 = 8,
kHS32WalkArea7 = 9,
kHS32WalkArea8 = 10
};
enum {
kHS33Platypus = 0,
kHS33Chicken = 1,
kHS33Device = 2,
kHS33ExitHouse = 3,
kHS33ExitBarn = 4,
kHS33ExitCreek = 5,
kHS33ExitPigpen = 6,
kHS33WalkArea1 = 7,
kHS33WalkArea2 = 8
};
enum {
kHS38Platypus = 0,
kHS38ExitHouse = 1,
kHS38ExitCave = 2,
kHS38TrapDoorLid1 = 3,
kHS38TrapDoorLid2 = 4,
kHS38HuntingTrophy = 5,
kHS38WalkArea1 = 6,
kHS38Device = 7,
kHS38WalkArea2 = 8,
kHS38WalkArea3 = 9,
kHS38WalkArea4 = 10,
kHS38WalkArea5 = 11,
kHS38WalkArea6 = 12
};
enum {
kHS39Platypus = 0,
kHS39ExitInsideHouse = 1,
kHS39ExitUfoParty = 2,
kHS39Sign = 3,
kHS39Device = 4,
kHS39WalkArea1 = 5,
kHS39WalkArea2 = 6
};
enum {
kAS30LeaveScene = 0,
kAS30UsePillMachine = 1,
kAS30UsePillMachine2 = 2,
kAS30LookPillMachine = 3,
kAS30UsePillMachine3 = 4,
kAS30UsePillMachine4 = 5
};
enum {
kAS31UseBeerBarrel = 1,
kAS31FillEmptyBucketWithBeer = 2,
kAS31FillEmptyBucketWithBeerDone = 3,
kAS31PlatMeasuringClown = 4,
kAS31UseMeasuringClown = 5,
kAS31LeaveScene = 6
};
enum {
kAS32LeaveScene = 0
};
enum {
kAS33LeaveScene = 0,
kAS33TalkChicken = 1,
kAS33UseChicken = 2,
kAS33UseChickenDone = 3
};
enum {
kAS38LeaveScene = 0,
kAS38ExitCave = 1,
kAS38UseHuntingTrophy = 2,
kAS38HoldingHuntingTrophy = 3,
kAS38ReleaseHuntingTrophy = 4,
kAS38UsePlatypusWithTrapDoor = 5,
kAS38PlatypusHoldingTrapDoor = 6
};
enum {
kAS39LeaveScene = 0
};
/*****************************************************************************/
class GnapEngine;
class CutScene;
class Scene30: public Scene {
public:
Scene30(GnapEngine *vm);
~Scene30() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
private:
int _kidSequenceId;
};
class Scene31: public Scene {
public:
Scene31(GnapEngine *vm);
~Scene31() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
private:
bool _beerGuyDistracted;
int _currClerkSequenceId;
int _nextClerkSequenceId;
int _clerkMeasureCtr;
int _clerkMeasureMaxCtr;
};
class Scene32: public Scene {
public:
Scene32(GnapEngine *vm);
~Scene32() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
};
class Scene33: public Scene {
public:
Scene33(GnapEngine *vm);
~Scene33() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
private:
int _currChickenSequenceId;
int _nextChickenSequenceId;
};
class Scene38: public Scene {
public:
Scene38(GnapEngine *vm);
~Scene38() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
};
class Scene39: public Scene {
public:
Scene39(GnapEngine *vm);
~Scene39() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
private:
int _currGuySequenceId;
int _nextGuySequenceId;
};
} // End of namespace Gnap
#endif // GNAP_GROUP3_H

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,297 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef GNAP_GROUP4_H
#define GNAP_GROUP4_H
#include "gnap/debugger.h"
namespace Gnap {
enum {
kHS40Platypus = 0,
kHS40ExitCave = 1,
kHS40ExitToyStand = 2,
kHS40ExitBBQ = 3,
kHS40ExitUfo = 4,
kHS40ExitKissinBooth = 5,
kHS40ExitDancefloor = 6,
kHS40ExitShoe = 7,
kHS40Device = 8
};
enum {
kHS41Platypus = 0,
kHS41ExitCave = 1,
kHS41Exit = 2,
kHS41ExitBBQ = 3,
kHS41ToyVendor = 4,
kHS41Kid = 5,
kHS41ToyUfo = 6,
kHS41Device = 7,
kHS41WalkArea1 = 8
};
enum {
kHS41UfoExitLeft = 1,
kHS41UfoExitRight = 2,
kHS41UfoDevice = 3,
kHS41UfoWalkArea1 = 4
};
enum {
kHS42Platypus = 0,
kHS42ExitUfoParty = 1,
kHS42ExitToyStand = 2,
kHS42ExitUfo = 3,
kHS42BBQVendor = 4,
kHS42ChickenLeg = 5,
kHS42Device = 6,
kHS42WalkArea1 = 7,
kHS42WalkArea2 = 8
};
enum {
kHS42UfoExitLeft = 1,
kHS42UfoExitRight = 2,
kHS42UfoHotSauce = 3,
kHS42UfoDevice = 4
};
enum {
kHS43Platypus = 0,
kHS43Device = 1,
kHS43ExitUfoParty = 2,
kHS43ExitBBQ = 3,
kHS43ExitKissinBooth = 4,
kHS43TwoHeadedGuy = 5,
kHS43Key = 6,
kHS43Ufo = 7,
kHS43WalkArea1 = 8,
kHS43WalkArea2 = 9
};
enum {
kHS43UfoExitLeft = 1,
kHS43UfoExitRight = 2,
kHS43UfoKey = 3,
kHS43UfoBucket = 4,
kHS43UfoDevice = 5
};
enum {
kHS44Platypus = 0,
kHS44ExitUfoParty = 1,
kHS44ExitUfo = 2,
kHS44ExitShow = 3,
kHS44KissingLady = 4,
kHS44Spring = 5,
kHS44SpringGuy = 6,
kHS44Device = 7,
kHS44WalkArea1 = 8,
kHS44WalkArea2 = 9
};
enum {
kHS44UfoExitLeft = 1,
kHS44UfoExitRight = 2,
kHS44UfoDevice = 3
};
enum {
kHS45Platypus = 0,
kHS45ExitUfoParty = 1,
kHS45ExitShoe = 2,
kHS45ExitRight = 3,
kHS45ExitDiscoBall = 4,
kHS45DiscoBall = 5,
kHS45Device = 6,
kHS45WalkArea1 = 7
};
enum {
kHS45UfoExitLeft = 1,
kHS45UfoExitRight = 2,
kHS45UfoDevice = 3
};
enum {
kHS46Platypus = 0,
kHS46ExitUfoParty = 1,
kHS46ExitKissinBooth = 2,
kHS46ExitDisco = 3,
kHS46SackGuy = 4,
kHS46ItchyGuy = 5,
kHS46Device = 6,
kHS46WalkArea1 = 7
};
enum {
kHS46UfoExitLeft = 1,
kHS46UfoExitRight = 2,
kHS46UfoDevice = 3
};
enum {
kAS41LeaveScene = 0,
kAS41UseQuarterWithToyVendor = 1,
kAS41TalkToyVendor = 2,
kAS41UseGumWithToyUfo = 3,
kAS41UseChickenBucketWithKid = 4,
kAS41GrabKid = 5,
kAS41GiveBackToyUfo = 6,
kAS41ToyUfoLeaveScene = 7,
kAS41ToyUfoRefresh = 8,
kAS41UfoGumAttached = 9
};
enum {
kAS42LeaveScene = 0,
kAS42TalkBBQVendor = 1,
kAS42UseQuarterWithBBQVendor = 2,
kAS42UseQuarterWithBBQVendorDone = 3,
kAS42GrabChickenLeg = 4,
kAS42ToyUfoLeaveScene = 5,
kAS42ToyUfoRefresh = 6,
kAS42ToyUfoPickUpHotSauce = 7
};
/*****************************************************************************/
class GnapEngine;
class CutScene;
class Scene40: public Scene {
public:
Scene40(GnapEngine *vm);
~Scene40() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
};
class Scene41: public Scene {
public:
Scene41(GnapEngine *vm);
~Scene41() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
private:
int _currKidSequenceId;
int _nextKidSequenceId;
int _currToyVendorSequenceId;
int _nextToyVendorSequenceId;
};
class Scene42: public Scene {
public:
Scene42(GnapEngine *vm);
~Scene42() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
private:
int _currBBQVendorSequenceId;
int _nextBBQVendorSequenceId;
};
class Scene43: public Scene {
public:
Scene43(GnapEngine *vm);
~Scene43() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
private:
int _currTwoHeadedGuySequenceId;
int _nextTwoHeadedGuySequenceId;
};
class Scene44: public Scene {
public:
Scene44(GnapEngine *vm);
~Scene44() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
private:
int _nextSpringGuySequenceId;
int _nextKissingLadySequenceId;
int _currSpringGuySequenceId;
int _currKissingLadySequenceId;
};
class Scene45: public Scene {
public:
Scene45(GnapEngine *vm);
~Scene45() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
private:
int _currDancerSequenceId;
};
class Scene46: public Scene {
public:
Scene46(GnapEngine *vm);
~Scene46() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override;
void updateAnimationsCb() override {};
private:
int _currSackGuySequenceId;
int _nextItchyGuySequenceId;
int _nextSackGuySequenceId;
int _currItchyGuySequenceId;
};
} // End of namespace Gnap
#endif // GNAP_GROUP4_H

View File

@@ -0,0 +1,384 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "gnap/gnap.h"
#include "gnap/gamesys.h"
#include "gnap/resource.h"
#include "gnap/scenes/group5.h"
namespace Gnap {
Scene53::Scene53(GnapEngine *vm) : Scene(vm) {
_isGnapPhoning = false;
_currHandSequenceId = -1;
_callsMadeCtr = 0;
_callsRndUsed = 0;
}
int Scene53::init() {
GameSys& gameSys = *_vm->_gameSys;
gameSys.setAnimation(0, 0, 0);
gameSys.setAnimation(0, 0, 1);
return 0x75;
}
void Scene53::updateHotspots() {
_vm->setHotspot(kHS53Platypus, 0, 0, 0, 0, SF_WALKABLE | SF_TALK_CURSOR | SF_GRAB_CURSOR | SF_LOOK_CURSOR);
_vm->setHotspot(kHS53PhoneKey1, 336, 238, 361, 270, SF_GRAB_CURSOR);
_vm->setHotspot(kHS53PhoneKey2, 376, 243, 405, 274, SF_GRAB_CURSOR);
_vm->setHotspot(kHS53PhoneKey3, 415, 248, 441, 276, SF_GRAB_CURSOR);
_vm->setHotspot(kHS53PhoneKey4, 329, 276, 358, 303, SF_GRAB_CURSOR);
_vm->setHotspot(kHS53PhoneKey5, 378, 282, 408, 311, SF_GRAB_CURSOR);
_vm->setHotspot(kHS53PhoneKey6, 417, 286, 446, 319, SF_GRAB_CURSOR);
_vm->setHotspot(kHS53PhoneKey7, 332, 311, 361, 342, SF_GRAB_CURSOR);
_vm->setHotspot(kHS53PhoneKey8, 376, 318, 407, 349, SF_GRAB_CURSOR);
_vm->setHotspot(kHS53PhoneKey9, 417, 320, 447, 353, SF_GRAB_CURSOR);
_vm->setHotspot(kHS53PhoneKey0, 377, 352, 405, 384, SF_GRAB_CURSOR);
_vm->setHotspot(kHS53PhoneKeySharp, 419, 358, 450, 394, SF_GRAB_CURSOR);
_vm->setHotspot(kHS53PhoneKeyStar, 328, 346, 359, 379, SF_GRAB_CURSOR);
_vm->setHotspot(kHS53PhoneExit, 150, 585, 650, 600, SF_EXIT_D_CURSOR);
_vm->setDeviceHotspot(kHS53Device, -1, -1, -1, -1);
_vm->_hotspotsCount = 15;
}
int Scene53::pressPhoneNumberButton(int phoneNumber, int buttonNum) {
static const int kGnapHandSequenceIds[13] = {
0x00,
0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B,
0x4C, 0x4D, 0x4E, 0x50, 0x51, 0x4F
};
static const int kPlatypusHandSequenceIds[13] = {
0x00,
0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
0x58, 0x59, 0x5A, 0x5C, 0x5D, 0x5B
};
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
if (_isGnapPhoning) {
gameSys.setAnimation(kGnapHandSequenceIds[buttonNum], 40, 6);
gameSys.insertSequence(kGnapHandSequenceIds[buttonNum], 40, _currHandSequenceId, 40, kSeqSyncWait, 0, 0, 0);
_currHandSequenceId = kGnapHandSequenceIds[buttonNum];
} else {
gameSys.setAnimation(kPlatypusHandSequenceIds[buttonNum], 40, 6);
gameSys.insertSequence(kPlatypusHandSequenceIds[buttonNum], 40, _currHandSequenceId, 40, kSeqSyncWait, 0, 0, 0);
_currHandSequenceId = kPlatypusHandSequenceIds[buttonNum];
}
gnap._actionStatus = 6;
while (gameSys.getAnimationStatus(6) != 2 && !_vm->_gameDone) {
_vm->updateMouseCursor();
_vm->gameUpdateTick();
}
gnap._actionStatus = -1;
if (buttonNum < 11)
phoneNumber = buttonNum % 10 + 10 * phoneNumber;
return phoneNumber;
}
int Scene53::getRandomCallIndex() {
int index, tries = 0;
if (_callsRndUsed == 0x7FFF)
_callsRndUsed = 0;
do {
index = _vm->getRandom(16);
if (++tries == 300)
_callsRndUsed = 0;
} while (_callsRndUsed & (1 << index));
_callsRndUsed |= (1 << index);
return index;
}
void Scene53::runRandomCall() {
static const int kCallSequenceIds[15] = {
0x60, 0x61, 0x62, 0x63, 0x64,
0x65, 0x66, 0x67, 0x68, 0x69,
0x6A, 0x6B, 0x6C, 0x6D, 0x71
};
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
++_callsMadeCtr;
if (_callsMadeCtr <= 10) {
int index;
do {
index = getRandomCallIndex();
} while (!_isGnapPhoning && (index == 0 || index == 3 || index == 4 || index == 11));
gameSys.setAnimation(kCallSequenceIds[index], 1, 6);
gameSys.insertSequence(kCallSequenceIds[index], 1, 0, 0, kSeqNone, 16, 0, 0);
} else {
gameSys.setAnimation(0x74, 1, 6);
gameSys.insertSequence(0x74, 1, 0, 0, kSeqNone, 16, 0, 0);
_callsMadeCtr = 0;
}
gnap._actionStatus = 1;
while (gameSys.getAnimationStatus(6) != 2 && !_vm->_gameDone) {
_vm->updateMouseCursor();
_vm->gameUpdateTick();
}
gnap._actionStatus = -1;
}
void Scene53::runChitChatLine() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
bool flag = false;
int sequenceId = -1;
gameSys.setAnimation(0x6E, 1, 6);
gameSys.insertSequence(0x6E, 1, 0, 0, kSeqNone, 16, 0, 0);
gnap._actionStatus = 1;
while (gameSys.getAnimationStatus(6) != 2 && !_vm->_gameDone) {
_vm->updateMouseCursor();
_vm->gameUpdateTick();
}
gnap._actionStatus = -1;
if (_vm->isFlag(kGFSpringTaken)) {
gameSys.insertSequence(0x45, 40, _currHandSequenceId, 40, kSeqSyncWait, 0, 0, 0);
_currHandSequenceId = 0x45;
} else {
gameSys.insertSequence(0x45, 40, _currHandSequenceId, 40, kSeqSyncWait, 0, 0, 0);
_currHandSequenceId = 0x5E;
}
_vm->_hotspots[kHS53Device]._flags = SF_DISABLED;
while (!flag) {
_vm->updateMouseCursor();
_vm->updateCursorByHotspot();
_vm->testWalk(0, 0, -1, -1, -1, -1);
_vm->_sceneClickedHotspot = _vm->getClickedHotspotId();
_vm->updateGrabCursorSprite(0, 0);
switch (_vm->_sceneClickedHotspot) {
case 2:
sequenceId = 0x6F;
flag = 1;
break;
case 3:
sequenceId = 0x70;
flag = 1;
break;
case 4:
sequenceId = 0x71;
flag = 1;
break;
case 14:
sequenceId = -1;
flag = 1;
_vm->_isLeavingScene = true;
_vm->_sceneDone = true;
gnap._actionStatus = 0;
_vm->_newSceneNum = 17;
break;
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
case 11:
case 12:
case 13:
pressPhoneNumberButton(0, _vm->_sceneClickedHotspot - 1);
break;
default:
break;
}
if (flag && sequenceId != -1) {
_vm->stopSound(0xA0);
pressPhoneNumberButton(0, _vm->_sceneClickedHotspot - 1);
gnap._actionStatus = 1;
gameSys.setAnimation(sequenceId, 1, 6);
gameSys.insertSequence(sequenceId, 1, 0, 0, kSeqNone, 16, 0, 0);
gnap._actionStatus = 1;
while (gameSys.getAnimationStatus(6) != 2 && !_vm->_gameDone) {
_vm->updateMouseCursor();
_vm->gameUpdateTick();
}
gnap._actionStatus = -1;
gameSys.setAnimation(0x72, 1, 6);
gameSys.insertSequence(0x72, 1, 0, 0, kSeqNone, 16, 0, 0);
gnap._actionStatus = 1;
while (gameSys.getAnimationStatus(6) != 2 && !_vm->_gameDone) {
_vm->updateMouseCursor();
_vm->gameUpdateTick();
}
gnap._actionStatus = -1;
}
}
updateHotspots();
gnap._actionStatus = 1;
if (_vm->isFlag(kGFSpringTaken)) {
gameSys.setAnimation(0x73, 40, 6);
gameSys.insertSequence(0x73, 40, _currHandSequenceId, 40, kSeqSyncWait, 0, 0, 0);
while (gameSys.getAnimationStatus(6) != 2 && !_vm->_gameDone) {
_vm->updateMouseCursor();
_vm->gameUpdateTick();
}
_currHandSequenceId = 0x73;
gnap._actionStatus = -1;
}
}
void Scene53::run() {
GameSys& gameSys = *_vm->_gameSys;
PlayerGnap& gnap = *_vm->_gnap;
int phoneNumber = 0;
int phoneNumberLen = 0;
_vm->queueInsertDeviceIcon();
if (_vm->isFlag(kGFSpringTaken)) {
_currHandSequenceId = 0x45;
_isGnapPhoning = true;
} else {
_currHandSequenceId = 0x5E;
_isGnapPhoning = false;
}
gameSys.insertSequence(_currHandSequenceId, 40, 0, 0, kSeqNone, 0, 0, 0);
_vm->endSceneInit();
_vm->setVerbCursor(GRAB_CURSOR);
_vm->playSound(0xA0, true);
while (!_vm->_sceneDone) {
_vm->updateMouseCursor();
_vm->updateCursorByHotspot();
_vm->testWalk(0, 0, -1, -1, -1, -1);
_vm->_sceneClickedHotspot = _vm->getClickedHotspotId();
_vm->updateGrabCursorSprite(0, 0);
switch (_vm->_sceneClickedHotspot) {
case kHS53Device:
if (gnap._actionStatus < 0) {
_vm->runMenu();
updateHotspots();
}
break;
case kHS53PhoneKey1:
case kHS53PhoneKey2:
case kHS53PhoneKey3:
case kHS53PhoneKey4:
case kHS53PhoneKey5:
case kHS53PhoneKey6:
case kHS53PhoneKey7:
case kHS53PhoneKey8:
case kHS53PhoneKey9:
case kHS53PhoneKey0:
_vm->stopSound(0xA0);
++phoneNumberLen;
phoneNumber = pressPhoneNumberButton(phoneNumber, _vm->_sceneClickedHotspot - 1);
debugC(kDebugBasic, "phoneNumber: %d", phoneNumber);
if (phoneNumberLen == 7) {
gnap._actionStatus = 1;
if (_vm->isFlag(kGFSpringTaken)) {
gameSys.setAnimation(0x73, 40, 6);
gameSys.insertSequence(0x73, 40, _currHandSequenceId, 40, kSeqSyncWait, 0, 0, 0);
while (gameSys.getAnimationStatus(6) != 2 && !_vm->_gameDone) {
_vm->updateMouseCursor();
_vm->gameUpdateTick();
}
_currHandSequenceId = 0x73;
gnap._actionStatus = -1;
}
if (phoneNumber == 7284141) {
runChitChatLine();
phoneNumber = 0;
phoneNumberLen = 0;
_vm->_sceneDone = true;
_vm->_newSceneNum = 17;
} else if (phoneNumber != 5556789 || _vm->isFlag(kGFPictureTaken)) {
runRandomCall();
phoneNumber = 0;
phoneNumberLen = 0;
_vm->_sceneDone = true;
_vm->_newSceneNum = 17;
} else {
phoneNumber = 0;
phoneNumberLen = 0;
_vm->_sceneDone = true;
_vm->_newSceneNum = 17;
if (_isGnapPhoning)
_vm->setFlag(kGFUnk25);
else
_vm->setFlag(kGFPlatypusTalkingToAssistant);
}
}
break;
case kHS53PhoneKeySharp:
case kHS53PhoneKeyStar:
pressPhoneNumberButton(0, _vm->_sceneClickedHotspot - 1);
break;
case kHS53PhoneExit:
if (gnap._actionStatus < 0) {
gnap._actionStatus = 1;
if (_vm->isFlag(kGFSpringTaken)) {
gameSys.setAnimation(0x73, 40, 6);
gameSys.insertSequence(0x73, 40, _currHandSequenceId, 40, kSeqSyncWait, 0, 0, 0);
while (gameSys.getAnimationStatus(6) != 2 && !_vm->_gameDone) {
_vm->updateMouseCursor();
_vm->gameUpdateTick();
}
_currHandSequenceId = 0x73;
gnap._actionStatus = -1;
}
_vm->_isLeavingScene = true;
_vm->_sceneDone = true;
gnap._actionStatus = 0;
_vm->_newSceneNum = 17;
}
break;
default:
break;
}
_vm->checkGameKeys();
if (_vm->isKeyStatus1(Common::KEYCODE_BACKSPACE)) {
_vm->clearKeyStatus1(Common::KEYCODE_BACKSPACE);
_vm->runMenu();
updateHotspots();
}
_vm->gameUpdateTick();
}
}
} // End of namespace Gnap

View File

@@ -0,0 +1,76 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef GNAP_GROUP5_H
#define GNAP_GROUP5_H
#include "gnap/debugger.h"
#include "gnap/scenes/scenecore.h"
namespace Gnap {
enum {
kHS53Platypus = 0,
kHS53Device = 1,
kHS53PhoneKey1 = 2,
kHS53PhoneKey2 = 3,
kHS53PhoneKey3 = 4,
kHS53PhoneKey4 = 5,
kHS53PhoneKey5 = 6,
kHS53PhoneKey6 = 7,
kHS53PhoneKey7 = 8,
kHS53PhoneKey8 = 9,
kHS53PhoneKey9 = 10,
kHS53PhoneKey0 = 11,
kHS53PhoneKeySharp = 12,
kHS53PhoneKeyStar = 13,
kHS53PhoneExit = 14
};
/*****************************************************************************/
class GnapEngine;
class Scene53: public Scene {
public:
Scene53(GnapEngine *vm);
~Scene53() override {}
int init() override;
void updateHotspots() override;
void run() override;
void updateAnimations() override {};
void updateAnimationsCb() override {};
private:
bool _isGnapPhoning;
int _currHandSequenceId;
int _callsMadeCtr;
uint _callsRndUsed;
int pressPhoneNumberButton(int phoneNumber, int buttonNum);
int getRandomCallIndex();
void runRandomCall();
void runChitChatLine();
};
} // End of namespace Gnap
#endif // GNAP_GROUP5_H

View File

@@ -0,0 +1,429 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "gnap/gnap.h"
#include "gnap/gamesys.h"
#include "gnap/resource.h"
#include "gnap/scenes/groupcs.h"
namespace Gnap {
Scene16::Scene16(GnapEngine *vm) : CutScene(vm) {}
int Scene16::init() {
_sequenceIdArr[0] = 0x1F2;
_sequenceIdArr[1] = 0x201;
_sequenceIdArr[2] = 0x1FC;
_sequenceIdArr[3] = 0x1F4;
_sequenceIdArr[4] = 0x1FB;
_sequenceIdArr[5] = 0x1F0;
_sequenceIdArr[6] = 0x1FD;
_sequenceIdArr[7] = 0x1FE;
_sequenceIdArr[8] = 0x1F7;
_sequenceIdArr[9] = 0x1F9;
_sequenceIdArr[10] = 0x1F8;
_sequenceIdArr[11] = 0x1F1;
_sequenceIdArr[12] = 0x202;
_sequenceIdArr[13] = 0x1F6;
_sequenceIdArr[14] = 0x1F3;
_sequenceIdArr[15] = 0x1FA;
_sequenceIdArr[16] = 0x1FF;
_sequenceIdArr[17] = 0x200;
_sequenceIdArr[18] = 0x203;
_sequenceIdArr[19] = 0x206;
_sequenceIdArr[20] = 0x207;
_sequenceIdArr[21] = 0x204;
_sequenceIdArr[22] = 0x205;
_resourceIdArr[0] = 0x1C;
_resourceIdArr[1] = 2;
_resourceIdArr[2] = 0x1B;
_resourceIdArr[3] = 0;
_resourceIdArr[4] = 0x167;
_resourceIdArr[5] = 1;
_resourceIdArr[6] = 0x15B;
_resourceIdArr[7] = 0x15A;
_resourceIdArr[8] = 0x170;
_resourceIdArr[9] = 0x1EB;
_resourceIdArr[10] = 0x1EC;
_resourceIdArr[11] = 0x1BE;
_resourceIdArr[12] = 0x1BF;
_sequenceCountArr[0] = 4;
_sequenceCountArr[1] = 1;
_sequenceCountArr[2] = 1;
_sequenceCountArr[3] = 6;
_sequenceCountArr[4] = 1;
_sequenceCountArr[5] = 3;
_sequenceCountArr[6] = 1;
_sequenceCountArr[7] = 1;
_sequenceCountArr[8] = 1;
_sequenceCountArr[9] = 1;
_sequenceCountArr[10] = 1;
_sequenceCountArr[11] = 1;
_sequenceCountArr[12] = 1;
_itemsCount = 13;
return -1;
}
/*****************************************************************************/
Scene471::Scene471(GnapEngine *vm) : CutScene(vm) {}
int Scene471::init() {
_sequenceIdArr[0] = 0x301;
_sequenceIdArr[1] = 0x305;
_sequenceIdArr[2] = 0x302;
_sequenceIdArr[3] = 0x304;
_sequenceIdArr[4] = 0x300;
_resourceIdArr[0] = 3;
_resourceIdArr[1] = 0;
_resourceIdArr[2] = 1;
_resourceIdArr[3] = 0;
_resourceIdArr[4] = 2;
_sequenceCountArr[0] = 1;
_sequenceCountArr[1] = 1;
_sequenceCountArr[2] = 1;
_sequenceCountArr[3] = 1;
_sequenceCountArr[4] = 1;
_canSkip[0] = false;
_canSkip[1] = false;
_canSkip[2] = false;
_canSkip[3] = false;
_canSkip[4] = false;
_itemsCount = 5;
return -1;
}
Scene472::Scene472(GnapEngine *vm) : CutScene(vm) {}
int Scene472::init() {
_sequenceIdArr[0] = 0x306;
_sequenceIdArr[1] = 0x309;
_sequenceIdArr[2] = 0x307;
_sequenceIdArr[3] = 0x308;
_sequenceIdArr[4] = 0x30A;
_resourceIdArr[0] = 0x8E;
_resourceIdArr[1] = 0x90;
_resourceIdArr[2] = 0x8F;
_resourceIdArr[3] = 0x91;
_sequenceCountArr[0] = 2;
_sequenceCountArr[1] = 1;
_sequenceCountArr[2] = 1;
_sequenceCountArr[3] = 1;
_canSkip[0] = false;
_canSkip[1] = false;
_canSkip[2] = false;
_canSkip[3] = false;
_itemsCount = 4;
return -1;
}
Scene473::Scene473(GnapEngine *vm) : CutScene(vm) {}
int Scene473::init() {
_sequenceIdArr[0] = 0x320;
_sequenceIdArr[1] = 0x321;
_resourceIdArr[0] = 0x142;
_resourceIdArr[1] = 0x143;
_sequenceCountArr[0] = 1;
_sequenceCountArr[1] = 1;
_canSkip[0] = false;
_canSkip[1] = false;
_itemsCount = 2;
return -1;
}
Scene474::Scene474(GnapEngine *vm) : CutScene(vm) {}
int Scene474::init() {
_sequenceIdArr[0] = 0x30C;
_sequenceIdArr[1] = 0x30D;
_sequenceIdArr[2] = 0x30B;
_resourceIdArr[0] = 0x142;
_resourceIdArr[1] = 0x141;
_resourceIdArr[2] = 0x177;
_sequenceCountArr[0] = 1;
_sequenceCountArr[1] = 1;
_sequenceCountArr[2] = 1;
_canSkip[0] = false;
_canSkip[1] = false;
_canSkip[2] = false;
_itemsCount = 3;
return -1;
}
Scene475::Scene475(GnapEngine *vm) : CutScene(vm) {}
int Scene475::init() {
_sequenceIdArr[0] = 0x30E;
_sequenceIdArr[1] = 0x30F;
_sequenceIdArr[2] = 0x310;
_sequenceIdArr[3] = 0x311;
_resourceIdArr[0] = 0x206;
_resourceIdArr[1] = 0x207;
_sequenceCountArr[0] = 3;
_sequenceCountArr[1] = 1;
_canSkip[0] = false;
_canSkip[1] = false;
_itemsCount = 2;
return -1;
}
Scene476::Scene476(GnapEngine *vm) : CutScene(vm) {}
int Scene476::init() {
_sequenceIdArr[0] = 0x31E;
_sequenceIdArr[1] = 0x31F;
_resourceIdArr[0] = 0x2FA;
_sequenceCountArr[0] = 2;
_canSkip[0] = false;
_itemsCount = 1;
return -1;
}
Scene477::Scene477(GnapEngine *vm) : CutScene(vm) {}
int Scene477::init() {
int v0, v4, v2, v3;
_sequenceIdArr[0] = 0x316;
_sequenceIdArr[1] = 0x31A;
_sequenceIdArr[2] = 0x314;
_sequenceIdArr[3] = 0x31B;
int v1 = 4;
if (!_vm->isFlag(kGFTwigTaken)) {
_sequenceIdArr[4] = 0x31C;
v1 = 5;
}
if (!_vm->isFlag(kGFPlatypusTalkingToAssistant))
_sequenceIdArr[v1++] = 0x31D;
v4 = v1;
_sequenceIdArr[v1] = 0x319;
v0 = v1 + 1;
v3 = v0;
_sequenceIdArr[v0++] = 0x317;
_sequenceIdArr[v0++] = 0x312;
_sequenceIdArr[v0] = 0x31A;
v2 = v0 + 1;
if (!_vm->isFlag(kGFTwigTaken))
_sequenceIdArr[v2++] = 0x31C;
if (!_vm->isFlag(kGFPlatypusTalkingToAssistant))
_sequenceIdArr[v2++] = 0x31D;
_sequenceIdArr[v2] = 0x313;
_sequenceIdArr[v2 + 1] = 0x315;
_resourceIdArr[0] = 0x2B8;
_resourceIdArr[1] = 0x20C;
_resourceIdArr[2] = 0x2B8;
_resourceIdArr[3] = 0x20B;
_resourceIdArr[4] = 0x20B;
_sequenceCountArr[0] = v4;
_sequenceCountArr[1] = 1;
_sequenceCountArr[2] = v2 - v3;
_sequenceCountArr[3] = 1;
_sequenceCountArr[4] = 1;
_canSkip[0] = false;
_canSkip[1] = false;
_canSkip[2] = false;
_canSkip[3] = false;
_canSkip[4] = false;
_itemsCount = 5;
return -1;
}
/*****************************************************************************/
Scene48::Scene48(GnapEngine *vm) : CutScene(vm) {}
int Scene48::init() {
_sequenceIdArr[0] = 390;
_sequenceIdArr[1] = 391;
_sequenceIdArr[2] = 392;
_sequenceIdArr[3] = 393;
_sequenceIdArr[4] = 394;
_sequenceIdArr[5] = 395;
_sequenceIdArr[6] = 396;
_sequenceIdArr[7] = 397;
_sequenceIdArr[8] = 398;
_sequenceIdArr[9] = 399;
_sequenceIdArr[10] = 400;
_sequenceIdArr[11] = 401;
_sequenceIdArr[12] = 402;
_resourceIdArr[0] = 238;
_resourceIdArr[1] = 42;
_resourceIdArr[2] = 2;
_resourceIdArr[3] = 37;
_resourceIdArr[4] = 35;
_resourceIdArr[5] = 38;
_resourceIdArr[6] = 39;
_resourceIdArr[7] = 40;
_resourceIdArr[8] = 41;
_resourceIdArr[9] = 36;
_resourceIdArr[10] = 41;
_resourceIdArr[11] = 388;
_resourceIdArr[12] = 387;
_sequenceCountArr[0] = 1;
_sequenceCountArr[1] = 1;
_sequenceCountArr[2] = 1;
_sequenceCountArr[3] = 1;
_sequenceCountArr[4] = 1;
_sequenceCountArr[5] = 1;
_sequenceCountArr[6] = 1;
_sequenceCountArr[7] = 1;
_sequenceCountArr[8] = 1;
_sequenceCountArr[9] = 1;
_sequenceCountArr[10] = 1;
_sequenceCountArr[11] = 1;
_sequenceCountArr[12] = 1;
_canSkip[0] = false;
_canSkip[1] = false;
_canSkip[2] = false;
_canSkip[3] = false;
_canSkip[4] = false;
_canSkip[5] = false;
_canSkip[6] = false;
_canSkip[7] = false;
_canSkip[8] = false;
_canSkip[9] = false;
_canSkip[10] = false;
_canSkip[11] = false;
_canSkip[12] = false;
_itemsCount = 13;
return -1;
}
/*****************************************************************************/
Scene541::Scene541(GnapEngine *vm) : CutScene(vm) {}
int Scene541::init() {
_sequenceIdArr[0] = 0x1BE;
_sequenceIdArr[1] = 0x1BF;
_sequenceIdArr[2] = 0x1BA;
_sequenceIdArr[3] = 0x1BB;
_sequenceIdArr[4] = 0x1BD;
_sequenceIdArr[5] = 0x1BC;
_resourceIdArr[0] = 0x3C;
_resourceIdArr[1] = 0x43;
_resourceIdArr[2] = 0x44;
if (_vm->isFlag(kGFPictureTaken))
_resourceIdArr[3] = 0x47;
else
_resourceIdArr[3] = 0x46;
_resourceIdArr[4] = 0x45;
_sequenceCountArr[0] = 1;
_sequenceCountArr[1] = 1;
_sequenceCountArr[2] = 1;
_sequenceCountArr[3] = 2;
_sequenceCountArr[4] = 1;
_canSkip[0] = false;
_canSkip[1] = false;
_canSkip[2] = false;
_canSkip[3] = false;
_canSkip[4] = false;
_itemsCount = 5;
return -1;
}
Scene542::Scene542(GnapEngine *vm) : CutScene(vm) {}
int Scene542::init() {
_sequenceIdArr[0] = 0x1C9;
_sequenceIdArr[1] = 0x1C7;
_sequenceIdArr[2] = 0x1CC;
_sequenceIdArr[3] = 0x1C8;
_sequenceIdArr[4] = 0x1CB;
_sequenceIdArr[5] = 0x1C0;
_sequenceIdArr[6] = 0x1CA;
_sequenceIdArr[7] = 0x1CE;
_sequenceIdArr[8] = 0x1CD;
_sequenceIdArr[9] = 0x1C1;
_sequenceIdArr[10] = 0x1C2;
_sequenceIdArr[11] = 0x1C3;
_sequenceIdArr[12] = 0x1C4;
_sequenceIdArr[13] = 0x1C6;
_sequenceIdArr[14] = 0x1C5;
_sequenceIdArr[15] = 0x1D0;
_sequenceIdArr[16] = 0x1D0;
_sequenceIdArr[17] = 0x1D0;
_resourceIdArr[0] = 0xD5;
_resourceIdArr[1] = 0x14C;
_resourceIdArr[2] = 0xD5;
_resourceIdArr[3] = 0xBF;
_resourceIdArr[4] = 0xD6;
_resourceIdArr[5] = 0x154;
_resourceIdArr[6] = 0x155;
_resourceIdArr[7] = 0xB9;
_resourceIdArr[8] = 0xBA;
_resourceIdArr[9] = 0x17B;
_resourceIdArr[10] = 0x17A;
_resourceIdArr[11] = 0x17C;
_resourceIdArr[12] = 0x17A;
_resourceIdArr[13] = 0x1B7;
_resourceIdArr[14] = 0x1B8;
_resourceIdArr[15] = 0x1B9;
_sequenceCountArr[0] = 2;
_sequenceCountArr[1] = 1;
_sequenceCountArr[2] = 2;
_sequenceCountArr[3] = 1;
_sequenceCountArr[4] = 1;
_sequenceCountArr[5] = 1;
_sequenceCountArr[6] = 1;
_sequenceCountArr[7] = 1;
_sequenceCountArr[8] = 1;
_sequenceCountArr[9] = 1;
_sequenceCountArr[10] = 1;
_sequenceCountArr[11] = 1;
_sequenceCountArr[12] = 1;
_sequenceCountArr[13] = 1;
_sequenceCountArr[14] = 1;
_sequenceCountArr[15] = 1;
_canSkip[0] = false;
_canSkip[1] = false;
_canSkip[2] = false;
_canSkip[3] = false;
_canSkip[4] = false;
_canSkip[5] = false;
_canSkip[6] = false;
_canSkip[7] = false;
_canSkip[8] = false;
_canSkip[9] = false;
_canSkip[10] = false;
_canSkip[11] = false;
_canSkip[12] = false;
_canSkip[13] = true;
_canSkip[14] = true;
_canSkip[15] = false;
_itemsCount = 16;
return -1;
}
} // End of namespace Gnap

View File

@@ -0,0 +1,121 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef GNAP_GROUPCS_H
#define GNAP_GROUPCS_H
#include "gnap/debugger.h"
namespace Gnap {
class GnapEngine;
class CutScene;
class Scene16: public CutScene {
public:
Scene16(GnapEngine *vm);
~Scene16() override {}
int init() override;
};
class Scene471: public CutScene {
public:
Scene471(GnapEngine *vm);
~Scene471() override {}
int init() override;
};
class Scene472: public CutScene {
public:
Scene472(GnapEngine *vm);
~Scene472() override {}
int init() override;
};
class Scene473: public CutScene {
public:
Scene473(GnapEngine *vm);
~Scene473() override {}
int init() override;
};
class Scene474: public CutScene {
public:
Scene474(GnapEngine *vm);
~Scene474() override {}
int init() override;
};
class Scene475: public CutScene {
public:
Scene475(GnapEngine *vm);
~Scene475() override {}
int init() override;
};
class Scene476: public CutScene {
public:
Scene476(GnapEngine *vm);
~Scene476() override {}
int init() override;
};
class Scene477: public CutScene {
public:
Scene477(GnapEngine *vm);
~Scene477() override {}
int init() override;
};
class Scene48: public CutScene {
public:
Scene48(GnapEngine *vm);
~Scene48() override {}
int init() override;
};
class Scene541: public CutScene {
public:
Scene541(GnapEngine *vm);
~Scene541() override {}
int init() override;
};
class Scene542: public CutScene {
public:
Scene542(GnapEngine *vm);
~Scene542() override {}
int init() override;
};
} // End of namespace Gnap
#endif // GNAP_GROUPCS_H

View File

@@ -0,0 +1,183 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "video/avi_decoder.h"
#include "gnap/gnap.h"
#include "gnap/gamesys.h"
#include "gnap/resource.h"
#include "gnap/scenes/intro.h"
namespace Gnap {
SceneIntro::SceneIntro(GnapEngine *vm) : Scene(vm) {
}
int SceneIntro::init() {
return 0x37C;
}
void SceneIntro::run() {
const int animIdArr[] = {
0x356, 0x357, 0x358, 0x35A, 0x35F,
0x360, 0x361, 0x362, 0x363, 0x364,
0x365, 0x368, 0x369, 0x36B, 0x378,
0x36C, 0x36D, 0x36E, 0x36F, 0x370,
0x371, 0x372, 0x373, 0x374, 0x375,
0x376, 0x377, 0x378, 0x379, 0x37A,
0x37B, 0};
const int backgroundIdArr[] = {
0x354, 0x355, 0, 1, 3,
4, 5, 6, 7, 8,
7, 9, 0xA, 0xB, 0xC,
0xD, 0xE, 0xF, 0x10, 0x11,
0x12, 0x13, 0x17, 0x14, 0x19,
0x1A, 0x14, 0x15, 0x16, 0x14,
0x19, 0};
GameSys& gameSys = *_vm->_gameSys;
int index = 0;
bool skip = false;
_vm->hideCursor();
_vm->_dat->open(1, "musop_n.dat");
Video::VideoDecoder *videoDecoder = new Video::AVIDecoder();
if (!videoDecoder->loadFile("hoffman.avi")) {
delete videoDecoder;
warning("Unable to open video 'hoffman.avi' - Skipping intro");
return;
}
videoDecoder->start();
int vidPosX = (800 - videoDecoder->getWidth()) / 2;
int vidPosY = (600 - videoDecoder->getHeight()) / 2;
bool skipVideo = false;
_vm->screenEffect(1, 255, 255, 255);
while (!_vm->shouldQuit() && !videoDecoder->endOfVideo() && !skipVideo) {
if (videoDecoder->needsUpdate()) {
const Graphics::Surface *frame = videoDecoder->decodeNextFrame();
if (frame) {
if (frame->format.bytesPerPixel == 1) {
_vm->_system->copyRectToScreen(frame->getPixels(), frame->pitch, vidPosX, vidPosY, frame->w, frame->h);
} else if (frame->format.bytesPerPixel != 4) {
Graphics::Surface *frame1 = frame->convertTo(_vm->_system->getScreenFormat());
_vm->_system->copyRectToScreen(frame1->getPixels(), frame1->pitch, vidPosX, vidPosY, frame1->w, frame1->h);
frame1->free();
delete frame1;
} else {
Graphics::Surface *frame1 = frame->convertTo(_vm->_system->getScreenFormat());
// The intro AVI is played upside down, it's the only video played in the English version
for (uint16 y = 0; y < frame1->h / 2; y++) {
uint32 *ptrFrom = (uint32 *)frame1->getBasePtr(0, y);
uint32 *ptrTo = (uint32 *)frame1->getBasePtr(0, frame1->h - y - 1);
// in this else branch, bytesPerPixel equals 4
for (uint16 x = 0; x < frame1->pitch / 4; x++) {
uint32 t = *ptrFrom;
*ptrFrom = *ptrTo;
*ptrTo = t;
ptrFrom++;
ptrTo++;
}
}
_vm->_system->copyRectToScreen(frame1->getPixels(), frame1->pitch, vidPosX, vidPosY, frame1->w, frame1->h);
frame1->free();
delete frame1;
}
_vm->_system->updateScreen();
}
}
Common::Event event;
while (g_system->getEventManager()->pollEvent(event)) {
if ((event.type == Common::EVENT_KEYDOWN && event.kbd.keycode == Common::KEYCODE_ESCAPE) ||
event.type == Common::EVENT_LBUTTONUP)
skipVideo = true;
}
_vm->_system->delayMillis(10);
}
delete videoDecoder;
gameSys.drawSpriteToBackground(0, 0, backgroundIdArr[index]);
gameSys.insertSequence(0x356, 2, 0, 0, kSeqNone, 0, 0, 0);
gameSys.setAnimation(0x356, 2, 0);
while (!_vm->_sceneDone) {
_vm->gameUpdateTick();
if (gameSys.getAnimationStatus(0) == 2 || skip ) {
skip = false;
gameSys.requestClear2(false);
gameSys.requestClear1();
if ( index == 11 || index == 1 )
_vm->screenEffect(0, 0, 0, 0);
gameSys.setAnimation(0, 0, 0);
if (++index >= 31)
_vm->_sceneDone = true;
else {
gameSys.insertSequence(animIdArr[index], 2, 0, 0, kSeqNone, 0, 0, 0);
if (index == 2) {
_vm->playSound(0x10000, false);
gameSys.insertSequence(0x359, 2, 0, 0, 0, 0, 0, 0);
} else if (index == 3)
gameSys.insertSequence(0x35B, 2, 0, 0, kSeqNone, 0, 0, 0);
else if (index == 12)
gameSys.insertSequence(0x36A, 2, 0, 0, kSeqNone, 0, 0, 0);
gameSys.drawSpriteToBackground(0, 0, backgroundIdArr[index]);
gameSys.setAnimation(animIdArr[index], 2, 0);
if (index == 11)
_vm->stopSound(0x10000);
}
}
if (_vm->isKeyStatus1(Common::KEYCODE_ESCAPE) || _vm->isKeyStatus1(Common::KEYCODE_SPACE) || _vm->isKeyStatus1(Common::KEYCODE_RETURN)) {
_vm->clearKeyStatus1(Common::KEYCODE_ESCAPE);
_vm->clearKeyStatus1(Common::KEYCODE_SPACE);
_vm->clearKeyStatus1(Common::KEYCODE_RETURN);
if (index == 0) {
skip = true;
_vm->stopSound(0x3CF);
} else if (index == 1)
skip = true;
else
_vm->_sceneDone = true;
}
}
_vm->stopSound(0x10000);
_vm->_newSceneNum = 1;
_vm->_newCursorValue = 1;
_vm->_dat->open(1, "stock_n.dat");
}
} // End of namespace Gnap

View File

@@ -0,0 +1,46 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef GNAP_INTRO_H
#define GNAP_INTRO_H
#include "gnap/debugger.h"
#include "gnap/scenes/scenecore.h"
namespace Gnap {
class GnapEngine;
class SceneIntro: public Scene {
public:
SceneIntro(GnapEngine *vm);
~SceneIntro() override {}
int init() override;
void updateHotspots() override {}
void run() override;
void updateAnimations() override {}
void updateAnimationsCb() override {}
};
} // End of namespace Gnap
#endif // GNAP_INTRO_H

View File

@@ -0,0 +1,745 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "gnap/gnap.h"
#include "gnap/gamesys.h"
#include "gnap/resource.h"
#include "gnap/scenes/scenecore.h"
#include "gnap/scenes/arcade.h"
#include "gnap/scenes/groupcs.h"
#include "gnap/scenes/group0.h"
#include "gnap/scenes/group1.h"
#include "gnap/scenes/group2.h"
#include "gnap/scenes/group3.h"
#include "gnap/scenes/group4.h"
#include "gnap/scenes/group5.h"
#include "gnap/scenes/intro.h"
namespace Gnap {
int GnapEngine::initSceneLogic() {
int backgroundId = -1;
switch (_currentSceneNum) {
case 0:
_scene = new SceneIntro(this);
backgroundId = _scene->init();
_gameSys->setScaleValues(0, 500, 1, 1000);
break;
case 1:
_scene = new Scene01(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 2:
_scene = new Scene02(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 3:
_scene = new Scene03(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 4:
_scene = new Scene04(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 5:
_scene = new Scene05(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 6:
_scene = new Scene06(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 7:
_scene = new Scene07(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 8:
_scene = new Scene08(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 9:
_scene = new Scene09(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 10:
_scene = new Scene10(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 11:
_scene = new Scene11(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 12:
_scene = new Scene12(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 13:
_scene = new Scene13(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 14:
_scene = new Scene14(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
break;
case 15:
_scene = new Scene15(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
break;
case 16:
case 47:
case 48:
case 54:
backgroundId = -1;
_gameSys->setScaleValues(0, 500, 1, 1000);
break;
case 17:
_scene = new Scene17(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 18:
_scene = new Scene18(this);
backgroundId = _scene->init();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
_scene->updateHotspots();
break;
case 19:
_scene = new Scene19(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 20:
_scene = new Scene20(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 21:
_scene = new Scene21(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 22:
_scene = new Scene22(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 23:
_scene = new Scene23(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 24:
_scene = new Scene24(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 136, 11, 10);
break;
case 25:
_scene = new Scene25(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 26:
_scene = new Scene26(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 27:
_scene = new Scene27(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 28:
_scene = new Scene28(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 29:
_scene = new Scene29(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 30:
_scene = new Scene30(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 31:
_scene = new Scene31(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 32:
_scene = new Scene32(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 33:
_scene = new Scene33(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 34:
_scene = new Scene03(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 35:
_scene = new Scene05(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 36:
_scene = new Scene06(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 37:
_scene = new Scene04(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 38:
_scene = new Scene38(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 39:
_scene = new Scene39(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 40:
_scene = new Scene40(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 41:
_scene = new Scene41(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 42:
_scene = new Scene42(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 43:
_scene = new Scene43(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 44:
_scene = new Scene44(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 45:
_scene = new Scene45(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 46:
_scene = new Scene46(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 49:
_scene = new Scene49(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 50:
_scene = new Scene50(this);
backgroundId = _scene->init();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 51:
_scene = new Scene51(this);
backgroundId = _scene->init();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 52:
_scene = new Scene52(this);
backgroundId = _scene->init();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
case 53:
_scene = new Scene53(this);
backgroundId = _scene->init();
_scene->updateHotspots();
_gameSys->setScaleValues(0, 500, 1, 1000);
initSceneGrid(21, 146, 11, 10);
break;
default:
break;
}
return backgroundId;
}
void GnapEngine::runSceneLogic() {
switch (_currentSceneNum) {
case 0:
_scene->run();
delete _scene;
if (_newSceneNum == 55)
_newSceneNum = 8;
break;
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
_scene->run();
delete _scene;
if (_newSceneNum == 55)
_newSceneNum = 4;
break;
case 7:
_scene->run();
delete _scene;
if (_newSceneNum == 55)
_newSceneNum = 8;
break;
case 8:
_scene->run();
delete _scene;
if (_newSceneNum == 55)
_newSceneNum = 9;
break;
case 9:
_scene->run();
delete _scene;
if (_newSceneNum == 55)
_newSceneNum = 10;
break;
case 10:
case 12:
case 13:
_scene->run();
delete _scene;
if (_newSceneNum == 55)
_newSceneNum = 11;
break;
case 11:
case 15:
_scene->run();
delete _scene;
if (_newSceneNum == 55)
_newSceneNum = 12;
break;
case 14:
_scene->run();
delete _scene;
if (_newSceneNum == 55)
_newSceneNum = 13;
break;
case 16:
_scene = new Scene16(this);
_scene->init();
_newSceneNum = 17;
_newCursorValue = 3;
_scene->run();
delete _scene;
break;
case 17:
case 18:
case 21:
case 22:
case 23:
case 24:
case 25:
case 26:
case 27:
case 28:
case 29:
case 30:
case 31:
_scene->run();
delete _scene;
if (_newSceneNum == 55)
_newSceneNum = 20;
break;
case 19:
_scene->run();
delete _scene;
if (_newSceneNum == 55)
_newSceneNum = 19;
break;
case 20:
_scene->run();
delete _scene;
if (_newSceneNum == 55)
_newSceneNum = 22;
break;
case 32:
case 33:
case 34:
case 35:
case 36:
case 37:
case 38:
case 39:
case 40:
case 41:
case 42:
case 43:
case 44:
case 45:
case 46:
_scene->run();
delete _scene;
if (_newSceneNum == 55)
_newSceneNum = 37;
break;
case 47:
if (_prevSceneNum == 49) {
_scene = new Scene471(this);
_scene->init();
_newSceneNum = 7;
_newCursorValue = 2;
} else if (_prevSceneNum == 13) {
_scene = new Scene472(this);
_scene->init();
_newSceneNum = 11;
} else if (!isFlag(kGFPlatypusDisguised) && _prevSceneNum == 2) {//CHECKME
if (isFlag(kGFUnk25)) {
_scene = new Scene473(this);
_scene->init();
_newSceneNum = 2;
} else {
_scene = new Scene474(this);
_scene->init();
_newSceneNum = 49;
}
} else if (_prevSceneNum == 21) {
_scene = new Scene475(this);
_scene->init();
_newSceneNum = 21;
setFlag(kGFTwigTaken);
setFlag(kGFKeysTaken);
} else if (_prevSceneNum == 30) {
_scene = new Scene476(this);
_scene->init();
_newSceneNum = 26;
} else if (isFlag(kGFPlatypusDisguised) && _cursorValue == 1) {
_scene = new Scene477(this);
_scene->init();
_newSceneNum = 4;
}
_scene->run();
delete _scene;
break;
case 48:
_scene = new Scene48(this);
_scene->init();
_newSceneNum = 33;
_newCursorValue = 4;
_scene->run();
delete _scene;
break;
case 49:
_scene->run();
delete _scene;
if (_newSceneNum == 55)
_newSceneNum = 47;
break;
case 50:
_scene->run();
delete _scene;
_newSceneNum = _prevSceneNum;
break;
case 51:
_scene->run();
delete _scene;
break;
case 52:
_scene->run();
delete _scene;
_newSceneNum = _prevSceneNum;
break;
case 53:
_scene->run();
delete _scene;
if (_newSceneNum == 55)
_newSceneNum = 53;
break;
case 54:
if (_prevSceneNum == 45) {
_scene = new Scene541(this);
_scene->init();
_newSceneNum = 43;
_scene->run();
delete _scene;
} else {
_scene = new Scene542(this);
_scene->init();
_scene->run();
delete _scene;
_gameDone = true;
}
break;
default:
break;
}
}
void Scene::playRandomSound(int timerIndex) {
if (!_vm->_timers[timerIndex]) {
_vm->_timers[timerIndex] = _vm->getRandom(40) + 50;
switch (_vm->getRandom(4)) {
case 0:
_vm->playSound(0x1091B, false);
break;
case 1:
_vm->playSound(0x10921, false);
break;
case 2:
_vm->playSound(0x10927, false);
break;
case 3:
_vm->playSound(0x1091D, false);
break;
default:
break;
}
}
}
bool Scene::clearKeyStatus() {
if (_vm->isKeyStatus1(Common::KEYCODE_ESCAPE)) {
_vm->clearKeyStatus1(Common::KEYCODE_ESCAPE);
_vm->clearKeyStatus1(Common::KEYCODE_UP);
_vm->clearKeyStatus1(Common::KEYCODE_RIGHT);
_vm->clearKeyStatus1(Common::KEYCODE_LEFT);
_vm->clearKeyStatus1(Common::KEYCODE_p);
return true;
}
if (_vm->isKeyStatus1(Common::KEYCODE_p)) {
_vm->clearKeyStatus1(Common::KEYCODE_p);
_vm->pauseGame();
_vm->updatePause();
}
return false;
}
/****************************************************************************/
CutScene::CutScene(GnapEngine *vm) : Scene(vm) {
_itemsCount = -1;
for (int i = 0; i < 16; i++) {
_resourceIdArr[i] = -1;
_sequenceCountArr[i] = -1;
_canSkip[i] = false;
}
for (int i = 0; i < 50; i++)
_sequenceIdArr[i] = -1;
}
void CutScene::run() {
GameSys& gameSys = *_vm->_gameSys;
int itemIndex = 0;
int soundId = -1;
int volume = 100;
int duration = 0;
bool skip = false;
if (_vm->_prevSceneNum == 2) {
soundId = 0x36B;
duration = MAX(1, 300 / _vm->getSequenceTotalDuration(_sequenceIdArr[_itemsCount - 1]));
_vm->_timers[0] = 0;
}
if (soundId != -1)
_vm->playSound(soundId, false);
_vm->hideCursor();
gameSys.drawSpriteToBackground(0, 0, _resourceIdArr[0]);
for (int j = 0; j < _sequenceCountArr[0]; ++j)
gameSys.insertSequence(_sequenceIdArr[j], j + 2, 0, 0, kSeqNone, 0, 0, 0);
gameSys.setAnimation(_sequenceIdArr[0], 2, 0);
_vm->clearKeyStatus1(Common::KEYCODE_ESCAPE);
_vm->clearKeyStatus1(Common::KEYCODE_SPACE);
_vm->clearKeyStatus1(Common::KEYCODE_RETURN);
_vm->_mouseClickState._left = false;
int firstSequenceIndex = 0;
while (!_vm->_sceneDone) {
_vm->gameUpdateTick();
if (gameSys.getAnimationStatus(0) == 2 || skip) {
skip = false;
gameSys.requestClear2(false);
gameSys.requestClear1();
gameSys.setAnimation(0, 0, 0);
firstSequenceIndex += _sequenceCountArr[itemIndex++];
if (itemIndex >= _itemsCount) {
_vm->_sceneDone = true;
} else {
for (int m = 0; m < _sequenceCountArr[itemIndex]; ++m)
gameSys.insertSequence(_sequenceIdArr[firstSequenceIndex + m], m + 2, 0, 0, kSeqNone, 0, 0, 0);
gameSys.drawSpriteToBackground(0, 0, _resourceIdArr[itemIndex]);
gameSys.setAnimation(_sequenceIdArr[firstSequenceIndex], 2, 0);
}
}
if (_vm->isKeyStatus1(Common::KEYCODE_ESCAPE) || _vm->isKeyStatus1(Common::KEYCODE_SPACE) || _vm->isKeyStatus1(Common::KEYCODE_RETURN)) {
_vm->clearKeyStatus1(Common::KEYCODE_ESCAPE);
_vm->clearKeyStatus1(Common::KEYCODE_SPACE);
_vm->clearKeyStatus1(Common::KEYCODE_RETURN);
if (_canSkip[itemIndex])
skip = true;
else
_vm->_sceneDone = true;
}
if (!_vm->_timers[0] && itemIndex == _itemsCount - 1) {
_vm->_timers[0] = 2;
volume = MAX(1, volume - duration);
_vm->setSoundVolume(soundId, volume);
}
}
if (soundId != -1)
_vm->stopSound(soundId);
}
} // End of namespace Gnap

View File

@@ -0,0 +1,69 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef GNAP_SCENECORE_H
#define GNAP_SCENECORE_H
#include "gnap/debugger.h"
namespace Gnap {
class GnapEngine;
class Scene {
public:
Scene(GnapEngine *vm) : _vm(vm) {};
virtual ~Scene() {};
void playRandomSound(int timerIndex);
bool clearKeyStatus();
virtual int init() = 0;
virtual void updateHotspots() = 0;
virtual void run() = 0;
virtual void updateAnimations() = 0;
virtual void updateAnimationsCb() = 0;
protected:
GnapEngine *_vm;
};
class CutScene : public Scene {
public:
CutScene(GnapEngine *vm);
~CutScene() override {};
int init() override = 0;
void updateHotspots() override {}
void run() override;
void updateAnimations() override {}
void updateAnimationsCb() override {}
protected:
int _itemsCount;
int _resourceIdArr[16];
int _sequenceCountArr[16];
int _sequenceIdArr[50];
bool _canSkip[16];
};
} // End of namespace Gnap
#endif // GNAP_SCENECORE_H