Scarab
A thin, game-agnostic 2D engine host built on the sunlight tile-map engine
Loading...
Searching...
No Matches
luaviewapi.h
Go to the documentation of this file.
1/*
2 * Copyright (c) since 2021 by PopolonY2k and Leidson Campos A. Ferreira
3 *
4 * This software is provided 'as-is', without any express or implied
5 * warranty. In no event will the authors be held liable for any damages
6 * arising from the use of this software.
7 *
8 * Permission is granted to anyone to use this software for any purpose,
9 * including commercial applications, and to alter it and redistribute it
10 * freely, subject to the following restrictions:
11 *
12 * 1. The origin of this software must not be misrepresented; you must not
13 * claim that you wrote the original software. If you use this software
14 * in a product, an acknowledgment in the product documentation would be
15 * appreciated but is not required.
16 * 2. Altered source versions must be plainly marked as such, and must not be
17 * misrepresented as being the original software.
18 * 3. This notice may not be removed or altered from any source distribution.
19 */
20
21#ifndef __LUAVIEWAPI_H__
22#define __LUAVIEWAPI_H__
23
24extern "C"
25{
26 #include "lua.h"
27}
28
29
30namespace Scarab {
31 namespace Engine {
32 namespace Lua {
69 class LuaViewApi {
70
71 static int ViewCreate( lua_State *pLuaState );
72 static int ViewDestroy( lua_State *pLuaState );
73 static int ViewSetZoom( lua_State *pLuaState );
74 static int ViewGetZoom( lua_State *pLuaState );
75 static int ViewSetPreferredZoom( lua_State *pLuaState );
76 static int ViewGetPreferredZoom( lua_State *pLuaState );
77 static int ViewSetZoomLimits( lua_State *pLuaState );
78 static int ViewGetZoomLimits( lua_State *pLuaState );
79 static int ViewSetZoomEnabled( lua_State *pLuaState );
80 static int ViewGetZoomEnabled( lua_State *pLuaState );
81 static int ViewZoomIn( lua_State *pLuaState );
82 static int ViewZoomOut( lua_State *pLuaState );
83 static int ViewZoomReset( lua_State *pLuaState );
84 static int ViewSetDimension( lua_State *pLuaState );
85 static int ViewGetDimension( lua_State *pLuaState );
86 static int ViewSetScrollStep( lua_State *pLuaState );
87 static int ViewGetScrollStep( lua_State *pLuaState );
88 static int ViewSetCameraPosition( lua_State *pLuaState );
89 static int ViewGetCameraPosition( lua_State *pLuaState );
90 static int ViewMoveCameraUp( lua_State *pLuaState );
91 static int ViewMoveCameraDown( lua_State *pLuaState );
92 static int ViewMoveCameraLeft( lua_State *pLuaState );
93 static int ViewMoveCameraRight( lua_State *pLuaState );
94 static int ViewResetCamera( lua_State *pLuaState );
95 static int ViewSetVisible( lua_State *pLuaState );
96 static int ViewGetVisible( lua_State *pLuaState );
97 static int ViewSetDrawOrder( lua_State *pLuaState );
98 static int ViewGetDrawOrder( lua_State *pLuaState );
99 static int ViewSetClearBackground( lua_State *pLuaState );
100 static int ViewGetClearBackground( lua_State *pLuaState );
101 static int ViewSetBackgroundColor( lua_State *pLuaState );
102 static int ViewUseMapBackgroundColor( lua_State *pLuaState );
103 static int ViewShowLayer( lua_State *pLuaState );
104 static int ViewShowOnlyLayers( lua_State *pLuaState );
105 static int ViewShowAllLayers( lua_State *pLuaState );
106 static int ViewIsLayerShown( lua_State *pLuaState );
107 static int ViewFitToMap( lua_State *pLuaState );
108
109 public:
110
111 static void Register( lua_State *pLuaState );
112 };
113 }
114 }
115}
116
117#endif /* __LUAVIEWAPI_H__ */
View-addressed camera/zoom/viewport Lua primitives.
Definition luaviewapi.h:69
static void Register(lua_State *pLuaState)
Register the view-addressed Lua-callable functions.
Definition luaviewapi.cpp:1211
Definition irendererprovider.h:32