TWINE: started to reorganize the folder structure

This commit is contained in:
Martin Gerhardy 2020-12-21 12:31:32 +01:00
parent 97dbec8cab
commit d1aa2e3cb3
54 changed files with 382 additions and 376 deletions

View File

@ -20,7 +20,7 @@
*
*/
#include "twine/music.h"
#include "twine/audio/music.h"
#include "audio/midiparser.h"
#include "audio/midiplayer.h"
#include "backends/audiocd/audiocd.h"

View File

@ -20,18 +20,18 @@
*
*/
#include "twine/sound.h"
#include "twine/audio/sound.h"
#include "audio/audiostream.h"
#include "audio/decoders/voc.h"
#include "common/memstream.h"
#include "common/system.h"
#include "common/types.h"
#include "common/util.h"
#include "twine/collision.h"
#include "twine/scene/collision.h"
#include "twine/flamovies.h"
#include "twine/grid.h"
#include "twine/scene/grid.h"
#include "twine/hqr.h"
#include "twine/movements.h"
#include "twine/scene/movements.h"
#include "twine/resources.h"
#include "twine/text.h"
#include "twine/twine.h"

View File

@ -20,14 +20,14 @@
*
*/
#include "twine/console.h"
#include "twine/debugger/console.h"
#include "common/scummsys.h"
#include "twine/twine.h"
#include "twine/gamestate.h"
#include "twine/scene.h"
#include "twine/debug_scene.h"
#include "twine/debug_grid.h"
#include "twine/debugger/debug_grid.h"
#include "twine/debugger/debug_scene.h"
#include "twine/scene/gamestate.h"
#include "twine/scene/scene.h"
#include "twine/text.h"
#include "twine/twine.h"
namespace TwinE {
@ -50,16 +50,16 @@ TwinEConsole::TwinEConsole(TwinEEngine *engine) : _engine(engine), GUI::Debugger
TwinEConsole::~TwinEConsole() {
}
#define TOGGLE_DEBUG(var, description) \
if ((var)) { \
#define TOGGLE_DEBUG(var, description) \
if ((var)) { \
debugPrintf("Disabling " description); \
(var) = false; \
} else { \
debugPrintf("Enabling " description); \
(var) = true; \
} \
if ((var) && !_engine->cfgfile.Debug) { \
doToggleDebug(0, nullptr); \
(var) = false; \
} else { \
debugPrintf("Enabling " description); \
(var) = true; \
} \
if ((var) && !_engine->cfgfile.Debug) { \
doToggleDebug(0, nullptr); \
}
bool TwinEConsole::doToggleZoneRendering(int argc, const char **argv) {

View File

@ -24,7 +24,7 @@
#define TWINE_CONSOLE_H
#include "gui/debugger.h"
#include "twine/gamestate.h"
#include "twine/scene/gamestate.h"
namespace TwinE {

View File

@ -20,16 +20,16 @@
*
*/
#include "twine/debug.h"
#include "twine/debugger/debug.h"
#include "common/system.h"
#include "twine/debug_grid.h"
#include "twine/debug_scene.h"
#include "twine/interface.h"
#include "twine/menu.h"
#include "twine/redraw.h"
#include "twine/scene.h"
#include "twine/screens.h"
#include "twine/debugger/debug_grid.h"
#include "twine/debugger/debug_scene.h"
#include "twine/menu/interface.h"
#include "twine/menu/menu.h"
#include "twine/renderer/redraw.h"
#include "twine/renderer/screens.h"
#include "twine/scene/scene.h"
#include "twine/text.h"
#include "twine/twine.h"

View File

@ -20,12 +20,12 @@
*
*/
#include "twine/debug_grid.h"
#include "twine/debugger/debug_grid.h"
#include "common/debug.h"
#include "twine/grid.h"
#include "twine/scene/grid.h"
#include "twine/input.h"
#include "twine/redraw.h"
#include "twine/scene.h"
#include "twine/renderer/redraw.h"
#include "twine/scene/scene.h"
#include "twine/twine.h"
namespace TwinE {

View File

@ -20,12 +20,12 @@
*
*/
#include "twine/debug_scene.h"
#include "twine/grid.h"
#include "twine/interface.h"
#include "twine/redraw.h"
#include "twine/renderer.h"
#include "twine/scene.h"
#include "twine/debugger/debug_scene.h"
#include "twine/scene/grid.h"
#include "twine/menu/interface.h"
#include "twine/renderer/redraw.h"
#include "twine/renderer/renderer.h"
#include "twine/scene/scene.h"
#include "twine/twine.h"
namespace TwinE {

View File

@ -23,11 +23,11 @@
#include "twine/flamovies.h"
#include "common/file.h"
#include "common/system.h"
#include "twine/grid.h"
#include "twine/audio/music.h"
#include "twine/audio/sound.h"
#include "twine/scene/grid.h"
#include "twine/input.h"
#include "twine/music.h"
#include "twine/screens.h"
#include "twine/sound.h"
#include "twine/renderer/screens.h"
#include "twine/twine.h"
namespace TwinE {
@ -181,7 +181,7 @@ void FlaMovies::processFrame() {
return;
}
uint8 *outBuf = (uint8*)_engine->workVideoBuffer.getPixels();
uint8 *outBuf = (uint8 *)_engine->workVideoBuffer.getPixels();
file.read(outBuf, frameData.frameVar0);
if ((int32)frameData.videoSize <= 0) {

View File

@ -23,14 +23,14 @@
#include "twine/holomap.h"
#include "common/memstream.h"
#include "common/types.h"
#include "twine/gamestate.h"
#include "twine/audio/sound.h"
#include "twine/scene/gamestate.h"
#include "twine/hqr.h"
#include "twine/interface.h"
#include "twine/renderer.h"
#include "twine/menu/interface.h"
#include "twine/renderer/renderer.h"
#include "twine/renderer/screens.h"
#include "twine/resources.h"
#include "twine/scene.h"
#include "twine/screens.h"
#include "twine/sound.h"
#include "twine/scene/scene.h"
#include "twine/text.h"
#include "twine/twine.h"

View File

@ -25,7 +25,7 @@
#include "common/events.h"
#include "common/keyboard.h"
#include "common/system.h"
#include "twine/actor.h"
#include "twine/scene/actor.h"
#include "twine/twine.h"
namespace TwinE {

View File

@ -20,7 +20,7 @@
*
*/
#include "twine/interface.h"
#include "twine/menu/interface.h"
#include "graphics/managed_surface.h"
#include "twine/twine.h"

View File

@ -20,7 +20,7 @@
*
*/
#include "twine/menu.h"
#include "twine/menu/menu.h"
#include "audio/mixer.h"
#include "backends/audiocd/audiocd.h"
#include "backends/keymapper/keymapper.h"
@ -31,22 +31,22 @@
#include "common/system.h"
#include "common/util.h"
#include "graphics/cursorman.h"
#include "twine/actor.h"
#include "twine/animations.h"
#include "twine/gamestate.h"
#include "twine/grid.h"
#include "twine/scene/actor.h"
#include "twine/scene/animations.h"
#include "twine/audio/music.h"
#include "twine/audio/sound.h"
#include "twine/scene/gamestate.h"
#include "twine/scene/grid.h"
#include "twine/hqr.h"
#include "twine/input.h"
#include "twine/interface.h"
#include "twine/menuoptions.h"
#include "twine/movements.h"
#include "twine/music.h"
#include "twine/redraw.h"
#include "twine/renderer.h"
#include "twine/menu/interface.h"
#include "twine/menu/menuoptions.h"
#include "twine/scene/movements.h"
#include "twine/renderer/redraw.h"
#include "twine/renderer/renderer.h"
#include "twine/renderer/screens.h"
#include "twine/resources.h"
#include "twine/scene.h"
#include "twine/screens.h"
#include "twine/sound.h"
#include "twine/scene/scene.h"
#include "twine/text.h"
#include "twine/twine.h"
@ -70,7 +70,10 @@ enum _MenuButtonTypes {
};
}
#define checkMenuQuit(callMenu) if ((callMenu) == kQuitEngine) { return kQuitEngine; }
#define checkMenuQuit(callMenu) \
if ((callMenu) == kQuitEngine) { \
return kQuitEngine; \
}
#define kBackground 9999
namespace _priv {
@ -670,16 +673,13 @@ int32 Menu::optionsMenu() {
return 0;
}
case TextId::kVolumeSettings: {
checkMenuQuit(volumeMenu())
break;
checkMenuQuit(volumeMenu()) break;
}
case TextId::kSaveManage: {
checkMenuQuit(savemanageMenu())
break;
checkMenuQuit(savemanageMenu()) break;
}
case TextId::kAdvanced: {
checkMenuQuit(advoptionsMenu())
break;
checkMenuQuit(advoptionsMenu()) break;
}
case kQuitEngine:
return kQuitEngine;
@ -692,28 +692,26 @@ int32 Menu::optionsMenu() {
}
static const byte cursorArrow[] = {
1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1, 0, 1, 3, 3, 3, 3, 3, 3, 3, 3,
1, 0, 0, 1, 3, 3, 3, 3, 3, 3, 3,
1, 0, 0, 0, 1, 3, 3, 3, 3, 3, 3,
1, 0, 0, 0, 0, 1, 3, 3, 3, 3, 3,
1, 0, 0, 0, 0, 0, 1, 3, 3, 3, 3,
1, 0, 0, 0, 0, 0, 0, 1, 3, 3, 3,
1, 0, 0, 0, 0, 0, 0, 0, 1, 3, 3,
1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3,
1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
1, 0, 0, 1, 0, 0, 1, 3, 3, 3, 3,
1, 0, 1, 3, 1, 0, 0, 1, 3, 3, 3,
1, 1, 3, 3, 1, 0, 0, 1, 3, 3, 3,
1, 3, 3, 3, 3, 1, 0, 0, 1, 3, 3,
3, 3, 3, 3, 3, 1, 0, 0, 1, 3, 3,
3, 3, 3, 3, 3, 3, 1, 1, 1, 3, 3
};
1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1, 0, 1, 3, 3, 3, 3, 3, 3, 3, 3,
1, 0, 0, 1, 3, 3, 3, 3, 3, 3, 3,
1, 0, 0, 0, 1, 3, 3, 3, 3, 3, 3,
1, 0, 0, 0, 0, 1, 3, 3, 3, 3, 3,
1, 0, 0, 0, 0, 0, 1, 3, 3, 3, 3,
1, 0, 0, 0, 0, 0, 0, 1, 3, 3, 3,
1, 0, 0, 0, 0, 0, 0, 0, 1, 3, 3,
1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3,
1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
1, 0, 0, 1, 0, 0, 1, 3, 3, 3, 3,
1, 0, 1, 3, 1, 0, 0, 1, 3, 3, 3,
1, 1, 3, 3, 1, 0, 0, 1, 3, 3, 3,
1, 3, 3, 3, 3, 1, 0, 0, 1, 3, 3,
3, 3, 3, 3, 3, 1, 0, 0, 1, 3, 3,
3, 3, 3, 3, 3, 3, 1, 1, 1, 3, 3};
static const byte cursorPalette[] = {
0, 0, 0,
0xff, 0xff, 0xff
};
0, 0, 0,
0xff, 0xff, 0xff};
bool Menu::init() {
// load menu effect file only once
@ -1104,8 +1102,8 @@ void Menu::processInventoryMenu() {
if (_engine->_gameState->inventoryNumLeafs > 0) {
_engine->_gameState->giveItem(InventoryItems::kiCloverLeaf);
// TODO: shouldn't this get reset? } else {
// _engine->_gameState->removeItem(InventoryItems::kiCloverLeaf);
// TODO: shouldn't this get reset? } else {
// _engine->_gameState->removeItem(InventoryItems::kiCloverLeaf);
}
drawInventoryItems();

View File

@ -23,7 +23,7 @@
#ifndef TWINE_MENU_H
#define TWINE_MENU_H
#include "twine/actor.h"
#include "twine/scene/actor.h"
#include "twine/twine.h"
#include "twine/text.h"

View File

@ -20,23 +20,23 @@
*
*/
#include "twine/menuoptions.h"
#include "twine/menu/menuoptions.h"
#include "common/error.h"
#include "common/keyboard.h"
#include "common/str-array.h"
#include "common/system.h"
#include "common/util.h"
#include "savestate.h"
#include "twine/audio/music.h"
#include "twine/audio/sound.h"
#include "twine/flamovies.h"
#include "twine/gamestate.h"
#include "twine/scene/gamestate.h"
#include "twine/input.h"
#include "twine/interface.h"
#include "twine/menu.h"
#include "twine/music.h"
#include "twine/menu/interface.h"
#include "twine/menu/menu.h"
#include "twine/renderer/screens.h"
#include "twine/resources.h"
#include "twine/scene.h"
#include "twine/screens.h"
#include "twine/sound.h"
#include "twine/scene/scene.h"
#include "twine/text.h"
#include "twine/twine.h"
@ -145,7 +145,7 @@ void MenuOptions::drawSelectableCharacter(int32 x, int32 y) {
--_onScreenKeyboardDirty[idx];
const char buffer[] { allowedCharIndex[idx], '\0' };
const char buffer[]{allowedCharIndex[idx], '\0'};
const bool selected = _onScreenKeyboardX == x && _onScreenKeyboardY == y;
if (selected) {
@ -225,6 +225,7 @@ class ScopedFeatureState {
private:
OSystem::Feature _feature;
bool _changeTo;
public:
ScopedFeatureState(OSystem::Feature feature, bool enable) : _feature(feature), _changeTo(enable) {
if (g_system->getFeatureState(feature) != enable) {
@ -352,7 +353,7 @@ bool MenuOptions::newGameMenu() {
}
int MenuOptions::chooseSave(int textIdx, bool showEmptySlots) {
const SaveStateList& savegames = _engine->getSaveSlots();
const SaveStateList &savegames = _engine->getSaveSlots();
if (savegames.empty() && !showEmptySlots) {
return -1;
}
@ -363,7 +364,7 @@ int MenuOptions::chooseSave(int textIdx, bool showEmptySlots) {
saveFiles.addButton(TextId::kReturnMenu);
const int maxButtons = _engine->getMetaEngine().getMaximumSaveSlot() + 1;
for (const SaveStateDescriptor& savegame : savegames) {
for (const SaveStateDescriptor &savegame : savegames) {
saveFiles.addButton(savegame.getDescription().encode().c_str(), savegame.getSaveSlot());
if (saveFiles.getButtonCount() >= maxButtons) {
break;

View File

@ -27,7 +27,7 @@
#define ONSCREENKEYBOARD_HEIGHT 5
#include "common/scummsys.h"
#include "twine/actor.h"
#include "twine/scene/actor.h"
namespace TwinE {

View File

@ -1,38 +1,45 @@
MODULE := engines/twine
MODULE_OBJS := \
audio/music.o \
audio/sound.o \
\
debugger/console.o \
debugger/debug.o \
debugger/debug_grid.o \
debugger/debug_scene.o \
\
menu/interface.o \
menu/menu.o \
menu/menuoptions.o \
\
parser/anim.o \
parser/body.o \
parser/entity.o \
actor.o \
animations.o \
collision.o \
console.o \
debug.o \
debug_grid.o \
debug_scene.o \
\
renderer/redraw.o \
renderer/renderer.o \
renderer/screens.o \
\
scene/actor.o \
scene/animations.o \
scene/collision.o \
scene/extra.o \
scene/gamestate.o \
scene/grid.o \
scene/movements.o \
scene/scene.o \
\
script/script_life_v1.o \
script/script_move_v1.o \
\
detection.o \
extra.o \
flamovies.o \
gamestate.o \
grid.o \
holomap.o \
hqr.o \
interface.o \
input.o \
menu.o \
menuoptions.o \
metaengine.o \
movements.o \
music.o \
redraw.o \
renderer.o \
resources.o \
scene.o \
screens.o \
script_life_v1.o \
script_move_v1.o \
sound.o \
text.o \
twine.o

View File

@ -21,7 +21,7 @@
*/
#include "twine/parser/body.h"
#include "twine/renderer.h"
#include "twine/renderer/renderer.h"
#include "common/memstream.h"
namespace TwinE {

View File

@ -20,25 +20,25 @@
*
*/
#include "twine/redraw.h"
#include "twine/renderer/redraw.h"
#include "common/memstream.h"
#include "common/textconsole.h"
#include "graphics/surface.h"
#include "twine/actor.h"
#include "twine/animations.h"
#include "twine/collision.h"
#include "twine/debug_scene.h"
#include "twine/grid.h"
#include "twine/scene/actor.h"
#include "twine/scene/animations.h"
#include "twine/audio/sound.h"
#include "twine/scene/collision.h"
#include "twine/debugger/debug_scene.h"
#include "twine/scene/grid.h"
#include "twine/hqr.h"
#include "twine/input.h"
#include "twine/interface.h"
#include "twine/menu.h"
#include "twine/movements.h"
#include "twine/renderer.h"
#include "twine/menu/interface.h"
#include "twine/menu/menu.h"
#include "twine/scene/movements.h"
#include "twine/renderer/renderer.h"
#include "twine/renderer/screens.h"
#include "twine/resources.h"
#include "twine/scene.h"
#include "twine/screens.h"
#include "twine/sound.h"
#include "twine/scene/scene.h"
#include "twine/text.h"
namespace TwinE {

View File

@ -20,16 +20,16 @@
*
*/
#include "twine/renderer.h"
#include "twine/renderer/renderer.h"
#include "common/memstream.h"
#include "common/stream.h"
#include "common/textconsole.h"
#include "common/util.h"
#include "twine/actor.h"
#include "twine/interface.h"
#include "twine/menu.h"
#include "twine/movements.h"
#include "twine/redraw.h"
#include "twine/scene/actor.h"
#include "twine/menu/interface.h"
#include "twine/menu/menu.h"
#include "twine/scene/movements.h"
#include "twine/renderer/redraw.h"
#include "twine/shadeangletab.h"
#include "twine/shared.h"
#include "twine/twine.h"
@ -1030,7 +1030,7 @@ uint8 *Renderer::prepareLines(Common::MemoryReadStream &stream, int32 &numOfPrim
lineCoordinatesPtr->colorIndex = stream.readByte();
stream.skip(3);
const int32 point1Index = stream.readSint16LE() / 6;
const int32 point2Index = stream.readSint16LE()/ 6;
const int32 point2Index = stream.readSint16LE() / 6;
lineCoordinatesPtr->x1 = modelData->flattenPoints[point1Index].x;
lineCoordinatesPtr->y1 = modelData->flattenPoints[point1Index].y;
lineCoordinatesPtr->x2 = modelData->flattenPoints[point2Index].x;
@ -1434,7 +1434,7 @@ void Renderer::prepareIsoModel(uint8 *bodyPtr) { // loadGfxSub
// set up bone indices
for (int32 i = 0; i < numBones; i++) {
bonesBase += sizeof(elementEntry);
elementEntry *ee = (elementEntry*)bonesBase;
elementEntry *ee = (elementEntry *)bonesBase;
ee->baseElement = ee->baseElement / sizeof(elementEntry);
}
}

View File

@ -20,11 +20,11 @@
*
*/
#include "twine/renderer/screens.h"
#include "common/system.h"
#include "graphics/surface.h"
#include "twine/screens.h"
#include "twine/hqr.h"
#include "twine/music.h"
#include "twine/audio/music.h"
#include "twine/resources.h"
#include "twine/twine.h"
@ -41,7 +41,7 @@ bool Screens::adelineLogo() {
}
void Screens::loadMenuImage(bool fade_in) {
if (HQR::getEntry((uint8*)_engine->workVideoBuffer.getPixels(), Resources::HQR_RESS_FILE, RESSHQR_MENUIMG) == 0) {
if (HQR::getEntry((uint8 *)_engine->workVideoBuffer.getPixels(), Resources::HQR_RESS_FILE, RESSHQR_MENUIMG) == 0) {
warning("Failed to load menu image");
return;
}
@ -63,8 +63,8 @@ void Screens::loadCustomPalette(int32 index) {
convertPalToRGBA(palette, paletteRGBACustom);
}
void Screens::convertPalToRGBA(const uint8* in, uint32* out) {
uint8* paletteOut = (uint8*)out;
void Screens::convertPalToRGBA(const uint8 *in, uint32 *out) {
uint8 *paletteOut = (uint8 *)out;
for (int i = 0; i < NUMOFCOLORS; i++) {
paletteOut[0] = in[0];
paletteOut[1] = in[1];
@ -75,7 +75,7 @@ void Screens::convertPalToRGBA(const uint8* in, uint32* out) {
}
void Screens::loadImage(int32 index, bool fade_in) {
if (HQR::getEntry((uint8*)_engine->workVideoBuffer.getPixels(), Resources::HQR_RESS_FILE, index) == 0) {
if (HQR::getEntry((uint8 *)_engine->workVideoBuffer.getPixels(), Resources::HQR_RESS_FILE, index) == 0) {
warning("Failed to load image with index %i", index);
return;
}
@ -133,8 +133,8 @@ void Screens::adjustPalette(uint8 R, uint8 G, uint8 B, const uint32 *rgbaPal, in
int32 counter = 0;
const uint8 *paletteIn = (const uint8*)rgbaPal;
uint8 *paletteOut = (uint8*)pal;
const uint8 *paletteIn = (const uint8 *)rgbaPal;
uint8 *paletteOut = (uint8 *)pal;
uint8 *newR = &paletteOut[0];
uint8 *newG = &paletteOut[1];
uint8 *newB = &paletteOut[2];
@ -163,9 +163,9 @@ void Screens::adjustCrossPalette(const uint32 *pal1, const uint32 *pal2) {
int32 counter = 0;
int32 intensity = 0;
const uint8 *pal1p = (const uint8*)pal1;
const uint8 *pal2p = (const uint8*)pal2;
uint8 *paletteOut = (uint8*)pal;
const uint8 *pal1p = (const uint8 *)pal1;
const uint8 *pal2p = (const uint8 *)pal2;
uint8 *paletteOut = (uint8 *)pal;
do {
counter = 0;
@ -252,7 +252,7 @@ void Screens::fadeRedPal(const uint32 *pal) {
}
}
void Screens::copyScreen(const Graphics::ManagedSurface& source, Graphics::ManagedSurface &destination) {
void Screens::copyScreen(const Graphics::ManagedSurface &source, Graphics::ManagedSurface &destination) {
destination.blitFrom(source);
}

View File

@ -22,10 +22,10 @@
#include "twine/resources.h"
#include "common/util.h"
#include "twine/animations.h"
#include "twine/scene.h"
#include "twine/screens.h"
#include "twine/sound.h"
#include "twine/scene/animations.h"
#include "twine/audio/sound.h"
#include "twine/renderer/screens.h"
#include "twine/scene/scene.h"
#include "twine/text.h"
namespace TwinE {

View File

@ -24,7 +24,7 @@
#define TWINE_RESOURCES_H
#include "common/scummsys.h"
#include "twine/gamestate.h"
#include "twine/scene/gamestate.h"
#include "twine/hqr.h"
namespace TwinE {

View File

@ -20,22 +20,22 @@
*
*/
#include "twine/actor.h"
#include "twine/scene/actor.h"
#include "common/memstream.h"
#include "common/system.h"
#include "common/textconsole.h"
#include "twine/animations.h"
#include "twine/parser/entity.h"
#include "twine/extra.h"
#include "twine/gamestate.h"
#include "twine/grid.h"
#include "twine/scene/animations.h"
#include "twine/audio/sound.h"
#include "twine/scene/extra.h"
#include "twine/scene/gamestate.h"
#include "twine/scene/grid.h"
#include "twine/hqr.h"
#include "twine/movements.h"
#include "twine/renderer.h"
#include "twine/scene/movements.h"
#include "twine/parser/entity.h"
#include "twine/renderer/renderer.h"
#include "twine/renderer/screens.h"
#include "twine/resources.h"
#include "twine/scene.h"
#include "twine/screens.h"
#include "twine/sound.h"
#include "twine/scene/scene.h"
#include "twine/twine.h"
namespace TwinE {
@ -81,7 +81,7 @@ void Actor::restartHeroScene() {
cropBottomScreen = 0;
}
int32 Actor::loadBehaviourEntity(ActorStruct *sceneHero, uint8 **ptr, int16& bodyAnimIndex, int32 index) {
int32 Actor::loadBehaviourEntity(ActorStruct *sceneHero, uint8 **ptr, int16 &bodyAnimIndex, int32 index) {
const int32 size = HQR::getAllocEntry(ptr, Resources::HQR_FILE3D_FILE, index);
if (size == 0) {
error("Failed to load actor 3d data for index: %i", index);
@ -283,7 +283,7 @@ void Actor::initModelActor(int32 bodyIdx, int16 actorIdx) {
bbox.z.topRight = actorBoundingBox.topRightZ;
} else {
ZVBox &bbox = localActor->boudingBox;
const BodyData& bd = bodyData[localActor->entity];
const BodyData &bd = bodyData[localActor->entity];
bbox.y.bottomLeft = bd.minsy;
bbox.y.topRight = bd.maxsy;
@ -534,5 +534,4 @@ int32 ActorMoveStruct::getRealValue(int32 time) {
return tempStep + from;
}
} // namespace TwinE

View File

@ -20,25 +20,25 @@
*
*/
#include "twine/animations.h"
#include "twine/scene/animations.h"
#include "common/endian.h"
#include "common/memstream.h"
#include "common/stream.h"
#include "common/system.h"
#include "common/textconsole.h"
#include "common/util.h"
#include "twine/actor.h"
#include "twine/collision.h"
#include "twine/scene/actor.h"
#include "twine/audio/sound.h"
#include "twine/scene/collision.h"
#include "twine/scene/gamestate.h"
#include "twine/scene/grid.h"
#include "twine/scene/movements.h"
#include "twine/parser/anim.h"
#include "twine/parser/entity.h"
#include "twine/gamestate.h"
#include "twine/grid.h"
#include "twine/movements.h"
#include "twine/renderer.h"
#include "twine/renderer/renderer.h"
#include "twine/resources.h"
#include "twine/scene.h"
#include "twine/scene/scene.h"
#include "twine/shared.h"
#include "twine/sound.h"
#include "twine/twine.h"
namespace TwinE {
@ -70,7 +70,7 @@ int32 Animations::getBodyAnimIndex(AnimationTypes animIdx, int32 actorIdx) {
return bodyAnimIndex;
}
const uint8* Animations::getKeyFrameData(int32 frameIdx, const uint8 *animPtr) {
const uint8 *Animations::getKeyFrameData(int32 frameIdx, const uint8 *animPtr) {
const int16 numOfBonesInAnim = READ_LE_INT16(animPtr + 2);
return (const uint8 *)((numOfBonesInAnim * 8 + 8) * frameIdx + animPtr + 8);
}
@ -133,7 +133,7 @@ bool Animations::setModelAnimation(int32 keyframeIdx, const uint8 *animPtr, uint
}
AnimData animData;
animData.loadFromBuffer(animPtr, 100000);
const KeyFrame* keyFrame = animData.getKeyframe(keyframeIdx);
const KeyFrame *keyFrame = animData.getKeyframe(keyframeIdx);
currentStepX = keyFrame->x;
currentStepY = keyFrame->y;
@ -185,7 +185,7 @@ bool Animations::setModelAnimation(int32 keyframeIdx, const uint8 *animPtr, uint
int16 tmpNumOfPoints = numOfBonesInAnim - 1;
int boneIdx = 1;
do {
uint8* const bonesPtr = Model::getBonesStateData(bodyPtr, boneIdx);
uint8 *const bonesPtr = Model::getBonesStateData(bodyPtr, boneIdx);
const int16 animOpcode = getAnimMode(bonesPtr + 0, keyFramePtr + 0);
switch (animOpcode) {
@ -224,7 +224,7 @@ void Animations::setAnimAtKeyframe(int32 keyframeIdx, const uint8 *animPtr, uint
return;
}
const KeyFrame* keyFrame = animData.getKeyframe(keyframeIdx);
const KeyFrame *keyFrame = animData.getKeyframe(keyframeIdx);
currentStepX = keyFrame->x;
currentStepY = keyFrame->y;
@ -286,7 +286,7 @@ void Animations::stockAnimation(const uint8 *bodyPtr, AnimTimerDataStruct *animT
bool Animations::verifyAnimAtKeyframe(int32 keyframeIdx, const uint8 *animPtr, AnimTimerDataStruct *animTimerDataPtr) {
AnimData animData;
animData.loadFromBuffer(animPtr, 100000);
const KeyFrame* keyFrame = animData.getKeyframe(keyframeIdx);
const KeyFrame *keyFrame = animData.getKeyframe(keyframeIdx);
const int32 keyFrameLength = keyFrame->length;
int32 remainingFrameTime = animTimerDataPtr->time;
@ -300,12 +300,13 @@ bool Animations::verifyAnimAtKeyframe(int32 keyframeIdx, const uint8 *animPtr, A
currentStepY = keyFrame->y;
currentStepZ = keyFrame->z;
const BoneFrame& boneFrame = keyFrame->boneframes[0];
const BoneFrame &boneFrame = keyFrame->boneframes[0];
processRotationByAnim = boneFrame.type;
processLastRotationAngle = ToAngle(boneFrame.y);
if (deltaTime >= keyFrameLength) {
animTimerDataPtr->ptr = getKeyFrameData(keyframeIdx, animPtr);;
animTimerDataPtr->ptr = getKeyFrameData(keyframeIdx, animPtr);
;
animTimerDataPtr->time = _engine->lbaTime;
return true;
}
@ -685,7 +686,7 @@ void Animations::processActorAnimations(int32 actorIdx) { // DoAnim
// actor standing on another actor
if (actor->standOn != -1) {
const ActorStruct* standOnActor = _engine->_scene->getActor(actor->standOn);
const ActorStruct *standOnActor = _engine->_scene->getActor(actor->standOn);
_engine->_movements->processActorX -= standOnActor->collisionX;
_engine->_movements->processActorY -= standOnActor->collisionY;
_engine->_movements->processActorZ -= standOnActor->collisionZ;

View File

@ -24,8 +24,8 @@
#define TWINE_ANIMATIONS_H
#include "common/scummsys.h"
#include "twine/actor.h"
#include "twine/scene.h"
#include "twine/scene/actor.h"
#include "twine/scene/scene.h"
namespace TwinE {

View File

@ -20,18 +20,18 @@
*
*/
#include "common/memstream.h"
#include "twine/actor.h"
#include "twine/animations.h"
#include "twine/collision.h"
#include "twine/scene/collision.h"
#include "common/debug.h"
#include "common/memstream.h"
#include "common/util.h"
#include "twine/extra.h"
#include "twine/grid.h"
#include "twine/movements.h"
#include "twine/renderer.h"
#include "twine/scene/actor.h"
#include "twine/scene/animations.h"
#include "twine/scene/extra.h"
#include "twine/scene/grid.h"
#include "twine/scene/movements.h"
#include "twine/renderer/renderer.h"
#include "twine/resources.h"
#include "twine/scene.h"
#include "twine/scene/scene.h"
#include "twine/shared.h"
#include "twine/twine.h"

View File

@ -24,7 +24,7 @@
#define TWINE_COLLISION_H
#include "common/scummsys.h"
#include "twine/extra.h"
#include "twine/scene/extra.h"
namespace TwinE {

View File

@ -20,21 +20,21 @@
*
*/
#include "twine/extra.h"
#include "twine/scene/extra.h"
#include "common/memstream.h"
#include "common/util.h"
#include "twine/actor.h"
#include "twine/collision.h"
#include "twine/gamestate.h"
#include "twine/grid.h"
#include "twine/scene/actor.h"
#include "twine/audio/sound.h"
#include "twine/scene/collision.h"
#include "twine/scene/gamestate.h"
#include "twine/scene/grid.h"
#include "twine/input.h"
#include "twine/interface.h"
#include "twine/movements.h"
#include "twine/redraw.h"
#include "twine/renderer.h"
#include "twine/menu/interface.h"
#include "twine/scene/movements.h"
#include "twine/renderer/redraw.h"
#include "twine/renderer/renderer.h"
#include "twine/resources.h"
#include "twine/scene.h"
#include "twine/sound.h"
#include "twine/scene/scene.h"
#include "twine/twine.h"
namespace TwinE {

View File

@ -20,7 +20,7 @@
*
*/
#include "twine/actor.h"
#include "twine/scene/actor.h"
#include "common/scummsys.h"
#ifndef TWINE_EXTRA_H

View File

@ -20,30 +20,30 @@
*
*/
#include "twine/gamestate.h"
#include "twine/scene/gamestate.h"
#include "common/file.h"
#include "common/rect.h"
#include "common/str.h"
#include "common/system.h"
#include "common/textconsole.h"
#include "common/util.h"
#include "twine/actor.h"
#include "twine/animations.h"
#include "twine/collision.h"
#include "twine/extra.h"
#include "twine/grid.h"
#include "twine/scene/actor.h"
#include "twine/scene/animations.h"
#include "twine/audio/music.h"
#include "twine/audio/sound.h"
#include "twine/scene/collision.h"
#include "twine/scene/extra.h"
#include "twine/scene/grid.h"
#include "twine/input.h"
#include "twine/interface.h"
#include "twine/menu.h"
#include "twine/menuoptions.h"
#include "twine/music.h"
#include "twine/redraw.h"
#include "twine/renderer.h"
#include "twine/menu/interface.h"
#include "twine/menu/menu.h"
#include "twine/menu/menuoptions.h"
#include "twine/renderer/redraw.h"
#include "twine/renderer/renderer.h"
#include "twine/renderer/screens.h"
#include "twine/resources.h"
#include "twine/scene.h"
#include "twine/screens.h"
#include "twine/scene/scene.h"
#include "twine/shared.h"
#include "twine/sound.h"
#include "twine/text.h"
#include "twine/twine.h"

View File

@ -25,9 +25,9 @@
#include "common/savefile.h"
#include "common/scummsys.h"
#include "twine/actor.h"
#include "twine/scene/actor.h"
#include "twine/holomap.h"
#include "twine/menu.h"
#include "twine/menu/menu.h"
namespace TwinE {

View File

@ -20,18 +20,18 @@
*
*/
#include "twine/grid.h"
#include "twine/scene/grid.h"
#include "common/endian.h"
#include "common/memstream.h"
#include "common/textconsole.h"
#include "twine/actor.h"
#include "twine/collision.h"
#include "twine/interface.h"
#include "twine/redraw.h"
#include "twine/renderer.h"
#include "twine/scene/actor.h"
#include "twine/scene/collision.h"
#include "twine/menu/interface.h"
#include "twine/renderer/redraw.h"
#include "twine/renderer/renderer.h"
#include "twine/renderer/screens.h"
#include "twine/resources.h"
#include "twine/scene.h"
#include "twine/screens.h"
#include "twine/scene/scene.h"
#include "twine/twine.h"
namespace TwinE {
@ -53,7 +53,7 @@ Grid::~Grid() {
free(currentBll);
}
void Grid::copyGridMask(int32 index, int32 x, int32 y, const Graphics::ManagedSurface& buffer) {
void Grid::copyGridMask(int32 index, int32 x, int32 y, const Graphics::ManagedSurface &buffer) {
uint8 *ptr = brickMaskTable[index];
int32 left = x + *(ptr + 2);
@ -109,7 +109,7 @@ void Grid::copyGridMask(int32 index, int32 x, int32 y, const Graphics::ManagedSu
}
uint8 *outPtr = (uint8 *)_engine->frontVideoBuffer.getBasePtr(left, absY);
const uint8 *inPtr = (const uint8*)buffer.getBasePtr(left, absY);
const uint8 *inPtr = (const uint8 *)buffer.getBasePtr(left, absY);
do {
int32 vc3 = *(ptr++);
@ -537,14 +537,14 @@ void Grid::drawBrickSprite(int32 index, int32 posX, int32 posY, const uint8 *ptr
}
}
uint8* Grid::getBlockBuffer(int32 x, int32 y, int32 z) {
uint8 *Grid::getBlockBuffer(int32 x, int32 y, int32 z) {
const int32 tempX = (x + 0x100) >> 9;
const int32 tempY = y >> 8;
const int32 tempZ = (z + 0x100) >> 9;
return blockBuffer + tempY * 2 + tempX * GRID_SIZE_Y * 2 + (tempZ << 6) * GRID_SIZE_Y * 2;
}
const uint8* Grid::getBlockBufferGround(int32 x, int32 y, int32 z, int16 &ground) const {
const uint8 *Grid::getBlockBufferGround(int32 x, int32 y, int32 z, int16 &ground) const {
_engine->_grid->updateCollisionCoordinates(x, y, z);
const int32 tempX = _engine->_collision->collisionX;
int32 tempY = _engine->_collision->collisionY;
@ -687,7 +687,7 @@ ShapeType Grid::getBrickShape(int32 x, int32 y, int32 z) {
return (ShapeType)*blockPtr;
}
return (ShapeType)*(blockBufferPtr + 1);
return (ShapeType) * (blockBufferPtr + 1);
}
void Grid::updateCollisionCoordinates(int32 x, int32 y, int32 z) {
@ -747,7 +747,7 @@ ShapeType Grid::getBrickShapeFull(int32 x, int32 y, int32 z, int32 y2) {
return brickShape;
}
const ShapeType brickShape = (ShapeType)*(blockBufferPtr + 1);
const ShapeType brickShape = (ShapeType) * (blockBufferPtr + 1);
const int32 newY = (y2 + 255) >> 8;
int32 currY = _engine->_collision->collisionY;

View File

@ -20,16 +20,16 @@
*
*/
#include "twine/movements.h"
#include "twine/scene/movements.h"
#include "common/textconsole.h"
#include "twine/actor.h"
#include "twine/animations.h"
#include "twine/collision.h"
#include "twine/gamestate.h"
#include "twine/grid.h"
#include "twine/scene/actor.h"
#include "twine/scene/animations.h"
#include "twine/scene/collision.h"
#include "twine/scene/gamestate.h"
#include "twine/scene/grid.h"
#include "twine/input.h"
#include "twine/renderer.h"
#include "twine/scene.h"
#include "twine/renderer/renderer.h"
#include "twine/scene/scene.h"
#include "twine/text.h"
#include "twine/twine.h"
@ -44,7 +44,7 @@ void Movements::getShadowPosition(int32 x, int32 y, int32 z) {
if (*ptr) {
const uint8 *blockPtr = _engine->_grid->getBlockLibrary(*ptr - 1) + 3 + *(ptr + 1) * 4;
const ShapeType brickShape = (ShapeType)*((const uint8 *)(blockPtr));
const ShapeType brickShape = (ShapeType) * ((const uint8 *)(blockPtr));
_engine->_actor->shadowCollisionType = brickShape;
} else {
_engine->_actor->shadowCollisionType = ShapeType::kNone;
@ -172,7 +172,7 @@ void Movements::moveActor(int32 angleFrom, int32 angleTo, int32 speed, ActorMove
movePtr->timeOfChange = _engine->lbaTime;
}
void Movements::ChangedCursorKeys::update(TwinEEngine* engine) {
void Movements::ChangedCursorKeys::update(TwinEEngine *engine) {
if (engine->_input->isActionActive(TwinEActionType::TurnLeft)) {
leftChange = leftDown == 0;
leftDown = 1;
@ -368,7 +368,7 @@ void Movements::processManualAction(int actorIdx) {
void Movements::processFollowAction(int actorIdx) {
ActorStruct *actor = _engine->_scene->getActor(actorIdx);
const ActorStruct* followedActor = _engine->_scene->getActor(actor->followedActor);
const ActorStruct *followedActor = _engine->_scene->getActor(actor->followedActor);
int32 newAngle = getAngleAndSetTargetActorDistance(actor->x, actor->z, followedActor->x, followedActor->z);
if (actor->staticFlags.bIsSpriteActor) {
actor->angle = newAngle;
@ -407,7 +407,7 @@ void Movements::processTrackAction(int actorIdx) {
void Movements::processSameXZAction(int actorIdx) {
ActorStruct *actor = _engine->_scene->getActor(actorIdx);
const ActorStruct* followedActor = _engine->_scene->getActor(actor->followedActor);
const ActorStruct *followedActor = _engine->_scene->getActor(actor->followedActor);
actor->x = followedActor->x;
actor->z = followedActor->z;
}

View File

@ -23,7 +23,7 @@
#ifndef TWINE_MOVEMENTS_H
#define TWINE_MOVEMENTS_H
#include "twine/actor.h"
#include "twine/scene/actor.h"
#include "common/scummsys.h"
namespace TwinE {

View File

@ -20,24 +20,24 @@
*
*/
#include "twine/scene.h"
#include "twine/scene/scene.h"
#include "common/memstream.h"
#include "common/stream.h"
#include "common/util.h"
#include "twine/actor.h"
#include "twine/animations.h"
#include "twine/debug_grid.h"
#include "twine/debug_scene.h"
#include "twine/extra.h"
#include "twine/gamestate.h"
#include "twine/grid.h"
#include "twine/movements.h"
#include "twine/music.h"
#include "twine/redraw.h"
#include "twine/renderer.h"
#include "twine/scene/actor.h"
#include "twine/scene/animations.h"
#include "twine/audio/music.h"
#include "twine/audio/sound.h"
#include "twine/debugger/debug_grid.h"
#include "twine/debugger/debug_scene.h"
#include "twine/scene/extra.h"
#include "twine/scene/gamestate.h"
#include "twine/scene/grid.h"
#include "twine/scene/movements.h"
#include "twine/renderer/redraw.h"
#include "twine/renderer/renderer.h"
#include "twine/renderer/screens.h"
#include "twine/resources.h"
#include "twine/screens.h"
#include "twine/sound.h"
#include "twine/text.h"
#include "twine/twine.h"
@ -47,7 +47,7 @@ Scene::~Scene() {
free(currentScene);
}
void Scene::setActorStaticFlags(ActorStruct* act, uint16 staticFlags) {
void Scene::setActorStaticFlags(ActorStruct *act, uint16 staticFlags) {
if (staticFlags & 0x1) {
act->staticFlags.bComputeCollisionWithObj = 1;
}
@ -99,7 +99,7 @@ void Scene::setActorStaticFlags(ActorStruct* act, uint16 staticFlags) {
}
}
void Scene::setBonusParameterFlags(ActorStruct* act, uint16 bonusFlags) {
void Scene::setBonusParameterFlags(ActorStruct *act, uint16 bonusFlags) {
if (bonusFlags & 0x1) {
act->bonusParameter.unk1 = 1;
}
@ -183,13 +183,13 @@ bool Scene::loadSceneLBA1() {
for (int32 i = 1; i < sceneNumActors; i++, cnt++) {
_engine->_actor->resetActor(i);
ActorStruct* act = &_sceneActors[i];
ActorStruct *act = &_sceneActors[i];
setActorStaticFlags(act, stream.readUint16LE());
act->loadModel(stream.readUint16LE());
act->body = stream.readByte();
act->anim = (AnimationTypes) stream.readByte();
act->anim = (AnimationTypes)stream.readByte();
act->sprite = stream.readUint16LE();
act->x = stream.readUint16LE();
act->collisionX = act->x;
@ -229,7 +229,7 @@ bool Scene::loadSceneLBA1() {
sceneNumZones = stream.readUint16LE();
for (int32 i = 0; i < sceneNumZones; i++) {
ZoneStruct* zone = &sceneZones[i];
ZoneStruct *zone = &sceneZones[i];
zone->bottomLeft.x = stream.readUint16LE();
zone->bottomLeft.y = stream.readUint16LE();
zone->bottomLeft.z = stream.readUint16LE();
@ -250,7 +250,7 @@ bool Scene::loadSceneLBA1() {
sceneNumTracks = stream.readUint16LE();
for (int32 i = 0; i < sceneNumTracks; i++) {
ScenePoint* point = &sceneTracks[i];
ScenePoint *point = &sceneTracks[i];
point->x = stream.readUint16LE();
point->y = stream.readUint16LE();
point->z = stream.readUint16LE();

View File

@ -25,7 +25,7 @@
#include "common/scummsys.h"
#include "common/util.h"
#include "twine/actor.h"
#include "twine/scene/actor.h"
#include "twine/text.h"
namespace TwinE {

View File

@ -20,27 +20,27 @@
*
*/
#include "twine/script_life_v1.h"
#include "twine/script/script_life_v1.h"
#include "common/memstream.h"
#include "common/stream.h"
#include "twine/actor.h"
#include "twine/animations.h"
#include "twine/collision.h"
#include "twine/scene/actor.h"
#include "twine/scene/animations.h"
#include "twine/audio/music.h"
#include "twine/audio/sound.h"
#include "twine/scene/collision.h"
#include "twine/flamovies.h"
#include "twine/gamestate.h"
#include "twine/grid.h"
#include "twine/scene/gamestate.h"
#include "twine/scene/grid.h"
#include "twine/holomap.h"
#include "twine/input.h"
#include "twine/interface.h"
#include "twine/menu.h"
#include "twine/movements.h"
#include "twine/music.h"
#include "twine/redraw.h"
#include "twine/renderer.h"
#include "twine/menu/interface.h"
#include "twine/menu/menu.h"
#include "twine/scene/movements.h"
#include "twine/renderer/redraw.h"
#include "twine/renderer/renderer.h"
#include "twine/renderer/screens.h"
#include "twine/resources.h"
#include "twine/scene.h"
#include "twine/screens.h"
#include "twine/sound.h"
#include "twine/scene/scene.h"
#include "twine/text.h"
#include "twine/twine.h"
@ -96,36 +96,36 @@ enum LifeScriptOperators {
/** Script condition command opcodes */
enum LifeScriptConditions {
/*0x00*/ kcCOL = 0, /*<! Current actor collision with another actor. (Parameter = Actor Index) */
/*0x01*/ kcCOL_OBJ = 1, /*<! Actor collision with the actor passed as parameter. (Parameter = Actor Index, Parameter = Actor Index) */
/*0x02*/ kcDISTANCE = 2, /*<! Distance between the current actor and the actor passed as parameter. (Parameter = Actor Index, Parameter = Distance between) */
/*0x03*/ kcZONE = 3, /*<! Current actor tread on zone passed as parameter. (Parameter = Zone Index) */
/*0x04*/ kcZONE_OBJ = 4, /*<! The actor passed as parameter will tread on zone passed as parameter. (Parameter = Actor Index, Parameter = Zone Index) */
/*0x05*/ kcBODY = 5, /*<! Body of the current actor. (Parameter = Body Index) */
/*0x06*/ kcBODY_OBJ = 6, /*<! Body of the actor passed as parameter. (Parameter = Body Index) */
/*0x07*/ kcANIM = 7, /*<! Body Animation of the current actor. (Parameter = Animation Index) */
/*0x08*/ kcANIM_OBJ = 8, /*<! Body Animation of the actor passed as parameter. (Parameter = Animation Index) */
/*0x09*/ kcL_TRACK = 9, /*<! Current actor track. (Parameter = Track Index) */
/*0x0A*/ kcL_TRACK_OBJ = 10, /*<! Track of the actor passed as parameter. (Parameter = Track Index) */
/*0x0B*/ kcFLAG_CUBE = 11, /*<! Game Cube Flags. (Parameter = Cube Flag Index, Parameter = 0 (not set), = 1 (set))k */
/*0x0C*/ kcCONE_VIEW = 12, /*<! The actor passed as parameter have a "vision in circle". (Parameter = Actor Index, Parameter = Distance) */
/*0x0D*/ kcHIT_BY = 13, /*<! Current actor hited by the actor passed as parameter. (Parameter = Actor Index) */
/*0x0E*/ kcACTION = 14, /*<! Hero action behavior. (Parameter = Behaviour Index) */
/*0x0F*/ kcFLAG_GAME = 15, /*<! Game Flags (See further list). (Parameter = Flag Index, Parameter = 0 (not set), = 1 (set)) */
/*0x10*/ kcLIFE_POINT = 16, /*<! Current actor life points. (Parameter = Life points) */
/*0x11*/ kcLIFE_POINT_OBJ = 17, /*<! Life points of the current actor passed as parameter. (Parameter = Life points) */
/*0x12*/ kcNUM_LITTLE_KEYS = 18, /*<! Number of keys. (Parameter = Number of keys) */
/*0x13*/ kcNUM_GOLD_PIECES = 19, /*<! Coins/Gold Amount. (Parameter = Coins/Gold amount) */
/*0x14*/ kcBEHAVIOUR = 20, /*<! Hero behaviour. (Parameter = Behaviour Index) */
/*0x15*/ kcCHAPTER = 21, /*<! Story Chapters. (Parameter = Chapter Index) */
/*0x16*/ kcDISTANCE_3D = 22, /*<! Distance between the actor passed as parameter and the current actor. (Parameter = Actor Index, Parameter = Distance) */
/*0x17 - 23 unused */
/*0x18 - 24 unused */
/*0x19*/ kcUSE_INVENTORY = 25, /*<! Use inventory object. (Parameter = Object Index in the inventory, Paramenter = 0 (Not in Inventory), = 1 (In the Inventory)) */
/*0x1A*/ kcCHOICE = 26, /*<! Menu choice. (Parameter = Text Index in the current Text Bank) */
/*0x1B*/ kcFUEL = 27, /*<! Amount of fuel gas the Hero have in his inventory. (Parameter = Gas amount) */
/*0x1C*/ kcCARRIED_BY = 28, /*<! The current is carried by the actor passed as paramenter. (Parameter = Actor Index) */
/*0x1D*/ kcCDROM = 29 /*<! CDROM audio tracks. (Parameter = Audio Tracks Index) */
/*0x00*/ kcCOL = 0, /*<! Current actor collision with another actor. (Parameter = Actor Index) */
/*0x01*/ kcCOL_OBJ = 1, /*<! Actor collision with the actor passed as parameter. (Parameter = Actor Index, Parameter = Actor Index) */
/*0x02*/ kcDISTANCE = 2, /*<! Distance between the current actor and the actor passed as parameter. (Parameter = Actor Index, Parameter = Distance between) */
/*0x03*/ kcZONE = 3, /*<! Current actor tread on zone passed as parameter. (Parameter = Zone Index) */
/*0x04*/ kcZONE_OBJ = 4, /*<! The actor passed as parameter will tread on zone passed as parameter. (Parameter = Actor Index, Parameter = Zone Index) */
/*0x05*/ kcBODY = 5, /*<! Body of the current actor. (Parameter = Body Index) */
/*0x06*/ kcBODY_OBJ = 6, /*<! Body of the actor passed as parameter. (Parameter = Body Index) */
/*0x07*/ kcANIM = 7, /*<! Body Animation of the current actor. (Parameter = Animation Index) */
/*0x08*/ kcANIM_OBJ = 8, /*<! Body Animation of the actor passed as parameter. (Parameter = Animation Index) */
/*0x09*/ kcL_TRACK = 9, /*<! Current actor track. (Parameter = Track Index) */
/*0x0A*/ kcL_TRACK_OBJ = 10, /*<! Track of the actor passed as parameter. (Parameter = Track Index) */
/*0x0B*/ kcFLAG_CUBE = 11, /*<! Game Cube Flags. (Parameter = Cube Flag Index, Parameter = 0 (not set), = 1 (set))k */
/*0x0C*/ kcCONE_VIEW = 12, /*<! The actor passed as parameter have a "vision in circle". (Parameter = Actor Index, Parameter = Distance) */
/*0x0D*/ kcHIT_BY = 13, /*<! Current actor hited by the actor passed as parameter. (Parameter = Actor Index) */
/*0x0E*/ kcACTION = 14, /*<! Hero action behavior. (Parameter = Behaviour Index) */
/*0x0F*/ kcFLAG_GAME = 15, /*<! Game Flags (See further list). (Parameter = Flag Index, Parameter = 0 (not set), = 1 (set)) */
/*0x10*/ kcLIFE_POINT = 16, /*<! Current actor life points. (Parameter = Life points) */
/*0x11*/ kcLIFE_POINT_OBJ = 17, /*<! Life points of the current actor passed as parameter. (Parameter = Life points) */
/*0x12*/ kcNUM_LITTLE_KEYS = 18, /*<! Number of keys. (Parameter = Number of keys) */
/*0x13*/ kcNUM_GOLD_PIECES = 19, /*<! Coins/Gold Amount. (Parameter = Coins/Gold amount) */
/*0x14*/ kcBEHAVIOUR = 20, /*<! Hero behaviour. (Parameter = Behaviour Index) */
/*0x15*/ kcCHAPTER = 21, /*<! Story Chapters. (Parameter = Chapter Index) */
/*0x16*/ kcDISTANCE_3D = 22, /*<! Distance between the actor passed as parameter and the current actor. (Parameter = Actor Index, Parameter = Distance) */
/*0x17 - 23 unused */
/*0x18 - 24 unused */
/*0x19*/ kcUSE_INVENTORY = 25, /*<! Use inventory object. (Parameter = Object Index in the inventory, Paramenter = 0 (Not in Inventory), = 1 (In the Inventory)) */
/*0x1A*/ kcCHOICE = 26, /*<! Menu choice. (Parameter = Text Index in the current Text Bank) */
/*0x1B*/ kcFUEL = 27, /*<! Amount of fuel gas the Hero have in his inventory. (Parameter = Gas amount) */
/*0x1C*/ kcCARRIED_BY = 28, /*<! The current is carried by the actor passed as paramenter. (Parameter = Actor Index) */
/*0x1D*/ kcCDROM = 29 /*<! CDROM audio tracks. (Parameter = Audio Tracks Index) */
};
/**

View File

@ -20,19 +20,19 @@
*
*/
#include "twine/script_move_v1.h"
#include "twine/script/script_move_v1.h"
#include "common/memstream.h"
#include "common/textconsole.h"
#include "common/util.h"
#include "twine/actor.h"
#include "twine/animations.h"
#include "twine/scene/actor.h"
#include "twine/scene/animations.h"
#include "twine/audio/sound.h"
#include "twine/flamovies.h"
#include "twine/movements.h"
#include "twine/redraw.h"
#include "twine/renderer.h"
#include "twine/scene.h"
#include "twine/screens.h"
#include "common/memstream.h"
#include "twine/sound.h"
#include "twine/scene/movements.h"
#include "twine/renderer/redraw.h"
#include "twine/renderer/renderer.h"
#include "twine/renderer/screens.h"
#include "twine/scene/scene.h"
#include "twine/twine.h"
namespace TwinE {

View File

@ -27,15 +27,15 @@
#include "common/scummsys.h"
#include "common/str.h"
#include "common/system.h"
#include "twine/audio/sound.h"
#include "twine/hqr.h"
#include "twine/input.h"
#include "twine/interface.h"
#include "twine/menu.h"
#include "twine/renderer.h"
#include "twine/menu/interface.h"
#include "twine/menu/menu.h"
#include "twine/renderer/renderer.h"
#include "twine/renderer/screens.h"
#include "twine/resources.h"
#include "twine/scene.h"
#include "twine/screens.h"
#include "twine/sound.h"
#include "twine/scene/scene.h"
#include "twine/twine.h"
namespace TwinE {

View File

@ -36,45 +36,45 @@
#include "engines/util.h"
#include "graphics/colormasks.h"
#include "graphics/cursorman.h"
#include "graphics/fontman.h"
#include "graphics/font.h"
#include "graphics/fontman.h"
#include "graphics/managed_surface.h"
#include "graphics/palette.h"
#include "graphics/pixelformat.h"
#include "graphics/surface.h"
#include "gui/debugger.h"
#include "twine/actor.h"
#include "twine/animations.h"
#include "twine/collision.h"
#include "twine/console.h"
#include "twine/debug.h"
#include "twine/debug_grid.h"
#include "twine/debug_scene.h"
#include "twine/extra.h"
#include "twine/scene/actor.h"
#include "twine/scene/animations.h"
#include "twine/audio/music.h"
#include "twine/audio/sound.h"
#include "twine/scene/collision.h"
#include "twine/debugger/console.h"
#include "twine/debugger/debug.h"
#include "twine/debugger/debug_grid.h"
#include "twine/debugger/debug_scene.h"
#include "twine/scene/extra.h"
#include "twine/flamovies.h"
#include "twine/gamestate.h"
#include "twine/grid.h"
#include "twine/scene/gamestate.h"
#include "twine/scene/grid.h"
#include "twine/holomap.h"
#include "twine/hqr.h"
#include "twine/input.h"
#include "twine/interface.h"
#include "twine/menu.h"
#include "twine/menuoptions.h"
#include "twine/movements.h"
#include "twine/music.h"
#include "twine/redraw.h"
#include "twine/renderer.h"
#include "twine/menu/interface.h"
#include "twine/menu/menu.h"
#include "twine/menu/menuoptions.h"
#include "twine/scene/movements.h"
#include "twine/renderer/redraw.h"
#include "twine/renderer/renderer.h"
#include "twine/renderer/screens.h"
#include "twine/resources.h"
#include "twine/scene.h"
#include "twine/screens.h"
#include "twine/script_life_v1.h"
#include "twine/script_move_v1.h"
#include "twine/sound.h"
#include "twine/scene/scene.h"
#include "twine/script/script_life_v1.h"
#include "twine/script/script_move_v1.h"
#include "twine/text.h"
namespace TwinE {
ScopedEngineFreeze::ScopedEngineFreeze(TwinEEngine* engine) : _engine(engine) {
ScopedEngineFreeze::ScopedEngineFreeze(TwinEEngine *engine) : _engine(engine) {
_engine->freezeTime();
}
@ -82,7 +82,7 @@ ScopedEngineFreeze::~ScopedEngineFreeze() {
_engine->unfreezeTime();
}
ScopedCursor::ScopedCursor(TwinEEngine* engine) : _engine(engine) {
ScopedCursor::ScopedCursor(TwinEEngine *engine) : _engine(engine) {
_engine->pushMouseCursorVisible();
}

View File

@ -32,7 +32,7 @@
#include "graphics/pixelformat.h"
#include "graphics/surface.h"
#include "metaengine.h"
#include "twine/actor.h"
#include "twine/scene/actor.h"
#include "twine/input.h"
#include "twine/detection.h"