@@ -98,39 +98,6 @@ void Core::EventHandlerCallback()
9898 }
9999 lua_pop (L, 3 );
100100 }
101-
102- #ifdef EXPERIMENTAL
103- lua_getglobal (L, " Game" );
104- lua_getfield (L, -1 , " Event" );
105- lua_getfield (L, -1 , " OnNewFrame" );
106- lua_getfield (L, -1 , " Trigger" );
107-
108- if (lua_isfunction (L, -1 ))
109- {
110- lua_pushvalue (L, -2 );
111- lua_pushstring (L, " top" );
112- graphicsIsTop.store (true );
113- if (lua_pcall (L, 2 , 0 , 0 ))
114- {
115- Core::Debug::LogError (" Core::Event::OnNewFrame(top) error: " + std::string (lua_tostring (L, -1 )));
116- lua_pop (L, 1 );
117- }
118- lua_getfield (L, -1 , " Trigger" );
119- lua_pushvalue (L, -2 );
120- lua_pushstring (L, " bottom" );
121- graphicsIsTop.store (false );
122- if (lua_pcall (L, 2 , 0 , 0 ))
123- {
124- Core::Debug::LogError (" Core::Event::OnNewFrame(bottom) error: " + std::string (lua_tostring (L, -1 )));
125- lua_pop (L, 1 );
126- }
127- }
128- else {
129- Core::Debug::LogError (" Core::Event::OnNewFrame::Trigger error. Unexpected type" );
130- lua_pop (L, 1 );
131- }
132- lua_pop (L, 3 );
133- #endif
134101}
135102
136103void Core::Event::TriggerOnPlayerJoinWorld (lua_State *L) {
@@ -309,15 +276,6 @@ bool Core::Game::RegisterEventModule(lua_State *L)
309276 lua_getglobal (L, " Game" );
310277 lua_getfield (L, -1 , " Event" );
311278
312- #ifdef EXPERIMENTAL
313- // --$@@@Game.Event.OnNewFrame: EventClass
314- lua_newtable (L);
315- lua_newtable (L);
316- lua_setfield (L, -2 , " listeners" );
317- luaC_setmetatable (L, " EventClass" );
318- lua_setfield (L, -2 , " OnNewFrame" );
319- #endif
320-
321279 // $@@@Game.Event.OnKeyPressed: EventClass
322280 lua_newtable (L);
323281 lua_newtable (L);
0 commit comments