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. commit5009fa0fb9Author: John McCardle <mccardle.john@gmail.com> Date: Sun Apr 7 22:44:15 2024 -0400 PyFont - use the new standard method for instancing commita19781b56aAuthor: 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 commit159658521cAuthor: 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:
parent
fbf263a038
commit
1a7186f745
8 changed files with 207 additions and 11 deletions
|
|
@ -21,6 +21,7 @@ public:
|
|||
sf::Sprite sprite(int index, sf::Vector2f pos = sf::Vector2f(0, 0), sf::Vector2f s = sf::Vector2f(1.0, 1.0));
|
||||
|
||||
PyObject* pyObject();
|
||||
static PyObject* repr(PyObject*);
|
||||
static Py_hash_t hash(PyObject*);
|
||||
static int init(PyTextureObject*, PyObject*, PyObject*);
|
||||
static PyObject* pynew(PyTypeObject* type, PyObject* args=NULL, PyObject* kwds=NULL);
|
||||
|
|
@ -31,10 +32,12 @@ namespace mcrfpydef {
|
|||
.tp_name = "mcrfpy.Texture",
|
||||
.tp_basicsize = sizeof(PyTextureObject),
|
||||
.tp_itemsize = 0,
|
||||
.tp_repr = PyTexture::repr,
|
||||
.tp_hash = PyTexture::hash,
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT,
|
||||
.tp_doc = PyDoc_STR("SFML Texture Object"),
|
||||
//.tp_base = &PyBaseObject_Type,
|
||||
.tp_init = (initproc)PyTexture::init,
|
||||
.tp_new = PyTexture::pynew,
|
||||
.tp_new = PyType_GenericNew, //PyTexture::pynew,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue