Squashed commit of the following: [standardize_font_handling]

closes #60, closes #5, closes #68

The major functionality added here was proper use of types in the module, by importing after finalization.

commit 5009fa0fb9
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sun Apr 7 22:44:15 2024 -0400

    PyFont - use the new standard method for instancing

commit a19781b56a
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sun Apr 7 15:21:17 2024 -0400

    Many hours of pain & research behind this small commit. Safe object building by not messing with types before interpreter is fully initialized

commit 159658521c
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sun Mar 31 21:41:45 2024 -0400

    Font mostly working, just a few weird bugs with the types of the default items added to the module
This commit is contained in:
John McCardle 2024-04-07 22:51:31 -04:00
commit 1a7186f745
8 changed files with 207 additions and 11 deletions

View file

@ -3,6 +3,9 @@
#include "Python.h"
#include <list>
#include "PyFont.h"
#include "PyTexture.h"
class GameEngine; // forward declared (circular members)
class McRFPy_API
@ -14,10 +17,14 @@ private:
McRFPy_API();
public:
inline static sf::Sprite sprite;
inline static sf::Texture texture;
static void setSpriteTexture(int);
static PyObject* mcrf_module;
static std::shared_ptr<PyFont> default_font;
static std::shared_ptr<PyTexture> default_texture;
//inline static sf::Sprite sprite;
//inline static sf::Texture texture;
//static void setSpriteTexture(int);
inline static GameEngine* game;
static void api_init();
static void api_shutdown();