naming convention for most stuff but not all

This commit is contained in:
lustlion
2022-03-04 23:28:30 +01:00
parent c978855711
commit cef2096577
29 changed files with 354 additions and 436 deletions

View File

@@ -1,19 +1,19 @@
function GameStep()
SetCollisionFlags()
function stepGame()
setCollisionFlags()
if menu_type == "no" then
for _, particle in pairs(LoadedParticles) do
particle:Smart()
particle:doLogic()
end
for _, enty in pairs(LoadedObjects.Entities) do
enty:Smart()
enty:doLogic()
end
end
for _, particle in pairs(LoadedObjects.Particles) do
particle:DoPhysics()
particle:doPhysics()
end
for _, enty in pairs(LoadedObjects.Entities) do
enty:DoPhysics()
enty:doPhysics()
end
AnimateTiles()
@@ -50,50 +50,50 @@ function GameStep()
if Keybind:CheckPressed(Keybind.debug.recording) then
if DemoRecording then
Demo:RecordEnd()
Demo:endRecord()
else
Demo:RecordStart()
Demo:startRecord()
end
end
if Keybind:CheckPressed(Keybind.debug.playback) then
if DemoPlayback then
Demo:PlaybackEnd()
Demo:endPlayback()
else
Demo:PlaybackStart()
Demo:startPlayback()
end
end
end
function GameDraw()
function drawGame()
-- prepare
GameworldDrawPrepare()
GameWorldUpdateLights()
startGameworldDraw()
updateGameWorldLights()
-- background
GameworldDrawBackground()
GameworldDrawLights()
GameworldDrawEntitiesBackground()
drawGameworldBackground()
drawGameworldLights()
drawGameworldEntitiesBackground()
-- foreground
GameworldDrawForeground()
GameworldDrawParticles()
GameworldDrawEntities()
drawGameworldForeground()
drawGameworldParticles()
drawGameworldEntities()
if LevelData.properties.darkness then
GameworldDrawDarkness()
drawGameworldDarkness()
end
-- end
GameworldDrawEnd()
endGameworldDraw()
-- hud
textScale = 1
-- debug
if debug then DebugUI() end
if debug then debugUI() end
if debug_collision then
DebugColisions()
DebugEntities()
debugColisions()
debugEntities()
end
end