Refactor: Python 3.12, build libtcod & SFML from source. Cmake build. Directory cleanup

directories needed:
* build - for cmake output
* deps - stuff needed to compile McRogueface (headers)
	libtcod -> ../modules/libtcod/src/libtcod
	sfml -> ../modules/SFML/include/SFML
	python -> ../modules/cpython/Include
* lib - stuff needed to link McRogueFace (shared objects); also required at runtime
	libtcod -> `../modules/libtcod/buildsys/autotools/.libs/libtcod.so.1.0.24`
	sfml -> `../modules/SFML/build/lib/*`
	python -> `../modules/cpython/libpython3.12.so`; standard lib at ../modules/cpython/build/lib.linux-x86_64-3.12 & ../modules/cpython/Lib

You can get dependencies by:
 - Build from source (i.e. all submodules)
 - Go download them from each project's website
 - install packages from your distro and symlink them to deps/lib directories
This commit is contained in:
John McCardle 2024-02-24 22:47:20 -05:00 committed by John McCardle
commit 07b597d6f2
999 changed files with 6679 additions and 155791 deletions

44
src/Scene.h Normal file
View file

@ -0,0 +1,44 @@
#pragma once
// macros for scene input
#define ACTION(X, Y) (name.compare(X) == 0 && type.compare(Y) == 0)
#define ACTIONONCE(X) ((name.compare(X) == 0 && type.compare("start") == 0 && !actionState[name]))
#define ACTIONAFTER(X) ((name.compare(X) == 0 && type.compare("end") == 0))
#define ACTIONPY ((name.size() > 3 && name.compare(name.size() - 3, 3, "_py") == 0))
#include "Common.h"
#include <list>
#include "UI.h"
//#include "GameEngine.h"
class GameEngine; // forward declare
class Scene
{
protected:
bool hasEnded = false;
bool paused = false;
std::map<int, std::string> actions;
std::map<std::string, bool> actionState;
GameEngine* game;
void simulate(int);
void registerAction(int, std::string);
public:
//Scene();
Scene(GameEngine*);
virtual void update() = 0;
virtual void sRender() = 0;
virtual void doAction(std::string, std::string) = 0;
bool hasAction(std::string);
bool hasAction(int);
std::string action(int);
virtual bool registerActionInjected(int, std::string);
virtual bool unregisterActionInjected(int, std::string);
std::shared_ptr<std::vector<std::shared_ptr<UIDrawable>>> ui_elements;
};