Moved a few things around, definitely not clean but better.
This commit is contained in:
70
src/script/module/display/modulecamera.h
Normal file
70
src/script/module/display/modulecamera.h
Normal 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
|
||||
);
|
||||
Reference in New Issue
Block a user