summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1ca2eb4)
raw | patch | inline | side by side (parent: 1ca2eb4)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Wed, 8 Mar 2017 18:16:33 +0000 (21:16 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Wed, 8 Mar 2017 18:16:33 +0000 (21:16 +0300) |
BUGS | patch | blob | history | |
res/terrain/sky.png | patch | blob | history | |
src/CAVE.mpsrc | patch | blob | history |
index e563f53a686d4cfe7f425cf778ce393c3f1cf515..932bedc3c350f403be0a1d2da9112db1c9a8b065 100644 (file)
--- a/BUGS
+++ b/BUGS
Мобы не дохнут от солнечного света
Убогая текстура дождя
Медленное обновление падающих блоков
-Какая-то фигня со светом на старте игры
++ Какая-то фигня со светом на старте игры
+ У кого-то почему-то не масштабируется экран
От падения с высоты нет урона
Под водой скорость разлома блоков не уменьшается
diff --git a/res/terrain/sky.png b/res/terrain/sky.png
index 885e4e2b99ef1dd2eb7fd60dafaa8fcc52574c81..9b2cc13d6dc57036ed704b78ac1da9f5d9ef0f2c 100644 (file)
Binary files a/res/terrain/sky.png and b/res/terrain/sky.png differ
Binary files a/res/terrain/sky.png and b/res/terrain/sky.png differ
diff --git a/src/CAVE.mpsrc b/src/CAVE.mpsrc
index 6de766ba1a2b5bb5536d231afc86dd059fc144ec..cbaf09682a729eb203c74bd271a0cbd0e84010f9 100644 (file)
--- a/src/CAVE.mpsrc
+++ b/src/CAVE.mpsrc
{===================[draw_blocks]===================}\r
for ix:=minx to maxx do\r
for iy:=miny to maxy do\r
- begin\r
- if getBlockFore(getmap(ix,iy))=true then\r
- draw_block(ix,iy);\r
+ begin\r
+ if getBlockFore(getmap(ix, iy)) then\r
+ draw_block(ix, iy);\r
\r
- setcolor(0,0,0);\r
- if (light_type=1) then begin if getmaplight(ix,iy)=0 then fillrect((ix*16)-camx,(iy*16)-camy,16,16); end;\r
- else\r
- if light_type=2 then begin if getmaplight(ix,iy)<15 then begin if (ix*16-camx<getWidth) and (ix*16-camx>0-16) and (iy*16-camy<getHeight) and (iy*16-camy>0-16) then drawimage(light[getmaplight(ix,iy)],(ix*16)-camx,(iy*16)-camy); end; end;\r
- end;\r
- if (toolus>0) and (toolind<10) and (getmap(curx,cury)>0) then begin if toolind>9 then toolind:=9; drawimage(tue[toolind],curx*16-camx,cury*16-camy); end;\r
+ setcolor(0, 0, 0);\r
+ if light_type = 1 then\r
+ begin\r
+ if getmaplight(ix,iy) = 0 then\r
+ fillrect((ix * 16) - camx, (iy * 16) - camy, 16, 16);\r
+ end;\r
+ else if light_type = 2 then\r
+ begin \r
+ if getmaplight(ix, iy) < 15 then\r
+ drawimage(light[getmaplight(ix, iy)], (ix * 16) - camx, (iy * 16) - camy);\r
+ end;\r
+ end;\r
+\r
+ // debug\r
+ // drawimage(light[getmaplight(player.getX div 16, player.getY div 16)], 0, 0);\r
+\r
+ if (toolus > 0) and (toolind < 10) and (getmap(curx,cury) > 0) then\r
+ begin\r
+ if toolind > 9 then\r
+ toolind:=9;\r
+ drawimage(tue[toolind], curx * 16 - camx, cury * 16 - camy);\r
+ end;\r
{===================[gui]===================}\r
if drawgui then\r
begin\r
drop.reflux;\r
player.getDrop;\r
\r
- game_time:=game_time+(600000 div (fps_t*1000));\r
+// game_time:=game_time+(600000 div (fps_t*1000));\r
+\r
+// Ускорение игрового времени в 10 раз\r
+ game_time := game_time + (600000 div (fps_t*100));\r
\r
if (game_time>600000) or (game_time<0) then\r
begin\r
load_moon('/'+sd+'/cavecraft/texturepacks/'+tex_pack+'/',moon_phase);\r
end;\r
\r
- tim:=10000*getimagewidth(sky)/600000*game_time/10000;\r
- global_light:=effects.get(sky,tim,1,1) {and $F};\r
+ tim := 10000 * getimagewidth(sky) / 600000 * game_time / 10000;\r
+ global_light := effects.get(sky, tim, 1, 1) div 16;\r
\r
if clock_stage<>game_time div 75000 then begin clock_stage:=clock_stage+1; if clock_stage>7 then clock_stage:=0; end;\r
\r
menu;\r
end;\r
\r
+procedure draw_debug;\r
+ var\r
+ i : Integer;\r
+ begin\r
+ //drawfonttext('X:'+(x div 16-128),0,0);\r
+ //drawfonttext('Y:'+integertostring(127-(y div 16)),0,8);\r
+ drawfonttext('CURX:'+(curx-128),0,16);\r
+ drawfonttext('CURY:'+cury,0,24);\r
+ drawfonttext('UPDX:'+updx,0,32);\r
+ drawfonttext('UPDY:'+updy,0,40);\r
+ drawfonttext('FPS:'+fps,0,56);\r
+ drawfonttext('Free RAM:'+free_ram/1024+' KB',0,64);\r
+ drawfonttext('Total RAM:'+memory.get_totalmemory div 1024+' KB',0,72);\r
+ drawfonttext('SEED:'+seed,0,88);\r
+ drawfonttext('Game time:'+game_time,0,96);\r
+ drawfonttext('Global light:' + global_light, 0, 104);\r
+\r
+ for i := 0 to 15 do\r
+ drawImage(light[i], getWidth - 16, 16 * i);\r
+ end;\r
+\r
begin\r
qt_start;\r
hung_time:=getrelativetimems;\r
draw;\r
drawfonttext(version,getWidth-(length(version)*8),getHeight-8);\r
if getrelativetimems-msg_time[4]>500 then begin free_ram:=memory.get_freememory; if free_ram<0 then free_ram:=-free_ram; msg_time[4]:=getrelativetimems; end;\r
- if deb=true then\r
- begin\r
- //drawfonttext('X:'+(x div 16-128),0,0);\r
- //drawfonttext('Y:'+integertostring(127-(y div 16)),0,8);\r
- drawfonttext('CURX:'+(curx-128),0,16);\r
- drawfonttext('CURY:'+cury,0,24);\r
- drawfonttext('UPDX:'+updx,0,32);\r
- drawfonttext('UPDY:'+updy,0,40);\r
- drawfonttext('FPS:'+fps,0,56);\r
- drawfonttext('Free RAM:'+free_ram/1024+' KB',0,64);\r
- drawfonttext('Total RAM:'+memory.get_totalmemory div 1024+' KB',0,72);\r
- drawfonttext('SEED:'+seed,0,88);\r
- drawfonttext('Game time:'+game_time,0,96);\r
- end;\r
+ if deb = true then\r
+ draw_debug;\r
\r
drawVideo;\r
maxfps;\r