2007-05-30 21:56:52 +00:00
|
|
|
/* 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.
|
2003-07-28 01:44:38 +00:00
|
|
|
*
|
2007-05-31 20:28:29 +00:00
|
|
|
* Additional copyright for this file:
|
|
|
|
* Copyright (C) 1994-1998 Revolution Software Ltd.
|
|
|
|
*
|
2003-07-28 01:44:38 +00:00
|
|
|
* 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 2
|
|
|
|
* 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, write to the Free Software
|
2005-10-18 01:30:26 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2003-07-28 01:44:38 +00:00
|
|
|
*/
|
|
|
|
|
2003-09-17 17:34:04 +00:00
|
|
|
// logic management
|
2003-07-28 01:44:38 +00:00
|
|
|
|
2006-02-12 19:57:23 +00:00
|
|
|
#ifndef SWORD2_LOGIC_H
|
|
|
|
#define SWORD2_LOGIC_H
|
2003-07-28 01:44:38 +00:00
|
|
|
|
2006-03-29 15:59:37 +00:00
|
|
|
#include "common/endian.h"
|
2007-02-08 21:55:37 +00:00
|
|
|
#include "sword2/animation.h"
|
|
|
|
#include "sword2/memory.h"
|
2005-05-03 09:00:06 +00:00
|
|
|
|
2003-10-04 00:52:27 +00:00
|
|
|
namespace Sword2 {
|
|
|
|
|
2004-03-17 09:03:15 +00:00
|
|
|
#define MAX_events 10
|
2003-11-08 18:15:35 +00:00
|
|
|
|
2004-03-17 09:03:15 +00:00
|
|
|
#define TREE_SIZE 3
|
2003-07-28 01:44:38 +00:00
|
|
|
|
2003-10-22 06:51:57 +00:00
|
|
|
// This must allow for the largest number of objects in a screen
|
|
|
|
#define OBJECT_KILL_LIST_SIZE 50
|
|
|
|
|
2003-11-01 16:55:20 +00:00
|
|
|
#define MAX_SEQUENCE_TEXT_LINES 15
|
|
|
|
|
2003-11-08 15:47:51 +00:00
|
|
|
class Sword2Engine;
|
2004-11-14 15:00:01 +00:00
|
|
|
class Router;
|
2003-11-08 15:47:51 +00:00
|
|
|
|
2005-02-22 07:37:50 +00:00
|
|
|
struct EventUnit {
|
|
|
|
uint32 id;
|
|
|
|
uint32 interact_id;
|
|
|
|
};
|
|
|
|
|
2003-10-18 08:11:50 +00:00
|
|
|
class Logic {
|
|
|
|
private:
|
2003-11-08 15:47:51 +00:00
|
|
|
Sword2Engine *_vm;
|
|
|
|
|
2005-05-03 09:00:06 +00:00
|
|
|
inline byte *decodePtr(int32 n) {
|
|
|
|
return _vm->_memory->decodePtr(n);
|
|
|
|
}
|
|
|
|
|
2003-10-22 06:51:57 +00:00
|
|
|
uint32 _objectKillList[OBJECT_KILL_LIST_SIZE];
|
|
|
|
|
|
|
|
// keeps note of no. of objects in the kill list
|
|
|
|
uint32 _kills;
|
|
|
|
|
2003-10-18 08:11:50 +00:00
|
|
|
// denotes the res id of the game-object-list in current use
|
|
|
|
uint32 _currentRunList;
|
|
|
|
|
|
|
|
//pc during logic loop
|
|
|
|
uint32 _pc;
|
|
|
|
|
|
|
|
// each object has one of these tacked onto the beginning
|
Applied my own patch #1341495, in an attempt to fix alignment issues
reported by Crilith.
To elaborate a bit, the engine no longer accesses resource data through
packed structs. Instead it uses memory streams and the READ/WRITE
functions.
If data is mainly read, not written, I have replaced the old struct with a
new one with a read() function to read the whole thing from memory into the
struct's variables, and a write() function to dump the struct's variables
to memory. In fact, most of these write() functions remain unused.
If data is both read and written, I have replaced the struct with a class
with individual get/set functions to replace the old variables. This
manipulates memory directly.
Since I'm fairly sure that these structs are frequently stored as local
variables for a script, all script variables (both local and global) are
stored as little-endian and accessed through the READ/WRITE functions,
rather than being treated as arrays of 32-bit integers.
On a positive note, the functions for doing endian conversion of resources
and save games have been removed, and some general cleanups have been made
to assist in the rewrite.
Initial reports indicate that this patch indeed fixes alignment issues, and
that I have not - surprisingly - broken the game on big-endian platforms.
At least not in any immediately obvious way. And there's still plenty of
time to fix regressions before 0.9.0, too.
svn-id: r19366
2005-10-29 21:24:54 +00:00
|
|
|
ObjectHub _curObjectHub;
|
2003-10-18 08:11:50 +00:00
|
|
|
|
2004-03-29 06:37:46 +00:00
|
|
|
EventUnit _eventList[MAX_events];
|
|
|
|
|
2008-11-09 13:20:43 +00:00
|
|
|
MoviePlayer *_moviePlayer;
|
|
|
|
|
Began what I hope is the final major restructuring of the BS2 engine.
In this first step, I have moved all opcode functions into functions.cpp,
instead of having them scattered all over the place.
To get things to compile again, I had to rewrite the overly complicated
sound effects handling. It's much simpler now.
The next step will be to move any non-trivial code out of the opcode
functions and into the appropriate object. This, I hope, will make it
easier to create well-separated objects, instead of the current mess.
I also want to tear down the artificial boundary between the main directory
and the "driver" directory. We already have a cross-platform layer; there's
no need to have yet another one. (Actually, the rewriting of the sound
effects code took one first step in this direction.)
At the final stage, I'd like to get rid of the "drivers" directory
completely, but I'll probably need some help with that if I want to
preserve the CVS history of the code.
Things will probably be a bit bumpy along the way, but I seem to have
reached a point of relative stability again, which is why I'm commiting
this now.
svn-id: r16668
2005-01-28 16:33:14 +00:00
|
|
|
// Resource id of the wav to use as lead-in/lead-out from smacker
|
|
|
|
uint32 _smackerLeadIn;
|
2003-11-01 16:55:20 +00:00
|
|
|
uint32 _smackerLeadOut;
|
|
|
|
|
|
|
|
// keeps count of number of text lines to disaply during the sequence
|
|
|
|
uint32 _sequenceTextLines;
|
|
|
|
|
2009-02-21 15:07:05 +00:00
|
|
|
MovieText _sequenceTextList[MAX_SEQUENCE_TEXT_LINES];
|
2003-11-01 16:55:20 +00:00
|
|
|
|
2003-11-04 17:26:59 +00:00
|
|
|
// when not playing a wav we calculate the speech time based upon
|
|
|
|
// length of ascii
|
|
|
|
|
|
|
|
uint32 _speechTime;
|
|
|
|
|
|
|
|
uint32 _animId;
|
|
|
|
|
|
|
|
// 0 lip synced and repeating - 1 normal once through
|
|
|
|
uint32 _speechAnimType;
|
|
|
|
|
|
|
|
uint32 _leftClickDelay; // click-delay for LEFT mouse button
|
|
|
|
uint32 _rightClickDelay; // click-delay for RIGHT mouse button
|
|
|
|
|
|
|
|
// calculated by locateTalker() for use in speech-panning & text-sprite
|
|
|
|
// positioning
|
|
|
|
|
|
|
|
int16 _textX, _textY;
|
|
|
|
|
|
|
|
void locateTalker(int32 *params);
|
|
|
|
void formText(int32 *params);
|
|
|
|
bool wantSpeechForLine(uint32 wavId);
|
|
|
|
|
2004-04-16 06:46:03 +00:00
|
|
|
// Set by fnPassMega()
|
Applied my own patch #1341495, in an attempt to fix alignment issues
reported by Crilith.
To elaborate a bit, the engine no longer accesses resource data through
packed structs. Instead it uses memory streams and the READ/WRITE
functions.
If data is mainly read, not written, I have replaced the old struct with a
new one with a read() function to read the whole thing from memory into the
struct's variables, and a write() function to dump the struct's variables
to memory. In fact, most of these write() functions remain unused.
If data is both read and written, I have replaced the struct with a class
with individual get/set functions to replace the old variables. This
manipulates memory directly.
Since I'm fairly sure that these structs are frequently stored as local
variables for a script, all script variables (both local and global) are
stored as little-endian and accessed through the READ/WRITE functions,
rather than being treated as arrays of 32-bit integers.
On a positive note, the functions for doing endian conversion of resources
and save games have been removed, and some general cleanups have been made
to assist in the rewrite.
Initial reports indicate that this patch indeed fixes alignment issues, and
that I have not - surprisingly - broken the game on big-endian platforms.
At least not in any immediately obvious way. And there's still plenty of
time to fix regressions before 0.9.0, too.
svn-id: r19366
2005-10-29 21:24:54 +00:00
|
|
|
byte _engineMega[56];
|
2004-04-16 06:46:03 +00:00
|
|
|
|
2009-10-20 19:51:32 +00:00
|
|
|
|
|
|
|
bool _cycleSkip;
|
|
|
|
bool _speechRunning;
|
|
|
|
|
2003-09-17 17:34:04 +00:00
|
|
|
public:
|
2004-11-14 15:00:01 +00:00
|
|
|
Logic(Sword2Engine *vm);
|
|
|
|
~Logic();
|
2004-01-07 07:42:00 +00:00
|
|
|
|
2005-02-22 07:37:50 +00:00
|
|
|
EventUnit *getEventList() { return _eventList; }
|
Applied my own patch #1341495, in an attempt to fix alignment issues
reported by Crilith.
To elaborate a bit, the engine no longer accesses resource data through
packed structs. Instead it uses memory streams and the READ/WRITE
functions.
If data is mainly read, not written, I have replaced the old struct with a
new one with a read() function to read the whole thing from memory into the
struct's variables, and a write() function to dump the struct's variables
to memory. In fact, most of these write() functions remain unused.
If data is both read and written, I have replaced the struct with a class
with individual get/set functions to replace the old variables. This
manipulates memory directly.
Since I'm fairly sure that these structs are frequently stored as local
variables for a script, all script variables (both local and global) are
stored as little-endian and accessed through the READ/WRITE functions,
rather than being treated as arrays of 32-bit integers.
On a positive note, the functions for doing endian conversion of resources
and save games have been removed, and some general cleanups have been made
to assist in the rewrite.
Initial reports indicate that this patch indeed fixes alignment issues, and
that I have not - surprisingly - broken the game on big-endian platforms.
At least not in any immediately obvious way. And there's still plenty of
time to fix regressions before 0.9.0, too.
svn-id: r19366
2005-10-29 21:24:54 +00:00
|
|
|
byte *getEngineMega() { return _engineMega; }
|
2005-02-22 07:37:50 +00:00
|
|
|
|
Applied my own patch #1341495, in an attempt to fix alignment issues
reported by Crilith.
To elaborate a bit, the engine no longer accesses resource data through
packed structs. Instead it uses memory streams and the READ/WRITE
functions.
If data is mainly read, not written, I have replaced the old struct with a
new one with a read() function to read the whole thing from memory into the
struct's variables, and a write() function to dump the struct's variables
to memory. In fact, most of these write() functions remain unused.
If data is both read and written, I have replaced the struct with a class
with individual get/set functions to replace the old variables. This
manipulates memory directly.
Since I'm fairly sure that these structs are frequently stored as local
variables for a script, all script variables (both local and global) are
stored as little-endian and accessed through the READ/WRITE functions,
rather than being treated as arrays of 32-bit integers.
On a positive note, the functions for doing endian conversion of resources
and save games have been removed, and some general cleanups have been made
to assist in the rewrite.
Initial reports indicate that this patch indeed fixes alignment issues, and
that I have not - surprisingly - broken the game on big-endian platforms.
At least not in any immediately obvious way. And there's still plenty of
time to fix regressions before 0.9.0, too.
svn-id: r19366
2005-10-29 21:24:54 +00:00
|
|
|
byte _saveLogic[8];
|
|
|
|
byte _saveGraphic[12];
|
|
|
|
byte _saveMega[56];
|
2005-05-03 09:00:06 +00:00
|
|
|
|
2004-03-17 09:03:15 +00:00
|
|
|
// Point to the global variable data
|
Applied my own patch #1341495, in an attempt to fix alignment issues
reported by Crilith.
To elaborate a bit, the engine no longer accesses resource data through
packed structs. Instead it uses memory streams and the READ/WRITE
functions.
If data is mainly read, not written, I have replaced the old struct with a
new one with a read() function to read the whole thing from memory into the
struct's variables, and a write() function to dump the struct's variables
to memory. In fact, most of these write() functions remain unused.
If data is both read and written, I have replaced the struct with a class
with individual get/set functions to replace the old variables. This
manipulates memory directly.
Since I'm fairly sure that these structs are frequently stored as local
variables for a script, all script variables (both local and global) are
stored as little-endian and accessed through the READ/WRITE functions,
rather than being treated as arrays of 32-bit integers.
On a positive note, the functions for doing endian conversion of resources
and save games have been removed, and some general cleanups have been made
to assist in the rewrite.
Initial reports indicate that this patch indeed fixes alignment issues, and
that I have not - surprisingly - broken the game on big-endian platforms.
At least not in any immediately obvious way. And there's still plenty of
time to fix regressions before 0.9.0, too.
svn-id: r19366
2005-10-29 21:24:54 +00:00
|
|
|
byte *_scriptVars;
|
2004-03-17 09:03:15 +00:00
|
|
|
|
2003-11-04 17:26:59 +00:00
|
|
|
// "TEXT" - current official text line number - will match the wav
|
|
|
|
// filenames
|
|
|
|
|
|
|
|
int16 _officialTextNumber;
|
|
|
|
|
|
|
|
// so speech text cleared when running a new start-script
|
|
|
|
uint32 _speechTextBlocNo;
|
|
|
|
|
Applied my own patch #1341495, in an attempt to fix alignment issues
reported by Crilith.
To elaborate a bit, the engine no longer accesses resource data through
packed structs. Instead it uses memory streams and the READ/WRITE
functions.
If data is mainly read, not written, I have replaced the old struct with a
new one with a read() function to read the whole thing from memory into the
struct's variables, and a write() function to dump the struct's variables
to memory. In fact, most of these write() functions remain unused.
If data is both read and written, I have replaced the struct with a class
with individual get/set functions to replace the old variables. This
manipulates memory directly.
Since I'm fairly sure that these structs are frequently stored as local
variables for a script, all script variables (both local and global) are
stored as little-endian and accessed through the READ/WRITE functions,
rather than being treated as arrays of 32-bit integers.
On a positive note, the functions for doing endian conversion of resources
and save games have been removed, and some general cleanups have been made
to assist in the rewrite.
Initial reports indicate that this patch indeed fixes alignment issues, and
that I have not - surprisingly - broken the game on big-endian platforms.
At least not in any immediately obvious way. And there's still plenty of
time to fix regressions before 0.9.0, too.
svn-id: r19366
2005-10-29 21:24:54 +00:00
|
|
|
uint32 readVar(int n) {
|
|
|
|
return READ_LE_UINT32(_scriptVars + 4 * n);
|
|
|
|
}
|
|
|
|
|
|
|
|
void writeVar(int n, uint32 value) {
|
|
|
|
WRITE_LE_UINT32(_scriptVars + 4 * n, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
int runResScript(uint32 scriptRes, uint32 offset);
|
|
|
|
int runResObjScript(uint32 scriptRes, uint32 objRes, uint32 offset);
|
|
|
|
int runScript(byte *scriptData, byte *objectData, uint32 offset);
|
|
|
|
int runScript2(byte *scriptData, byte *objectData, byte *offset);
|
2003-10-21 08:54:50 +00:00
|
|
|
|
2003-11-08 15:47:51 +00:00
|
|
|
void sendEvent(uint32 id, uint32 interact_id);
|
|
|
|
void setPlayerActionEvent(uint32 id, uint32 interact_id);
|
2005-02-22 07:37:50 +00:00
|
|
|
void startEvent();
|
|
|
|
int checkEventWaiting();
|
2003-11-08 15:47:51 +00:00
|
|
|
void clearEvent(uint32 id);
|
|
|
|
void killAllIdsEvents(uint32 id);
|
|
|
|
|
2005-02-22 07:37:50 +00:00
|
|
|
uint32 countEvents();
|
2003-11-08 15:47:51 +00:00
|
|
|
|
2003-12-28 15:08:12 +00:00
|
|
|
struct SyncUnit {
|
2003-11-08 15:47:51 +00:00
|
|
|
uint32 id;
|
|
|
|
uint32 sync;
|
|
|
|
};
|
|
|
|
|
2005-11-13 19:29:32 +00:00
|
|
|
// There won't be many, will there? Probably 2 at most i reckon
|
|
|
|
SyncUnit _syncList[10];
|
2003-11-08 15:47:51 +00:00
|
|
|
|
|
|
|
void clearSyncs(uint32 id);
|
2005-11-13 19:29:32 +00:00
|
|
|
void sendSync(uint32 id, uint32 sync);
|
2005-02-22 07:37:50 +00:00
|
|
|
int getSync();
|
2003-11-08 15:47:51 +00:00
|
|
|
|
|
|
|
Router *_router;
|
|
|
|
|
2006-09-09 10:29:14 +00:00
|
|
|
typedef int32 (Logic::*OpcodeProc)(int32 *);
|
|
|
|
struct OpcodeEntry {
|
|
|
|
OpcodeProc proc;
|
|
|
|
const char *desc;
|
|
|
|
};
|
|
|
|
const OpcodeEntry *_opcodes;
|
2006-09-09 10:47:32 +00:00
|
|
|
int _numOpcodes;
|
2006-09-09 10:29:14 +00:00
|
|
|
void setupOpcodes();
|
|
|
|
|
2003-10-18 08:11:50 +00:00
|
|
|
int32 fnTestFunction(int32 *params);
|
|
|
|
int32 fnTestFlags(int32 *params);
|
|
|
|
int32 fnRegisterStartPoint(int32 *params);
|
|
|
|
int32 fnInitBackground(int32 *params);
|
|
|
|
int32 fnSetSession(int32 *params);
|
2005-07-30 21:11:48 +00:00
|
|
|
int32 fnBackSprite(int32 *params);
|
|
|
|
int32 fnSortSprite(int32 *params);
|
|
|
|
int32 fnForeSprite(int32 *params);
|
|
|
|
int32 fnRegisterMouse(int32 *params);
|
2003-10-18 08:11:50 +00:00
|
|
|
int32 fnAnim(int32 *params);
|
|
|
|
int32 fnRandom(int32 *params);
|
|
|
|
int32 fnPreLoad(int32 *params);
|
|
|
|
int32 fnAddSubject(int32 *params);
|
|
|
|
int32 fnInteract(int32 *params);
|
|
|
|
int32 fnChoose(int32 *params);
|
|
|
|
int32 fnWalk(int32 *params);
|
|
|
|
int32 fnWalkToAnim(int32 *params);
|
|
|
|
int32 fnTurn(int32 *params);
|
|
|
|
int32 fnStandAt(int32 *params);
|
|
|
|
int32 fnStand(int32 *params);
|
|
|
|
int32 fnStandAfterAnim(int32 *params);
|
|
|
|
int32 fnPause(int32 *params);
|
|
|
|
int32 fnMegaTableAnim(int32 *params);
|
|
|
|
int32 fnAddMenuObject(int32 *params);
|
|
|
|
int32 fnStartConversation(int32 *params);
|
|
|
|
int32 fnEndConversation(int32 *params);
|
|
|
|
int32 fnSetFrame(int32 *params);
|
|
|
|
int32 fnRandomPause(int32 *params);
|
|
|
|
int32 fnRegisterFrame(int32 *params);
|
|
|
|
int32 fnNoSprite(int32 *params);
|
|
|
|
int32 fnSendSync(int32 *params);
|
|
|
|
int32 fnUpdatePlayerStats(int32 *params);
|
|
|
|
int32 fnPassGraph(int32 *params);
|
|
|
|
int32 fnInitFloorMouse(int32 *params);
|
|
|
|
int32 fnPassMega(int32 *params);
|
|
|
|
int32 fnFaceXY(int32 *params);
|
|
|
|
int32 fnEndSession(int32 *params);
|
|
|
|
int32 fnNoHuman(int32 *params);
|
|
|
|
int32 fnAddHuman(int32 *params);
|
|
|
|
int32 fnWeWait(int32 *params);
|
|
|
|
int32 fnTheyDoWeWait(int32 *params);
|
|
|
|
int32 fnTheyDo(int32 *params);
|
|
|
|
int32 fnWalkToTalkToMega(int32 *params);
|
|
|
|
int32 fnFadeDown(int32 *params);
|
|
|
|
int32 fnISpeak(int32 *params);
|
|
|
|
int32 fnTotalRestart(int32 *params);
|
|
|
|
int32 fnSetWalkGrid(int32 *params);
|
|
|
|
int32 fnSpeechProcess(int32 *params);
|
|
|
|
int32 fnSetScaling(int32 *params);
|
|
|
|
int32 fnStartEvent(int32 *params);
|
|
|
|
int32 fnCheckEventWaiting(int32 *params);
|
|
|
|
int32 fnRequestSpeech(int32 *params);
|
|
|
|
int32 fnGosub(int32 *params);
|
|
|
|
int32 fnTimedWait(int32 *params);
|
|
|
|
int32 fnPlayFx(int32 *params);
|
|
|
|
int32 fnStopFx(int32 *params);
|
|
|
|
int32 fnPlayMusic(int32 *params);
|
|
|
|
int32 fnStopMusic(int32 *params);
|
|
|
|
int32 fnSetValue(int32 *params);
|
|
|
|
int32 fnNewScript(int32 *params);
|
|
|
|
int32 fnGetSync(int32 *params);
|
|
|
|
int32 fnWaitSync(int32 *params);
|
|
|
|
int32 fnRegisterWalkGrid(int32 *params);
|
|
|
|
int32 fnReverseMegaTableAnim(int32 *params);
|
|
|
|
int32 fnReverseAnim(int32 *params);
|
|
|
|
int32 fnAddToKillList(int32 *params);
|
|
|
|
int32 fnSetStandbyCoords(int32 *params);
|
|
|
|
int32 fnBackPar0Sprite(int32 *params);
|
|
|
|
int32 fnBackPar1Sprite(int32 *params);
|
|
|
|
int32 fnForePar0Sprite(int32 *params);
|
|
|
|
int32 fnForePar1Sprite(int32 *params);
|
|
|
|
int32 fnSetPlayerActionEvent(int32 *params);
|
|
|
|
int32 fnSetScrollCoordinate(int32 *params);
|
|
|
|
int32 fnStandAtAnim(int32 *params);
|
|
|
|
int32 fnSetScrollLeftMouse(int32 *params);
|
|
|
|
int32 fnSetScrollRightMouse(int32 *params);
|
2011-04-14 12:12:27 +00:00
|
|
|
int32 fnColor(int32 *params);
|
2003-10-18 08:11:50 +00:00
|
|
|
int32 fnFlash(int32 *params);
|
|
|
|
int32 fnPreFetch(int32 *params);
|
|
|
|
int32 fnGetPlayerSaveData(int32 *params);
|
|
|
|
int32 fnPassPlayerSaveData(int32 *params);
|
|
|
|
int32 fnSendEvent(int32 *params);
|
|
|
|
int32 fnAddWalkGrid(int32 *params);
|
|
|
|
int32 fnRemoveWalkGrid(int32 *params);
|
|
|
|
int32 fnCheckForEvent(int32 *params);
|
|
|
|
int32 fnPauseForEvent(int32 *params);
|
|
|
|
int32 fnClearEvent(int32 *params);
|
|
|
|
int32 fnFaceMega(int32 *params);
|
|
|
|
int32 fnPlaySequence(int32 *params);
|
|
|
|
int32 fnShadedSprite(int32 *params);
|
|
|
|
int32 fnUnshadedSprite(int32 *params);
|
|
|
|
int32 fnFadeUp(int32 *params);
|
|
|
|
int32 fnDisplayMsg(int32 *params);
|
|
|
|
int32 fnSetObjectHeld(int32 *params);
|
|
|
|
int32 fnAddSequenceText(int32 *params);
|
|
|
|
int32 fnResetGlobals(int32 *params);
|
|
|
|
int32 fnSetPalette(int32 *params);
|
|
|
|
int32 fnRegisterPointerText(int32 *params);
|
|
|
|
int32 fnFetchWait(int32 *params);
|
|
|
|
int32 fnRelease(int32 *params);
|
|
|
|
int32 fnPrepareMusic(int32 *params);
|
|
|
|
int32 fnSoundFetch(int32 *params);
|
|
|
|
int32 fnSmackerLeadIn(int32 *params);
|
|
|
|
int32 fnSmackerLeadOut(int32 *params);
|
|
|
|
int32 fnStopAllFx(int32 *params);
|
|
|
|
int32 fnCheckPlayerActivity(int32 *params);
|
|
|
|
int32 fnResetPlayerActivityDelay(int32 *params);
|
|
|
|
int32 fnCheckMusicPlaying(int32 *params);
|
|
|
|
int32 fnPlayCredits(int32 *params);
|
|
|
|
int32 fnSetScrollSpeedNormal(int32 *params);
|
|
|
|
int32 fnSetScrollSpeedSlow(int32 *params);
|
|
|
|
int32 fnRemoveChooser(int32 *params);
|
|
|
|
int32 fnSetFxVolAndPan(int32 *params);
|
|
|
|
int32 fnSetFxVol(int32 *params);
|
|
|
|
int32 fnRestoreGame(int32 *params);
|
|
|
|
int32 fnRefreshInventory(int32 *params);
|
|
|
|
int32 fnChangeShadows(int32 *params);
|
|
|
|
|
2003-11-01 16:55:20 +00:00
|
|
|
// do one cycle of the current session
|
2005-02-22 07:37:50 +00:00
|
|
|
int processSession();
|
2003-07-28 01:44:38 +00:00
|
|
|
|
2003-09-17 17:34:04 +00:00
|
|
|
// cause the logic loop to terminate and drop out
|
2003-09-30 06:40:01 +00:00
|
|
|
void expressChangeSession(uint32 sesh_id);
|
2003-07-28 01:44:38 +00:00
|
|
|
|
2005-02-22 07:37:50 +00:00
|
|
|
uint32 getRunList();
|
2003-07-28 01:44:38 +00:00
|
|
|
|
2003-10-18 08:11:50 +00:00
|
|
|
// setup script_id and script_pc in _curObjectHub - called by fnGosub()
|
2003-09-30 06:40:01 +00:00
|
|
|
void logicUp(uint32 new_script);
|
2003-07-28 01:44:38 +00:00
|
|
|
|
2003-09-30 06:40:01 +00:00
|
|
|
void logicReplace(uint32 new_script);
|
|
|
|
void logicOne(uint32 new_script);
|
2005-02-22 07:37:50 +00:00
|
|
|
void resetKillList();
|
2008-11-09 13:20:43 +00:00
|
|
|
|
2009-04-07 19:52:46 +00:00
|
|
|
// Read location number from script vars
|
|
|
|
uint32 getLocationNum();
|
2003-07-28 01:44:38 +00:00
|
|
|
};
|
|
|
|
|
2003-10-04 00:52:27 +00:00
|
|
|
} // End of namespace Sword2
|
|
|
|
|
2003-07-28 01:44:38 +00:00
|
|
|
#endif
|