Moved a few things around, definitely not clean but better.
Some checks failed
Build Dusk / run-tests (push) Failing after 2m3s
Build Dusk / build-linux (push) Successful in 2m13s
Build Dusk / build-psp (push) Successful in 1m56s

This commit is contained in:
2026-01-28 15:00:59 -06:00
parent c190271565
commit 794e0574ad
27 changed files with 558 additions and 66 deletions

View File

@@ -0,0 +1,70 @@
/**
* Copyright (c) 2026 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "script/scriptcontext.h"
/**
* Register camera functions to the given script context.
*
* @param context The script context to register camera functions to.
*/
void moduleCamera(scriptcontext_t *context);
/**
* Script binding for creating a new camera.
*
* @param L The Lua state.
* @return Number of return values on the Lua stack.
*/
int moduleCameraCreate(lua_State *L);
/**
* Script binding for pushing the camera matrix onto the matrix stack.
*
* @param L The Lua state.
* @return Number of return values on the Lua stack.
*/
int moduleCameraPushMatrix(lua_State *L);
/**
* Script binding for popping the camera matrix from the matrix stack.
*
* @param L The Lua state.
* @return Number of return values on the Lua stack.
*/
int moduleCameraPopMatrix(lua_State *L);
/**
* Getter for camera structure fields.
*
* @param context The script context.
* @param key The field key.
* @param structPtr Pointer to the camera structure.
* @param outValue Output script value.
*/
void moduleCameraGetter(
const scriptcontext_t *context,
const char_t *key,
const void *structPtr,
scriptvalue_t *outValue
);
/**
* Setter for camera structure fields.
*
* @param context The script context.
* @param key The field key.
* @param structPtr Pointer to the camera structure.
* @param inValue Input script value.
*/
void moduleCameraSetter(
const scriptcontext_t *context,
const char_t *key,
void *structPtr,
const scriptvalue_t *inValue
);