Pointer variable declaration style change.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#include "platforms/core_desktop.h"
|
||||
|
||||
void platformDefineGlobals() {
|
||||
lua_State *L = state->luaState;
|
||||
lua_State* L = state->luaState;
|
||||
|
||||
lua_getglobal( L, "RL" );
|
||||
/*DOC_DEFINES_START*/
|
||||
@@ -55,11 +55,11 @@ this function returns nil but does not emit an error.
|
||||
|
||||
- Success return string or nil
|
||||
*/
|
||||
int lcoreGetKeyName( lua_State *L ) {
|
||||
int lcoreGetKeyName( lua_State* L ) {
|
||||
int key = luaL_checkinteger( L, 1 );
|
||||
int scancode = luaL_checkinteger( L, 2 );
|
||||
|
||||
const char *keyName = glfwGetKeyName( key, scancode );
|
||||
const char* keyName = glfwGetKeyName( key, scancode );
|
||||
|
||||
if ( keyName != NULL ) {
|
||||
lua_pushstring( L, keyName );
|
||||
@@ -79,7 +79,7 @@ If the key is KEY_UNKNOWN or does not exist on the keyboard this method will ret
|
||||
|
||||
- Success return int
|
||||
*/
|
||||
int lcoreGetKeyScancode( lua_State *L ) {
|
||||
int lcoreGetKeyScancode( lua_State* L ) {
|
||||
int key = luaL_checkinteger( L, 1 );
|
||||
|
||||
lua_pushinteger( L, glfwGetKeyScancode( key ) );
|
||||
@@ -98,11 +98,11 @@ int lcoreGetKeyScancode( lua_State *L ) {
|
||||
|
||||
Called when the window is resized. Type GLFW_WINDOW_SIZE_EVENT
|
||||
*/
|
||||
static void windowSizeEvent( GLFWwindow *window, int width, int height ) {
|
||||
static void windowSizeEvent( GLFWwindow* window, int width, int height ) {
|
||||
/* Pass through to raylib callback. */
|
||||
state->raylibWindowSizeCallback( window, width, height );
|
||||
|
||||
lua_State *L = state->luaState;
|
||||
lua_State* L = state->luaState;
|
||||
|
||||
lua_pushcfunction( L, luaTraceback );
|
||||
int tracebackidx = lua_gettop( L );
|
||||
@@ -134,11 +134,11 @@ static void windowSizeEvent( GLFWwindow *window, int width, int height ) {
|
||||
|
||||
Called when the window is maximized or restored. Type GLFW_WINDOW_MAXIMIZE_EVENT
|
||||
*/
|
||||
static void windowMaximizeEvent( GLFWwindow *window, int maximized ) {
|
||||
static void windowMaximizeEvent( GLFWwindow* window, int maximized ) {
|
||||
/* Pass through to raylib callback. */
|
||||
state->raylibWindowMaximizeCallback( window, maximized );
|
||||
|
||||
lua_State *L = state->luaState;
|
||||
lua_State* L = state->luaState;
|
||||
|
||||
lua_pushcfunction( L, luaTraceback );
|
||||
int tracebackidx = lua_gettop( L );
|
||||
@@ -168,11 +168,11 @@ static void windowMaximizeEvent( GLFWwindow *window, int maximized ) {
|
||||
|
||||
Called when the window is iconified or restored. Type GLFW_WINDOW_ICONYFY_EVENT
|
||||
*/
|
||||
static void windowIconyfyEvent( GLFWwindow *window, int iconified ) {
|
||||
static void windowIconyfyEvent( GLFWwindow* window, int iconified ) {
|
||||
/* Pass through to raylib callback. */
|
||||
state->raylibWindowIconifyCallback( window, iconified );
|
||||
|
||||
lua_State *L = state->luaState;
|
||||
lua_State* L = state->luaState;
|
||||
|
||||
lua_pushcfunction( L, luaTraceback );
|
||||
int tracebackidx = lua_gettop( L );
|
||||
@@ -200,11 +200,11 @@ static void windowIconyfyEvent( GLFWwindow *window, int iconified ) {
|
||||
|
||||
Called when the window gains or loses input focus. Type GLFW_WINDOW_FOCUS_EVENT
|
||||
*/
|
||||
static void windowFocusEvent( GLFWwindow *window, int focused ) {
|
||||
static void windowFocusEvent( GLFWwindow* window, int focused ) {
|
||||
/* Pass through to raylib callback. */
|
||||
state->raylibWindowFocusCallback( window, focused );
|
||||
|
||||
lua_State *L = state->luaState;
|
||||
lua_State* L = state->luaState;
|
||||
|
||||
lua_pushcfunction( L, luaTraceback );
|
||||
int tracebackidx = lua_gettop( L );
|
||||
@@ -232,11 +232,11 @@ static void windowFocusEvent( GLFWwindow *window, int focused ) {
|
||||
|
||||
Called when files are dropped to the window. Type GLFW_WINDOW_DROP_EVENT
|
||||
*/
|
||||
static void windowDropEvent( GLFWwindow *window, int count, const char **paths ) {
|
||||
static void windowDropEvent( GLFWwindow* window, int count, const char** paths ) {
|
||||
/* Pass through to raylib callback. */
|
||||
state->raylibWindowDropCallback( window, count, paths );
|
||||
|
||||
lua_State *L = state->luaState;
|
||||
lua_State* L = state->luaState;
|
||||
|
||||
lua_pushcfunction( L, luaTraceback );
|
||||
int tracebackidx = lua_gettop( L );
|
||||
@@ -280,7 +280,7 @@ static void keyInputEvent( GLFWwindow* window, int key, int scancode, int action
|
||||
/* Pass through to raylib callback. */
|
||||
state->raylibKeyCallback( window, key, scancode, action, mods );
|
||||
|
||||
lua_State *L = state->luaState;
|
||||
lua_State* L = state->luaState;
|
||||
|
||||
lua_pushcfunction( L, luaTraceback );
|
||||
int tracebackidx = lua_gettop( L );
|
||||
@@ -318,7 +318,7 @@ static void charInputEvent( GLFWwindow* window, unsigned int key ) {
|
||||
/* Pass through to raylib callback. */
|
||||
state->raylibCharCallback( window, key );
|
||||
|
||||
lua_State *L = state->luaState;
|
||||
lua_State* L = state->luaState;
|
||||
|
||||
lua_pushcfunction( L, luaTraceback );
|
||||
int tracebackidx = lua_gettop( L );
|
||||
@@ -350,7 +350,7 @@ static void mouseButtonInputEvent( GLFWwindow* window, int button, int action, i
|
||||
/* Pass through to raylib callback. */
|
||||
state->raylibMouseButtonCallback( window, button, action, mods );
|
||||
|
||||
lua_State *L = state->luaState;
|
||||
lua_State* L = state->luaState;
|
||||
|
||||
lua_pushcfunction( L, luaTraceback );
|
||||
int tracebackidx = lua_gettop( L );
|
||||
@@ -386,7 +386,7 @@ static void mouseCursorPosInputEvent( GLFWwindow* window, double x, double y ) {
|
||||
/* Pass through to raylib callback. */
|
||||
state->raylibMouseCursorPosCallback( window, x, y );
|
||||
|
||||
lua_State *L = state->luaState;
|
||||
lua_State* L = state->luaState;
|
||||
|
||||
lua_pushcfunction( L, luaTraceback );
|
||||
int tracebackidx = lua_gettop( L );
|
||||
@@ -420,7 +420,7 @@ static void mouseScrollInputEvent( GLFWwindow* window, double xoffset, double yo
|
||||
/* Pass through to raylib callback. */
|
||||
state->raylibMouseScrollCallback( window, xoffset, yoffset );
|
||||
|
||||
lua_State *L = state->luaState;
|
||||
lua_State* L = state->luaState;
|
||||
|
||||
lua_pushcfunction( L, luaTraceback );
|
||||
int tracebackidx = lua_gettop( L );
|
||||
@@ -454,7 +454,7 @@ static void cursorEnterInputEvent( GLFWwindow* window, int enter ) {
|
||||
/* Pass through to raylib callback. */
|
||||
state->raylibCursorEnterCallback( window, enter );
|
||||
|
||||
lua_State *L = state->luaState;
|
||||
lua_State* L = state->luaState;
|
||||
|
||||
lua_pushcfunction( L, luaTraceback );
|
||||
int tracebackidx = lua_gettop( L );
|
||||
@@ -488,7 +488,7 @@ static void joystickEvent( int jid, int event ) {
|
||||
state->raylibJoystickCallback( jid, event );
|
||||
}
|
||||
|
||||
lua_State *L = state->luaState;
|
||||
lua_State* L = state->luaState;
|
||||
|
||||
lua_pushcfunction( L, luaTraceback );
|
||||
int tracebackidx = lua_gettop( L );
|
||||
@@ -520,7 +520,7 @@ Called when the pen tablet data is updated. Type GLFW_PEN_TABLET_DATA_EVENT
|
||||
NOTE: Experimental. Needs glfw PR https://github.com/glfw/glfw/pull/1445
|
||||
*/
|
||||
static void penTabletDataEvent( double x, double y, double z, double pressure, double pitch, double yaw, double roll ) {
|
||||
lua_State *L = state->luaState;
|
||||
lua_State* L = state->luaState;
|
||||
|
||||
lua_pushcfunction( L, luaTraceback );
|
||||
int tracebackidx = lua_gettop( L );
|
||||
@@ -562,7 +562,7 @@ Called when the pen tablet cursor has changed. Type GLFW_PEN_TABLET_CURSOR_EVENT
|
||||
NOTE: Experimental. Needs glfw PR https://github.com/glfw/glfw/pull/1445
|
||||
*/
|
||||
static void penTabletCursorEvent( unsigned int identifier ) {
|
||||
lua_State *L = state->luaState;
|
||||
lua_State* L = state->luaState;
|
||||
|
||||
lua_pushcfunction( L, luaTraceback );
|
||||
int tracebackidx = lua_gettop( L );
|
||||
@@ -592,7 +592,7 @@ Called when the pen tablet proximity has changed. Type GLFW_PEN_TABLET_PROXIMITY
|
||||
NOTE: Experimental. Needs glfw PR https://github.com/glfw/glfw/pull/1445
|
||||
*/
|
||||
static void penTabletProximityEvent( int proxState ) {
|
||||
lua_State *L = state->luaState;
|
||||
lua_State* L = state->luaState;
|
||||
|
||||
lua_pushcfunction( L, luaTraceback );
|
||||
int tracebackidx = lua_gettop( L );
|
||||
@@ -640,7 +640,7 @@ static void platformRegisterEvents() {
|
||||
}
|
||||
|
||||
void luaPlatformRegister() {
|
||||
lua_State *L = state->luaState;
|
||||
lua_State* L = state->luaState;
|
||||
lua_getglobal( L, "RL" );
|
||||
|
||||
/* Input-related functions: keyboard. */
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "platforms/core_desktop_sdl.h"
|
||||
|
||||
void platformDefineGlobals() {
|
||||
lua_State *L = state->luaState;
|
||||
lua_State* L = state->luaState;
|
||||
|
||||
lua_getglobal( L, "RL" );
|
||||
/*DOC_DEFINES_START*/
|
||||
@@ -88,7 +88,7 @@ Use this function to get a human-readable name for a key. If the key doesn't hav
|
||||
|
||||
- Success return string
|
||||
*/
|
||||
int lcoreGetKeyName( lua_State *L ) {
|
||||
int lcoreGetKeyName( lua_State* L ) {
|
||||
int key = luaL_checkinteger( L, 1 );
|
||||
|
||||
lua_pushstring( L, SDL_GetKeyName( key ) );
|
||||
@@ -103,7 +103,7 @@ Use this function to get the scancode corresponding to the given key code accord
|
||||
|
||||
- Success return int
|
||||
*/
|
||||
int lcoreGetScancodeFromKey( lua_State *L ) {
|
||||
int lcoreGetScancodeFromKey( lua_State* L ) {
|
||||
int key = luaL_checkinteger( L, 1 );
|
||||
|
||||
lua_pushinteger( L, SDL_GetScancodeFromKey( key ) );
|
||||
@@ -118,7 +118,7 @@ int lcoreGetScancodeFromKey( lua_State *L ) {
|
||||
*/
|
||||
|
||||
/* This function is not thread safe so we don't use Lua inside it directly. It only adds events to another queue. */
|
||||
static int SDLEventFilter( void *userdata, SDL_Event *event ) {
|
||||
static int SDLEventFilter( void* userdata, SDL_Event* event ) {
|
||||
/* SDL_EVENT_POLL_SENTINEL = 0x7F00, /**< Signals the end of an event poll cycle */
|
||||
if ( event->type != SDL_QUIT && event->type != 0x7F00 && state->SDL_eventQueueLen < PLATFORM_SDL_EVENT_QUEUE_LEN ) {
|
||||
state->SDL_eventQueue[ state->SDL_eventQueueLen ] = *event;
|
||||
@@ -134,7 +134,7 @@ static void platformRegisterEvents() {
|
||||
}
|
||||
|
||||
static void platformSendEvents() {
|
||||
lua_State *L = state->luaState;
|
||||
lua_State* L = state->luaState;
|
||||
|
||||
lua_pushcfunction( L, luaTraceback );
|
||||
int tracebackidx = lua_gettop( L );
|
||||
@@ -546,7 +546,7 @@ Event occurs an event of type SDL_DOLLARGESTURE or SDL_DOLLARRECORD is reported.
|
||||
}
|
||||
|
||||
void luaPlatformRegister() {
|
||||
lua_State *L = state->luaState;
|
||||
lua_State* L = state->luaState;
|
||||
lua_getglobal( L, "RL" );
|
||||
|
||||
/* Input-related functions: keyboard. */
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "core.h"
|
||||
|
||||
void platformDefineGlobals() {
|
||||
lua_State *L = state->luaState;
|
||||
lua_State* L = state->luaState;
|
||||
|
||||
lua_getglobal( L, "RL" );
|
||||
/*DOC_DEFINES_START*/
|
||||
|
||||
Reference in New Issue
Block a user