move Platform.cpp to common/, seems to fit in a little better there

This commit is contained in:
jacob1 2021-06-26 00:58:01 -04:00
parent 6e0ace2e4d
commit d1016cf58d
No known key found for this signature in database
GPG Key ID: 4E58A32D510E1995
23 changed files with 193 additions and 233 deletions

View File

@ -38,22 +38,21 @@
#include "Format.h"
#include "Misc.h"
#include "Platform.h"
#include "graphics/Graphics.h"
#include "client/SaveInfo.h"
#include "client/Client.h"
#include "client/GameSave.h"
#include "client/SaveFile.h"
#include "client/Client.h"
#include "client/SaveInfo.h"
#include "common/Platform.h"
#include "graphics/Graphics.h"
#include "gui/Style.h"
#include "gui/game/GameController.h"
#include "gui/game/GameView.h"
#include "gui/dialogues/ErrorMessage.h"
#include "gui/dialogues/ConfirmPrompt.h"
#include "gui/interface/Keys.h"
#include "gui/Style.h"
#include "gui/dialogues/ErrorMessage.h"
#include "gui/interface/Engine.h"
#include "gui/interface/Keys.h"
#define INCLUDE_SYSWM
#include "SDLCompat.h"

View File

@ -23,7 +23,7 @@
#include <errno.h>
#endif
#include "Platform.h"
#include "common/Platform.h"
// returns 1 on failure, 0 on success
int update_start(char *data, unsigned int len)

View File

@ -26,30 +26,27 @@
#include <unistd.h>
#endif
#include "common/String.h"
#include "ClientListener.h"
#include "Config.h"
#include "Format.h"
#include "MD5.h"
#include "Platform.h"
#include "Update.h"
#include "ClientListener.h"
#include "graphics/Graphics.h"
#include "gui/preview/Comment.h"
#include "client/SaveInfo.h"
#include "client/SaveFile.h"
#include "client/GameSave.h"
#include "client/SaveFile.h"
#include "client/SaveInfo.h"
#include "client/UserInfo.h"
#include "client/http/Request.h"
#include "client/http/RequestManager.h"
#include "common/Platform.h"
#include "common/String.h"
#include "graphics/Graphics.h"
#ifdef LUACONSOLE
# include "lua/LuaScriptInterface.h"
#endif
#include "client/http/Request.h"
#include "client/http/RequestManager.h"
#include "gui/preview/Comment.h"
extern "C"
{

View File

@ -1,4 +1,5 @@
common_files += files(
'Platform.cpp',
'String.cpp',
'tpt-rand.cpp',
)

View File

@ -2,25 +2,22 @@
#include <algorithm>
#include "Platform.h"
#include "client/Client.h"
#include "client/SaveFile.h"
#include "client/GameSave.h"
#include "client/SaveFile.h"
#include "common/Platform.h"
#include "graphics/Graphics.h"
#include "gui/Style.h"
#include "tasks/Task.h"
#include "gui/dialogues/TextPrompt.h"
#include "gui/dialogues/ConfirmPrompt.h"
#include "gui/dialogues/ErrorMessage.h"
#include "gui/dialogues/TextPrompt.h"
#include "gui/interface/Label.h"
#include "gui/interface/Textbox.h"
#include "gui/interface/ScrollPanel.h"
#include "gui/interface/SaveButton.h"
#include "gui/interface/ProgressBar.h"
#include "graphics/Graphics.h"
#include "gui/interface/SaveButton.h"
#include "gui/interface/ScrollPanel.h"
#include "gui/interface/Textbox.h"
//Currently, reading is done on another thread, we can't render outside the main thread due to some bullshit with OpenGL
class LoadFilesTask: public Task

View File

@ -1,63 +1,17 @@
#include "GameController.h"
#include "GameView.h"
#include "GameModel.h"
#include "RenderPreset.h"
#include "Menu.h"
#include "Tool.h"
#include "Brush.h"
#include "QuickOptions.h"
#include "GameModelException.h"
#include "Config.h"
#include "Format.h"
#include "Platform.h"
#include "Controller.h"
#include "Format.h"
#include "GameModel.h"
#include "GameModelException.h"
#include "GameView.h"
#include "Menu.h"
#include "Notification.h"
#include "client/GameSave.h"
#include "client/Client.h"
#include "gui/search/SearchController.h"
#include "gui/render/RenderController.h"
#include "gui/login/LoginController.h"
#include "gui/preview/PreviewController.h"
#include "gui/tags/TagsController.h"
#include "gui/console/ConsoleController.h"
#include "gui/localbrowser/LocalBrowserController.h"
#include "gui/options/OptionsController.h"
#include "gui/dialogues/ErrorMessage.h"
#include "gui/dialogues/InformationMessage.h"
#include "gui/dialogues/ConfirmPrompt.h"
#include "gui/elementsearch/ElementSearchActivity.h"
#include "gui/profile/ProfileActivity.h"
#include "gui/colourpicker/ColourPickerActivity.h"
#include "gui/update/UpdateActivity.h"
#include "gui/filebrowser/FileBrowserActivity.h"
#include "gui/save/LocalSaveActivity.h"
#include "gui/save/ServerSaveActivity.h"
#include "gui/tags/TagsView.h"
#include "gui/search/SearchView.h"
#include "gui/render/RenderView.h"
#include "gui/preview/PreviewView.h"
#include "gui/options/OptionsView.h"
#include "gui/login/LoginView.h"
#include "gui/localbrowser/LocalBrowserView.h"
#include "gui/console/ConsoleView.h"
#include "gui/interface/Keys.h"
#include "gui/interface/Mouse.h"
#include "gui/interface/Engine.h"
#include "debug/DebugInfo.h"
#include "debug/DebugParts.h"
#include "debug/ElementPopulation.h"
#include "debug/DebugLines.h"
#include "debug/ParticleDebug.h"
#include "QuickOptions.h"
#include "RenderPreset.h"
#include "Tool.h"
#ifdef LUACONSOLE
# include "lua/LuaScriptInterface.h"
@ -66,13 +20,52 @@
# include "lua/TPTScriptInterface.h"
#endif
#include "client/Client.h"
#include "client/GameSave.h"
#include "common/Platform.h"
#include "debug/DebugInfo.h"
#include "debug/DebugLines.h"
#include "debug/DebugParts.h"
#include "debug/ElementPopulation.h"
#include "debug/ParticleDebug.h"
#include "graphics/Renderer.h"
#include "simulation/Air.h"
#include "simulation/ElementClasses.h"
#include "simulation/Simulation.h"
#include "simulation/SimulationData.h"
#include "simulation/Air.h"
#include "simulation/Snapshot.h"
#include "simulation/ElementClasses.h"
#include "gui/dialogues/ErrorMessage.h"
#include "gui/dialogues/InformationMessage.h"
#include "gui/dialogues/ConfirmPrompt.h"
#include "gui/interface/Keys.h"
#include "gui/interface/Mouse.h"
#include "gui/interface/Engine.h"
#include "gui/colourpicker/ColourPickerActivity.h"
#include "gui/elementsearch/ElementSearchActivity.h"
#include "gui/filebrowser/FileBrowserActivity.h"
#include "gui/profile/ProfileActivity.h"
#include "gui/save/LocalSaveActivity.h"
#include "gui/save/ServerSaveActivity.h"
#include "gui/update/UpdateActivity.h"
#include "gui/console/ConsoleController.h"
#include "gui/console/ConsoleView.h"
#include "gui/localbrowser/LocalBrowserController.h"
#include "gui/localbrowser/LocalBrowserView.h"
#include "gui/login/LoginController.h"
#include "gui/login/LoginView.h"
#include "gui/options/OptionsController.h"
#include "gui/options/OptionsView.h"
#include "gui/preview/PreviewController.h"
#include "gui/preview/PreviewView.h"
#include "gui/render/RenderController.h"
#include "gui/render/RenderView.h"
#include "gui/search/SearchController.h"
#include "gui/search/SearchView.h"
#include "gui/tags/TagsController.h"
#include "gui/tags/TagsView.h"
#ifdef GetUserName
# undef GetUserName // dammit windows

View File

@ -1,41 +1,38 @@
#include "GameModel.h"
#include "GameView.h"
#include "GameController.h"
#include <iostream>
#include <algorithm>
#include "simulation/ToolClasses.h"
#include "EllipseBrush.h"
#include "TriangleBrush.h"
#include "BitmapBrush.h"
#include "QuickOptions.h"
#include "GameModelException.h"
#include "Format.h"
#include "Menu.h"
#include "EllipseBrush.h"
#include "Favorite.h"
#include "Format.h"
#include "GameController.h"
#include "GameModelException.h"
#include "GameView.h"
#include "Menu.h"
#include "Notification.h"
#include "Platform.h"
#include "TriangleBrush.h"
#include "QuickOptions.h"
#include "client/Client.h"
#include "client/GameSave.h"
#include "client/SaveFile.h"
#include "client/SaveInfo.h"
#include "common/Platform.h"
#include "graphics/Renderer.h"
#include "simulation/Air.h"
#include "simulation/GOLString.h"
#include "simulation/Gravity.h"
#include "simulation/Simulation.h"
#include "simulation/Snapshot.h"
#include "simulation/Gravity.h"
#include "simulation/ElementGraphics.h"
#include "simulation/ElementClasses.h"
#include "simulation/GOLString.h"
#include "simulation/ElementGraphics.h"
#include "simulation/ToolClasses.h"
#include "gui/game/DecorationTool.h"
#include "gui/interface/Engine.h"
#include <iostream>
#include <algorithm>
GameModel::GameModel():
clipboard(NULL),
placeSave(NULL),

View File

@ -1,31 +1,32 @@
#include "GameView.h"
#include "GameController.h"
#include "GameModel.h"
#include "Brush.h"
#include "Config.h"
#include "Misc.h"
#include "DecorationTool.h"
#include "Favorite.h"
#include "Format.h"
#include "Platform.h"
#include "Notification.h"
#include "Brush.h"
#include "GameController.h"
#include "GameModel.h"
#include "IntroText.h"
#include "QuickOptions.h"
#include "DecorationTool.h"
#include "ToolButton.h"
#include "MenuButton.h"
#include "Menu.h"
#include "MenuButton.h"
#include "Misc.h"
#include "Notification.h"
#include "ToolButton.h"
#include "QuickOptions.h"
#include "client/SaveInfo.h"
#include "client/SaveFile.h"
#include "client/Client.h"
#include "common/Platform.h"
#include "graphics/Graphics.h"
#include "graphics/Renderer.h"
#include "gui/Style.h"
#include "simulation/ElementClasses.h"
#include "simulation/ElementDefs.h"
#include "simulation/SaveRenderer.h"
#include "simulation/SimulationData.h"
#include "gui/dialogues/ConfirmPrompt.h"
#include "gui/dialogues/ErrorMessage.h"
#include "gui/dialogues/InformationMessage.h"
@ -34,11 +35,6 @@
#include "gui/interface/Keys.h"
#include "gui/interface/Engine.h"
#include "simulation/SaveRenderer.h"
#include "simulation/SimulationData.h"
#include "simulation/ElementDefs.h"
#include "simulation/ElementClasses.h"
#include <cstring>
#ifdef GetUserName

View File

@ -1,17 +1,16 @@
#include "gui/interface/Engine.h"
#include "Window.h"
#include "Engine.h"
#include <cmath>
#include <cstring>
#include "gui/dialogues/ConfirmPrompt.h"
#include "Config.h"
#include "PowderToy.h"
#include "Window.h"
#include "common/Platform.h"
#include "graphics/Graphics.h"
#include "Config.h"
#include "Platform.h"
#include "PowderToy.h"
#include "gui/dialogues/ConfirmPrompt.h"
using namespace ui;

View File

@ -3,16 +3,15 @@
#include <vector>
#include <exception>
#include "Platform.h"
#include "gui/interface/Point.h"
#include "gui/interface/Component.h"
#include "graphics/Graphics.h"
#include "graphics/FontReader.h"
#include "Colour.h"
#include "common/Platform.h"
#include "graphics/FontReader.h"
#include "graphics/Graphics.h"
#include "gui/interface/Component.h"
#include "gui/interface/Point.h"
using namespace ui;
struct RichTextParseException: public std::exception {

View File

@ -1,17 +1,17 @@
#include "gui/interface/Textbox.h"
#include "Textbox.h"
#include "Config.h"
#include "Platform.h"
#include "Format.h"
#include "PowderToy.h"
#include "graphics/Graphics.h"
#include "common/Platform.h"
#include "graphics/FontReader.h"
#include "graphics/Graphics.h"
#include "gui/interface/Point.h"
#include "gui/interface/Engine.h"
#include "gui/interface/Keys.h"
#include "gui/interface/Mouse.h"
#include "gui/interface/Engine.h"
#include "gui/interface/Point.h"
#include "ContextMenu.h"

View File

@ -1,9 +1,5 @@
#include "OptionsView.h"
#include "simulation/ElementDefs.h"
#include "OptionsController.h"
#include "OptionsModel.h"
#include <cstdio>
#include <cstring>
#ifdef WIN
@ -13,18 +9,22 @@
#include <unistd.h>
#endif
#include "SDLCompat.h"
#include "Platform.h"
#include "OptionsController.h"
#include "OptionsModel.h"
#include "common/Platform.h"
#include "graphics/Graphics.h"
#include "gui/Style.h"
#include "simulation/ElementDefs.h"
#include "gui/interface/Button.h"
#include "gui/interface/Label.h"
#include "gui/interface/Checkbox.h"
#include "gui/interface/DropDown.h"
#include "gui/interface/Engine.h"
#include "gui/interface/Checkbox.h"
#include "gui/interface/Label.h"
#include "gui/interface/Textbox.h"
#include "graphics/Graphics.h"
OptionsView::OptionsView():
ui::Window(ui::Point(-1, -1), ui::Point(320, 340))
{

View File

@ -1,22 +1,20 @@
#include "PreviewController.h"
#include "PreviewView.h"
#include "Config.h"
#include "Controller.h"
#include "PreviewModel.h"
#include "PreviewModelException.h"
#include "PreviewView.h"
#include "client/Client.h"
#include "client/SaveInfo.h"
#include "common/Platform.h"
#include "PreviewModelException.h"
#include "gui/dialogues/InformationMessage.h"
#include "gui/dialogues/ErrorMessage.h"
#include "gui/dialogues/InformationMessage.h"
#include "gui/login/LoginController.h"
#include "gui/login/LoginView.h"
#include "Controller.h"
#include "Platform.h"
#include "Config.h"
PreviewController::PreviewController(int saveID, int saveDate, bool instant, std::function<void ()> onDone_):
saveId(saveID),
loginWindow(NULL),

View File

@ -1,16 +1,15 @@
#include "ProfileActivity.h"
#include "gui/interface/Button.h"
#include "gui/interface/Textbox.h"
#include "gui/interface/Label.h"
#include "gui/interface/AvatarButton.h"
#include "gui/interface/ScrollPanel.h"
#include "gui/dialogues/ErrorMessage.h"
#include "client/Client.h"
#include "common/Platform.h"
#include "gui/Style.h"
#include "client/Client.h"
#include "Platform.h"
#include "gui/interface/AvatarButton.h"
#include "gui/interface/Button.h"
#include "gui/dialogues/ErrorMessage.h"
#include "gui/interface/Label.h"
#include "gui/interface/ScrollPanel.h"
#include "gui/interface/Textbox.h"
ProfileActivity::ProfileActivity(ByteString username) :
WindowActivity(ui::Point(-1, -1), ui::Point(236, 300)),

View File

@ -1,14 +1,12 @@
#include "LocalSaveActivity.h"
#include "images.h"
#include "Platform.h"
#include "client/Client.h"
#include "client/GameSave.h"
#include "client/ThumbnailRendererTask.h"
#include "common/Platform.h"
#include "graphics/Graphics.h"
#include "gui/Style.h"
#include "gui/dialogues/ConfirmPrompt.h"

View File

@ -1,24 +1,20 @@
#include "SearchController.h"
#include "Controller.h"
#include "SearchModel.h"
#include "SearchView.h"
#include "client/Client.h"
#include "common/Platform.h"
#include "common/tpt-minmax.h"
#include "graphics/Graphics.h"
#include "tasks/Task.h"
#include "tasks/TaskWindow.h"
#include "gui/dialogues/ConfirmPrompt.h"
#include "gui/preview/PreviewController.h"
#include "gui/preview/PreviewView.h"
#include "tasks/Task.h"
#include "tasks/TaskWindow.h"
#include "Platform.h"
#include "Controller.h"
#include "graphics/Graphics.h"
#include "client/Client.h"
#include "common/tpt-minmax.h"
SearchController::SearchController(std::function<void ()> onDone_):
activePreview(NULL),
nextQueryTime(0.0f),

View File

@ -2,18 +2,17 @@
#include "bzip2/bzlib.h"
#include "gui/dialogues/ConfirmPrompt.h"
#include "gui/interface/Engine.h"
#include "Config.h"
#include "Update.h"
#include "client/Client.h"
#include "common/Platform.h"
#include "tasks/Task.h"
#include "tasks/TaskWindow.h"
#include "client/Client.h"
#include "client/http/Request.h"
#include "Update.h"
#include "Config.h"
#include "Platform.h"
#include "gui/dialogues/ConfirmPrompt.h"
#include "gui/interface/Engine.h"
class UpdateDownloadTask : public Task
{

View File

@ -5,32 +5,30 @@
#include <algorithm>
#include <locale>
#include "client/http/Request.h"
#include "client/Client.h"
#include "Format.h"
#include "LuaScriptInterface.h"
#include "LuaScriptHelper.h"
#include "LuaScriptInterface.h"
#include "LuaSmartRef.h"
#include "Platform.h"
#include "PowderToy.h"
#include "client/Client.h"
#include "common/Platform.h"
#include "graphics/Graphics.h"
#include "graphics/Renderer.h"
#include "simulation/ElementCommon.h"
#include "simulation/Gravity.h"
#include "simulation/Simulation.h"
#include "simulation/SimulationData.h"
#include "client/http/Request.h"
#include "gui/dialogues/ConfirmPrompt.h"
#include "gui/dialogues/ErrorMessage.h"
#include "gui/dialogues/InformationMessage.h"
#include "gui/dialogues/TextPrompt.h"
#include "gui/dialogues/ConfirmPrompt.h"
#include "gui/game/GameModel.h"
#include "gui/game/GameController.h"
#include "gui/interface/Keys.h"
#include "gui/game/GameModel.h"
#include "gui/interface/Engine.h"
#include "simulation/Simulation.h"
#include "simulation/Gravity.h"
#include "simulation/SimulationData.h"
#include "simulation/ElementCommon.h"
#include "graphics/Graphics.h"
#include "graphics/Renderer.h"
#include "gui/interface/Keys.h"
std::map<ByteString, StructProperty> legacyPropNames;
std::map<ByteString, StructProperty> legacyTransitionNames;

View File

@ -2,7 +2,7 @@
#ifdef LUACONSOLE
# include "LuaCompat.h"
# include "LuaScriptInterface.h"
# include "Platform.h"
# include "common/Platform.h"
# include "gui/interface/Engine.h"
#endif

View File

@ -8,10 +8,6 @@
#include <algorithm>
#include "Format.h"
#include "Platform.h"
#include "PowderToy.h"
#include "TPTScriptInterface.h"
#include "LuaScriptHelper.h"
#include "LuaLuna.h"
#include "LuaBit.h"
@ -23,9 +19,25 @@
#include "LuaSlider.h"
#include "LuaTextbox.h"
#include "LuaWindow.h"
#include "LuaTCPSocket.h"
#include "PowderToy.h"
#include "TPTScriptInterface.h"
#include "client/Client.h"
#include "client/GameSave.h"
#include "client/SaveFile.h"
#include "client/SaveInfo.h"
#include "common/Platform.h"
#include "graphics/Graphics.h"
#include "graphics/Renderer.h"
#include "simulation/Air.h"
#include "simulation/ElementCommon.h"
#include "simulation/ElementClasses.h"
#include "simulation/ElementGraphics.h"
#include "simulation/Simulation.h"
#include "simulation/ToolClasses.h"
#include "client/http/Request.h"
#include "gui/interface/Window.h"
#include "gui/interface/Engine.h"
#include "gui/game/GameView.h"
@ -34,23 +46,6 @@
#include "gui/game/Tool.h"
#include "gui/game/Brush.h"
#include "simulation/Simulation.h"
#include "simulation/ElementGraphics.h"
#include "simulation/ElementCommon.h"
#include "simulation/Air.h"
#include "simulation/ToolClasses.h"
#include "simulation/ElementClasses.h"
#include "client/GameSave.h"
#include "client/SaveFile.h"
#include "client/SaveInfo.h"
#include "client/Client.h"
#include "client/http/Request.h"
#include "graphics/Graphics.h"
#include "graphics/Renderer.h"
#ifndef WIN
#include <unistd.h>
#endif

View File

@ -22,7 +22,6 @@ font_files = files(
common_files = files(
'Format.cpp',
'Misc.cpp',
'Platform.cpp',
'Probability.cpp',
)