mirror of
https://github.com/H-uru/korman.git
synced 2025-07-13 18:17:38 -04:00
C Korlib code de-duplication
Moves all PyHSPlasma struct definitions into a private header file. Also adds move constructor and assignment support to PyObjectRef.
This commit is contained in:
@ -15,6 +15,8 @@
|
||||
*/
|
||||
|
||||
#include "bumpmap.h"
|
||||
#include "PyHSPlasma_private.h"
|
||||
|
||||
#include <PRP/Surface/plMipmap.h>
|
||||
|
||||
static uint32_t MakeUInt32Color(float r, float g, float b, float a) {
|
||||
@ -24,14 +26,6 @@ static uint32_t MakeUInt32Color(float r, float g, float b, float a) {
|
||||
(uint32_t(b * 255.9f) << 0);
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
plMipmap* fThis;
|
||||
bool fPyOwned;
|
||||
} pyMipmap;
|
||||
|
||||
extern "C" {
|
||||
|
||||
PyObject* create_bump_LUT(PyObject*, PyObject* args) {
|
||||
static const int kLUTHeight = 16;
|
||||
static const int kLUTWidth = 16;
|
||||
@ -110,5 +104,3 @@ PyObject* create_bump_LUT(PyObject*, PyObject* args) {
|
||||
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user