CRAB: Cleanup headers in crab.h

This commit is contained in:
hax0kartik 2023-08-07 19:35:43 +05:30 committed by Eugene Sandulenko
parent a0a7d3b131
commit 4ed560b96e
25 changed files with 65 additions and 39 deletions

View File

@ -27,6 +27,8 @@
* Licensed under MIT
*
*/
#include "graphics/screen.h"
#include "crab/crab.h"
#include "crab/LoadingScreen.h"
#include "crab/XMLDoc.h"

View File

@ -28,6 +28,7 @@
*
*/
#include "common/system.h"
#include "crab/crab.h"
#include "crab/PathfindingAgent.h"

View File

@ -28,6 +28,7 @@
*
*/
#include "graphics/screen.h"
#include "crab/crab.h"
#include "crab/Polygon.h"

View File

@ -28,6 +28,7 @@
*
*/
#include "graphics/screen.h"
#include "crab/crab.h"
#include "crab/Rectangle.h"

View File

@ -28,6 +28,7 @@
*
*/
#include "graphics/screen.h"
#include "crab/crab.h"
#include "crab/TMX/TMXTileSet.h"
#include "crab/text/TextManager.h"

View File

@ -29,6 +29,7 @@
*/
#include "common/events.h"
#include "graphics/screen.h"
#include "crab/app.h"
namespace Crab {

View File

@ -19,17 +19,16 @@
*
*/
#include "crab/crab.h"
#include "common/config-manager.h"
#include "common/debug-channels.h"
#include "common/scummsys.h"
#include "common/system.h"
#include "crab/console.h"
#include "crab/detection.h"
#include "crab/ScreenSettings.h"
#include "crab/app.h"
#include "engines/util.h"
#include "graphics/cursorman.h"
#include "graphics/managed_surface.h"
#include "graphics/palette.h"
#include "graphics/screen.h"
#include "crab/crab.h"
#include "crab/app.h"
#include "crab/console.h"
namespace Crab {
@ -171,4 +170,8 @@ Common::Error CrabEngine::syncGame(Common::Serializer &s) {
return Common::kNoError;
}
bool CrabEngine::canSaveGameStateCurrently() {
return _screenSettings->_inGame;
}
} // End of namespace Crab

View File

@ -22,24 +22,17 @@
#ifndef CRAB_H
#define CRAB_H
#include "common/error.h"
#include "common/fs.h"
#include "common/hash-str.h"
#include "common/random.h"
#include "common/scummsys.h"
#include "common/serializer.h"
#include "common/system.h"
#include "common/util.h"
#include "engines/engine.h"
#include "engines/savestate.h"
#include "graphics/screen.h"
#include "crab/input/input.h"
#include "crab/music/MusicManager.h"
#include "crab/ScreenSettings.h"
#include "crab/GameParam.h"
#include "crab/detection.h"
namespace Graphics {
class ManagedSurface;
class PixelFormat;
class Screen;
} // End of namespace Graphics
namespace Crab {
class App;
@ -47,7 +40,10 @@ struct CrabGameDescription;
class LoadingScreen;
class FilePaths;
class TempValue;
class StringPool;
class ScreenSettings;
namespace pyrodactyl {
namespace event {
@ -70,8 +66,13 @@ class ImageManager;
namespace input {
class Cursor;
class InputManager;
} // End of namespace input
namespace music {
class MusicManager;
} // End of namespace music
namespace text {
class TextManager;
} // End of namespace text
@ -151,9 +152,8 @@ public:
bool canLoadGameStateCurrently() override {
return true;
}
bool canSaveGameStateCurrently() override {
return _screenSettings->_inGame;
}
bool canSaveGameStateCurrently() override;
/**
* Uses a serializer to allow implementing savegame

View File

@ -31,6 +31,7 @@
#ifndef CRAB_QUEST_H
#define CRAB_QUEST_H
#include "common/array.h"
#include "crab/loaders.h"
namespace Crab {

View File

@ -28,6 +28,7 @@
*
*/
#include "common/file.h"
#include "crab/filesystem.h"
namespace Crab {

View File

@ -28,6 +28,8 @@
*
*/
#include "graphics/managed_surface.h"
#include "graphics/screen.h"
#include "crab/backInserter.h"
#include "crab/game.h"
#include "crab/rapidxml/rapidxml_print.hpp"

View File

@ -28,6 +28,9 @@
*
*/
#include "common/file.h"
#include "graphics/managed_surface.h"
#include "graphics/screen.h"
#include "image/png.h"
#include "crab/crab.h"
#include "crab/image/Image.h"

View File

@ -33,6 +33,7 @@
// Purpose: Cursor class
//=============================================================================
#include "graphics/cursorman.h"
#include "graphics/managed_surface.h"
#include "crab/crab.h"
#include "crab/input/cursor.h"

View File

@ -28,8 +28,9 @@
*
*/
#include "crab/input/hotkey.h"
#include "crab/crab.h"
#include "crab/loaders.h"
#include "crab/input/hotkey.h"
namespace Crab {

View File

@ -33,6 +33,7 @@
#include "crab/crab.h"
#include "crab/input/input.h"
#include "crab/rapidxml/rapidxml.hpp"
namespace Crab {

View File

@ -27,9 +27,11 @@
* Licensed under MIT
*
*/
#include "common/system.h"
#include "common/translation.h"
#include "crab/crab.h"
#include "crab/loaders.h"
#include "crab/XMLDoc.h"
#include "crab/input/input.h"
namespace Crab {

View File

@ -28,6 +28,7 @@
*
*/
#include "graphics/managed_surface.h"
#include "crab/level/level.h"
namespace Crab {

View File

@ -28,6 +28,7 @@
*
*/
#include "crab/XMLDoc.h"
#include "crab/loaders.h"
namespace Crab {

View File

@ -31,9 +31,10 @@
#ifndef CRAB_LOADERS_H
#define CRAB_LOADERS_H
#include "crab/XMLDoc.h"
#include "common/str.h"
#include "crab/gametype.h"
#include "crab/numstr.h"
#include "crab/rapidxml/rapidxml.hpp"
namespace Crab {

View File

@ -18,19 +18,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "common/translation.h"
#include "crab/crab.h"
#include "crab/detection.h"
#include "crab/metaengine.h"
#include "backends/keymapper/action.h"
#include "backends/keymapper/keymapper.h"
#include "backends/keymapper/standard-actions.h"
#include "common/translation.h"
#include "graphics/scaler.h"
#include "crab/crab.h"
#include "crab/metaengine.h"
#include "crab/input/input.h"
namespace Crab {
static const ADExtraGuiOptionsMap optionsList[] = {

View File

@ -28,11 +28,11 @@
*
*/
#include "crab/music/MusicManager.h"
#include "common/config-manager.h"
#include "crab/crab.h"
#include "crab/ScreenSettings.h"
#include "crab/XMLDoc.h"
#include "crab/crab.h"
#include "crab/music/MusicManager.h"
namespace Crab {

View File

@ -28,8 +28,10 @@
*
*/
#include "common/file.h"
#include "graphics/font.h"
#include "graphics/fonts/ttf.h"
#include "graphics/screen.h"
#include "crab/crab.h"
#include "crab/XMLDoc.h"
#include "crab/text/TextManager.h"

View File

@ -32,6 +32,7 @@
// Author: Arvind
// Purpose: Timer functions
//=============================================================================
#include "common/system.h"
#include "crab/timer.h"
namespace Crab {

View File

@ -28,6 +28,7 @@
*
*/
#include "graphics/managed_surface.h"
#include "crab/crab.h"
#include "crab/ui/SectionHeader.h"

View File

@ -33,6 +33,7 @@
// Purpose: TextArea functions
//=============================================================================
#include "crab/crab.h"
#include "crab/input/input.h"
#include "crab/ui/textarea.h"
namespace Crab {