mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-23 04:33:09 +00:00
MTROPOLIS: Merge prep header and warning cleanup
This commit is contained in:
parent
4bc7b46440
commit
53dde2193e
@ -19,9 +19,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "mtropolis/assets.h"
|
||||
#include "mtropolis/asset_factory.h"
|
||||
|
||||
#include "graphics/managed_surface.h"
|
||||
#include "graphics/surface.h"
|
||||
|
||||
@ -29,6 +26,9 @@
|
||||
|
||||
#include "common/endian.h"
|
||||
|
||||
#include "mtropolis/assets.h"
|
||||
#include "mtropolis/asset_factory.h"
|
||||
|
||||
namespace MTropolis {
|
||||
|
||||
Asset::Asset() : _assetID(0) {
|
||||
@ -127,15 +127,11 @@ bool CachedMToon::loadFromStream(const Common::SharedPtr<MToonMetadata> &metadat
|
||||
uint16 fullWidth = metadata->rect.width();
|
||||
uint16 fullHeight = metadata->rect.height();
|
||||
|
||||
uint16 firstFrameWidth = 0;
|
||||
uint16 firstFrameHeight = 0;
|
||||
|
||||
bool haveAnyTemporalFrames = false;
|
||||
bool haveDifferentDimensions = false;
|
||||
_isRLETemporalCompressed = false;
|
||||
|
||||
for (size_t i = 0; i < metadata->frames.size(); i++) {
|
||||
const MToonMetadata::FrameDef &frame = metadata->frames[i];
|
||||
if (!_rleData[i].isKeyframe)
|
||||
haveAnyTemporalFrames = true;
|
||||
|
||||
@ -265,11 +261,6 @@ static bool decompressMToonRLE(const CachedMToon::RleFrame &frame, const Common:
|
||||
void CachedMToon::decompressRLEFrameToImage(size_t frameIndex, Graphics::Surface &surface) {
|
||||
assert(surface.format == _rleOptimizedFormat);
|
||||
|
||||
const MToonMetadata::FrameDef &frameDef = _metadata->frames[frameIndex];
|
||||
|
||||
int32 originX = frameDef.rect.left;
|
||||
int32 originY = frameDef.rect.top;
|
||||
|
||||
bool isBottomUp = (_metadata->imageFormat == MToonMetadata::kImageFormatWindows);
|
||||
|
||||
bool decompressedOK = false;
|
||||
|
@ -19,10 +19,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "mtropolis/data.h"
|
||||
#include "common/debug.h"
|
||||
#include "common/memstream.h"
|
||||
|
||||
#include "mtropolis/data.h"
|
||||
|
||||
namespace MTropolis {
|
||||
|
||||
namespace Data {
|
||||
|
@ -19,16 +19,15 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "mtropolis/debug.h"
|
||||
#include "mtropolis/render.h"
|
||||
#include "mtropolis/runtime.h"
|
||||
|
||||
#include "gui/dialog.h"
|
||||
|
||||
#include "graphics/fontman.h"
|
||||
|
||||
#include "common/hash-ptr.h"
|
||||
|
||||
#include "mtropolis/debug.h"
|
||||
#include "mtropolis/render.h"
|
||||
#include "mtropolis/runtime.h"
|
||||
|
||||
|
||||
namespace MTropolis {
|
||||
@ -840,10 +839,10 @@ void DebugSceneTreeWindow::toolOnMouseDown(int32 x, int32 y, int mouseButton) {
|
||||
if (mouseButton != Actions::kMouseButtonLeft)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < _sceneStack.size(); i++) {
|
||||
for (uint i = 0; i < _sceneStack.size(); i++) {
|
||||
int buttonLeft = kSceneStackGoToButtonX;
|
||||
int buttonRight = buttonLeft + kSceneStackGoToButtonWidth;
|
||||
int buttonTop = kSceneStackGoToButtonFirstY + i * kSceneStackRowHeight;
|
||||
int buttonTop = kSceneStackGoToButtonFirstY + static_cast<int>(i) * kSceneStackRowHeight;
|
||||
int buttonBottom = buttonTop + kSceneStackGoToButtonHeight;
|
||||
|
||||
if (x >= buttonLeft && x < buttonRight && y >= buttonTop && y < buttonBottom) {
|
||||
@ -858,7 +857,7 @@ void DebugSceneTreeWindow::toolOnMouseDown(int32 x, int32 y, int mouseButton) {
|
||||
|
||||
int32 row = (y - _treeYOffset) / kRowHeight;
|
||||
|
||||
if (row >= _renderEntries.size())
|
||||
if (static_cast<uint32>(row) >= _renderEntries.size())
|
||||
return;
|
||||
|
||||
const RenderEntry &renderEntry = _renderEntries[row];
|
||||
@ -995,7 +994,6 @@ void DebugInspectorWindow::update() {
|
||||
|
||||
_labeledRow.clear();
|
||||
} else {
|
||||
size_t oldNumLabeled = _unlabeledRow.size();
|
||||
inspector->getDebuggable()->debugInspect(this);
|
||||
|
||||
_unlabeledRow.resize(_declUnlabeledRow);
|
||||
@ -1148,7 +1146,6 @@ void DebugStepThroughWindow::update() {
|
||||
void DebugStepThroughWindow::toolRenderSurface(int32 subAreaWidth, int32 subAreaHeight) {
|
||||
const Graphics::PixelFormat fmt = _debugger->getRuntime()->getRenderPixelFormat();
|
||||
|
||||
uint32 whiteColor = fmt.RGBToColor(255, 255, 255);
|
||||
uint32 blackColor = fmt.RGBToColor(0, 0, 0);
|
||||
|
||||
int32 renderHeight = subAreaHeight;
|
||||
|
@ -22,11 +22,11 @@
|
||||
#include "base/plugins.h"
|
||||
#include "engines/advancedDetector.h"
|
||||
|
||||
#include "mtropolis/detection.h"
|
||||
|
||||
#include "common/config-manager.h"
|
||||
#include "common/translation.h"
|
||||
|
||||
#include "mtropolis/detection.h"
|
||||
|
||||
static const PlainGameDescriptor mTropolisGames[] = {
|
||||
{"obsidian", "Obsidian"},
|
||||
{nullptr, nullptr}
|
||||
|
@ -19,12 +19,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "mtropolis/elements.h"
|
||||
#include "mtropolis/assets.h"
|
||||
#include "mtropolis/element_factory.h"
|
||||
#include "mtropolis/miniscript.h"
|
||||
#include "mtropolis/render.h"
|
||||
|
||||
#include "video/video_decoder.h"
|
||||
#include "video/qt_decoder.h"
|
||||
|
||||
@ -35,6 +29,12 @@
|
||||
#include "graphics/font.h"
|
||||
#include "graphics/managed_surface.h"
|
||||
|
||||
#include "mtropolis/elements.h"
|
||||
#include "mtropolis/assets.h"
|
||||
#include "mtropolis/element_factory.h"
|
||||
#include "mtropolis/miniscript.h"
|
||||
#include "mtropolis/render.h"
|
||||
|
||||
namespace MTropolis {
|
||||
|
||||
|
||||
@ -447,7 +447,6 @@ void GraphicElement::render(Window *window) {
|
||||
if (clippedSrcRect.isEmpty())
|
||||
return;
|
||||
|
||||
int32 srcToDestX = clippedDrawRect.left - clippedSrcRect.left;
|
||||
int32 srcToDestY = clippedDrawRect.top - clippedSrcRect.top;
|
||||
|
||||
switch (_renderProps.getInkMode()) {
|
||||
@ -461,7 +460,6 @@ void GraphicElement::render(Window *window) {
|
||||
uint32 fillColor = pixFmt.ARGBToColor(255, fillColorRGB8.r, fillColorRGB8.g, fillColorRGB8.b);
|
||||
|
||||
for (int32 srcY = clippedSrcRect.top; srcY < clippedSrcRect.bottom; srcY++) {
|
||||
int32 destY = srcY + srcToDestY;
|
||||
int32 spanWidth = clippedDrawRect.width();
|
||||
void *destPixels = window->getSurface()->getBasePtr(clippedDrawRect.left, srcY + srcToDestY);
|
||||
if (_mask) {
|
||||
@ -504,7 +502,6 @@ void GraphicElement::render(Window *window) {
|
||||
colorMask = pixFmt.ARGBToColor(0, 255, 255, 255);
|
||||
|
||||
for (int32 srcY = clippedSrcRect.top; srcY < clippedSrcRect.bottom; srcY++) {
|
||||
int32 destY = srcY + srcToDestY;
|
||||
int32 spanWidth = clippedDrawRect.width();
|
||||
void *destPixels = window->getSurface()->getBasePtr(clippedDrawRect.left, srcY + srcToDestY);
|
||||
if (_mask) {
|
||||
|
@ -22,12 +22,12 @@
|
||||
#ifndef MTROPOLIS_ELEMENTS_H
|
||||
#define MTROPOLIS_ELEMENTS_H
|
||||
|
||||
#include "audio/mixer.h"
|
||||
|
||||
#include "mtropolis/data.h"
|
||||
#include "mtropolis/runtime.h"
|
||||
#include "mtropolis/render.h"
|
||||
|
||||
#include "audio/mixer.h"
|
||||
|
||||
namespace Video {
|
||||
|
||||
class VideoDecoder;
|
||||
|
@ -19,10 +19,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "mtropolis/hacks.h"
|
||||
|
||||
#include "common/system.h"
|
||||
|
||||
#include "mtropolis/hacks.h"
|
||||
|
||||
namespace MTropolis {
|
||||
|
||||
Hacks::Hacks() {
|
||||
|
@ -21,17 +21,17 @@
|
||||
|
||||
#include "engines/advancedDetector.h"
|
||||
|
||||
#include "backends/keymapper/action.h"
|
||||
#include "backends/keymapper/keymap.h"
|
||||
|
||||
#include "common/translation.h"
|
||||
|
||||
#include "mtropolis/actions.h"
|
||||
#include "mtropolis/debug.h"
|
||||
#include "mtropolis/detection.h"
|
||||
|
||||
#include "mtropolis/mtropolis.h"
|
||||
|
||||
#include "backends/keymapper/action.h"
|
||||
#include "backends/keymapper/keymap.h"
|
||||
|
||||
#include "common/translation.h"
|
||||
|
||||
namespace MTropolis {
|
||||
|
||||
uint32 MTropolisEngine::getGameID() const {
|
||||
|
@ -19,12 +19,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "mtropolis/miniscript.h"
|
||||
#include "common/config-manager.h"
|
||||
|
||||
#include "common/random.h"
|
||||
#include "common/memstream.h"
|
||||
|
||||
#include "mtropolis/miniscript.h"
|
||||
|
||||
namespace MTropolis {
|
||||
|
||||
static bool miniscriptEvaluateTruth(const DynamicValue& value) {
|
||||
|
@ -19,6 +19,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "common/memstream.h"
|
||||
|
||||
#include "mtropolis/miniscript.h"
|
||||
#include "mtropolis/modifiers.h"
|
||||
#include "mtropolis/modifier_factory.h"
|
||||
@ -26,8 +28,6 @@
|
||||
|
||||
#include "mtropolis/elements.h"
|
||||
|
||||
#include "common/memstream.h"
|
||||
|
||||
namespace MTropolis {
|
||||
|
||||
class CompoundVarSaver : public ISaveWriter {
|
||||
|
@ -22,12 +22,12 @@
|
||||
#ifndef MTROPOLIS_MODIFIERS_H
|
||||
#define MTROPOLIS_MODIFIERS_H
|
||||
|
||||
#include "common/events.h"
|
||||
|
||||
#include "mtropolis/render.h"
|
||||
#include "mtropolis/runtime.h"
|
||||
#include "mtropolis/data.h"
|
||||
|
||||
#include "common/events.h"
|
||||
|
||||
namespace MTropolis {
|
||||
|
||||
struct ModifierLoaderContext;
|
||||
|
@ -557,7 +557,6 @@ Common::Error MTropolisEngine::run() {
|
||||
#endif
|
||||
|
||||
bool paused = false;
|
||||
int frameCounter = 0;
|
||||
|
||||
while (!shouldQuit()) {
|
||||
handleEvents();
|
||||
|
@ -22,13 +22,13 @@
|
||||
#ifndef MTROPOLIS_MTROPOLIS_H
|
||||
#define MTROPOLIS_MTROPOLIS_H
|
||||
|
||||
#include "mtropolis/detection.h"
|
||||
#include "mtropolis/saveload.h"
|
||||
|
||||
#include "engines/engine.h"
|
||||
|
||||
#include "common/random.h"
|
||||
|
||||
#include "mtropolis/detection.h"
|
||||
#include "mtropolis/saveload.h"
|
||||
|
||||
/**
|
||||
* This is the namespace of the mTropolis engine.
|
||||
*
|
||||
|
@ -521,7 +521,6 @@ MiniscriptInstructionOutcome WordMixerModifier::scriptSetSearch(MiniscriptThread
|
||||
if (searchLength < buckets.size()) {
|
||||
const WordGameData::WordBucket &bucket = buckets[searchLength];
|
||||
|
||||
bool found = false;
|
||||
for (size_t wi = 0; wi < bucket.wordIndexes.size(); wi++) {
|
||||
const char *wordChars = &bucket.chars[wi * bucket.spacing];
|
||||
|
||||
|
@ -19,17 +19,17 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "mtropolis/plugin/standard.h"
|
||||
#include "mtropolis/plugins.h"
|
||||
|
||||
#include "mtropolis/miniscript.h"
|
||||
|
||||
#include "audio/mididrv.h"
|
||||
#include "audio/midiplayer.h"
|
||||
#include "audio/midiparser.h"
|
||||
|
||||
#include "common/random.h"
|
||||
|
||||
#include "mtropolis/plugin/standard.h"
|
||||
#include "mtropolis/plugins.h"
|
||||
|
||||
#include "mtropolis/miniscript.h"
|
||||
|
||||
namespace MTropolis {
|
||||
|
||||
namespace Standard {
|
||||
|
@ -19,14 +19,14 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "mtropolis/render.h"
|
||||
#include "mtropolis/runtime.h"
|
||||
|
||||
#include "graphics/surface.h"
|
||||
#include "graphics/managed_surface.h"
|
||||
|
||||
#include "graphics/cursorman.h"
|
||||
|
||||
#include "mtropolis/render.h"
|
||||
#include "mtropolis/runtime.h"
|
||||
|
||||
namespace MTropolis {
|
||||
|
||||
template<class TNumber, int TResolution>
|
||||
|
@ -19,16 +19,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "mtropolis/runtime.h"
|
||||
#include "mtropolis/data.h"
|
||||
#include "mtropolis/vthread.h"
|
||||
#include "mtropolis/asset_factory.h"
|
||||
#include "mtropolis/element_factory.h"
|
||||
#include "mtropolis/miniscript.h"
|
||||
#include "mtropolis/modifier_factory.h"
|
||||
#include "mtropolis/modifiers.h"
|
||||
#include "mtropolis/render.h"
|
||||
|
||||
#include "common/debug.h"
|
||||
#include "common/file.h"
|
||||
#include "common/random.h"
|
||||
@ -44,6 +34,16 @@
|
||||
|
||||
#include "audio/mixer.h"
|
||||
|
||||
#include "mtropolis/runtime.h"
|
||||
#include "mtropolis/data.h"
|
||||
#include "mtropolis/vthread.h"
|
||||
#include "mtropolis/asset_factory.h"
|
||||
#include "mtropolis/element_factory.h"
|
||||
#include "mtropolis/miniscript.h"
|
||||
#include "mtropolis/modifier_factory.h"
|
||||
#include "mtropolis/modifiers.h"
|
||||
#include "mtropolis/render.h"
|
||||
|
||||
namespace MTropolis {
|
||||
|
||||
class MainWindow : public Window {
|
||||
@ -3546,7 +3546,6 @@ bool Runtime::runFrame() {
|
||||
uint32 timeMillis = _system->getMillis();
|
||||
|
||||
uint32 realMSec = timeMillis - _realTimeBase - _realTime;
|
||||
uint32 playMSec = timeMillis - _playTimeBase - _playTime;
|
||||
|
||||
_realTime = timeMillis - _realTimeBase;
|
||||
_playTime = timeMillis - _playTimeBase;
|
||||
@ -5577,9 +5576,9 @@ void KeyboardEventSignaller::removeReceiver(IKeyboardEventReceiver *receiver) {
|
||||
}
|
||||
|
||||
void MediaCueState::checkTimestampChange(Runtime *runtime, uint32 oldTS, uint32 newTS, bool continuousTimestamps, bool canTriggerDuring) {
|
||||
bool entersRange = (oldTS < minTime && newTS >= minTime);
|
||||
bool exitsRange = (oldTS <= maxTime && newTS > maxTime);
|
||||
bool endsInRange = (newTS >= minTime && newTS <= maxTime);
|
||||
bool entersRange = (static_cast<int32>(oldTS) < minTime && static_cast<int32>(newTS) >= minTime);
|
||||
bool exitsRange = (static_cast<int32>(oldTS) <= maxTime && static_cast<int32>(newTS) > maxTime);
|
||||
bool endsInRange = (static_cast<int32>(newTS) >= minTime && static_cast<int32>(newTS) <= maxTime);
|
||||
|
||||
bool shouldTrigger = false;
|
||||
switch (triggerTiming)
|
||||
@ -7133,6 +7132,9 @@ bool ModifierSaveLoad::load(Modifier *modifier, Common::ReadStream *stream) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (modifier->getStaticGUID() != checkGUID)
|
||||
return false;
|
||||
|
||||
return loadInternal(stream);
|
||||
}
|
||||
|
||||
|
@ -22,10 +22,10 @@
|
||||
#include "common/savefile.h"
|
||||
#include "common/translation.h"
|
||||
|
||||
#include "mtropolis/mtropolis.h"
|
||||
|
||||
#include "gui/saveload.h"
|
||||
|
||||
#include "mtropolis/mtropolis.h"
|
||||
|
||||
namespace MTropolis {
|
||||
|
||||
bool MTropolisEngine::promptSave(ISaveWriter *writer) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user