修改加载SHADER的时机

This commit is contained in:
MrZ626
2021-10-18 15:05:35 +08:00
parent 3d70a5ac79
commit d4539c3a23
2 changed files with 13 additions and 16 deletions

View File

@@ -69,6 +69,10 @@ for _,v in next,{'conf','record','replay','cache','lib'}do
end end
end end
CHAR=require'parts.char'
require'parts.gameTables'
require'parts.gameFuncs'
--Load shader files from SOURCE ONLY --Load shader files from SOURCE ONLY
SHADER={} SHADER={}
for _,v in next,fs.getDirectoryItems('parts/shaders')do for _,v in next,fs.getDirectoryItems('parts/shaders')do
@@ -78,10 +82,6 @@ for _,v in next,fs.getDirectoryItems('parts/shaders')do
end end
end end
CHAR=require'parts.char'
require'parts.gameTables'
require'parts.gameFuncs'
FREEROW= require'parts.freeRow' FREEROW= require'parts.freeRow'
DATA= require'parts.data' DATA= require'parts.data'

View File

@@ -715,18 +715,15 @@ function drawOnlinePlayerCount()
gc_printf(("%s: %s/%s/%s"):format(text.onlinePlayerCount,NET.UserCount,NET.PlayCount,NET.StreamCount),-600,80,594,'right') gc_printf(("%s: %s/%s/%s"):format(text.onlinePlayerCount,NET.UserCount,NET.PlayCount,NET.StreamCount),-600,80,594,'right')
gc_pop() gc_pop()
end end
do--function drawWarning() function drawWarning()
local shader_warning=SHADER.warning if SETTING.warn and GAME.warnLVL>0 then
function drawWarning() gc_push('transform')
if SETTING.warn and GAME.warnLVL>0 then gc_origin()
gc_push('transform') SHADER.warning:send('level',GAME.warnLVL)
gc_origin() gc_setShader(SHADER.warning)
shader_warning:send('level',GAME.warnLVL) gc_rectangle('fill',0,0,SCR.w,SCR.h)
gc_setShader(shader_warning) gc_setShader()
gc_rectangle('fill',0,0,SCR.w,SCR.h) gc_pop()
gc_setShader()
gc_pop()
end
end end
end end