diff --git a/src/CAVE.mpsrc b/src/CAVE.mpsrc
index af345fdff2db525c4e5ca5a5aa1f44efbd8c4ba7..e753f5e71239f39e1baff400fe65366ce5efbf94 100644 (file)
--- a/src/CAVE.mpsrc
+++ b/src/CAVE.mpsrc
drop,\r
invui,\r
vars,\r
drop,\r
invui,\r
vars,\r
- particles_store,\r
randoms,\r
memory,\r
worldgen,\r
canvas,\r
randoms,\r
memory,\r
worldgen,\r
canvas,\r
- items,\r
safeload,\r
safeload,\r
- mob,\r
+ mobs,\r
console,\r
effects,\r
particles,\r
console,\r
effects,\r
particles,\r
chest,\r
inv,\r
items_store,\r
chest,\r
inv,\r
items_store,\r
- video;\r
+ video,\r
+ Blocks,\r
+ BlocksLogic,\r
+ Items,\r
+ ItemsLogic,\r
+ Tools;\r
\r
const\r
version_map = 9;\r
\r
const\r
version_map = 9;\r
float := no;\r
compas := no;\r
for ix := 0 to 7 do\r
float := no;\r
compas := no;\r
for ix := 0 to 7 do\r
- clock[ix] := no;\r
+ Vars.clock[ix] := no;\r
\r
for ix := 0 to maxBlockTex do\r
begin\r
\r
for ix := 0 to maxBlockTex do\r
begin\r
\r
for ix := 0 to 15 do\r
light[ix] := no;\r
\r
for ix := 0 to 15 do\r
light[ix] := no;\r
- for ix := 0 to 7 do\r
- begin\r
- pr_1[ix] := no;\r
- pr_2[ix] := no;\r
- pr_3[ix] := no;\r
- pr_4[ix] := no;\r
- pr_5[ix] := no;\r
- end;\r
\r
\r
- bubble := no;\r
- for ix := 0 to 15 do\r
- pr_boom[ix] := no;\r
-\r
- mob.freeSkin;\r
+ Particles.FreeTextures;\r
+ Mobs.FreeTextures;\r
\r
sky := no;\r
sun := no;\r
\r
sky := no;\r
sun := no;\r
compas:=ld_tex('compass.png',path,'gui/');\r
im:=ld_tex('clock.png',path,'gui/');\r
for ix:=0 to 7 do \r
compas:=ld_tex('compass.png',path,'gui/');\r
im:=ld_tex('clock.png',path,'gui/');\r
for ix:=0 to 7 do \r
- clock[ix]:=rotate_image_from_image(im,ix*16,0,16,16,0);\r
+ Vars.clock[ix]:=rotate_image_from_image(im,ix*16,0,16,16,0);\r
if load_back_tex then\r
begin\r
im:=ld_tex('back.png',path,'');\r
if load_back_tex then\r
begin\r
im:=ld_tex('back.png',path,'');\r
\r
console.exec('textures.cfg', 'AUTO');\r
\r
\r
console.exec('textures.cfg', 'AUTO');\r
\r
- player.loadSkin('char_ani.png', path);\r
- mob.loadSkin(path);\r
+ Player.LoadSkin('char_ani.png', path);\r
+ Mobs.LoadTextures(path);\r
\r
im:=ld_tex('gui.png',path,'gui/');\r
gui[0]:=rotate_image_from_image(im,0,0,16,16,0);\r
\r
im:=ld_tex('gui.png',path,'gui/');\r
gui[0]:=rotate_image_from_image(im,0,0,16,16,0);\r
for ix:=0 to 15 do light[ix]:=rotate_image_from_image(im,16*ix,0,16,16,0);\r
end;\r
\r
for ix:=0 to 15 do light[ix]:=rotate_image_from_image(im,16*ix,0,16,16,0);\r
end;\r
\r
- if load_particles_tex then\r
- begin\r
- im:=ld_tex('particles.png',path,'terrain/');\r
- for ix:=0 to 7 do\r
- begin\r
- pr_1[ix]:=rotate_image_from_image(im,8*ix,0,8,8,0);\r
- pr_2[ix]:=rotate_image_from_image(im,8*ix,8,8,8,0);\r
- pr_3[ix]:=rotate_image_from_image(im,8*ix,16,8,8,0);\r
- pr_4[ix]:=rotate_image_from_image(im,8*ix,24,8,8,0);\r
- pr_5[ix]:=rotate_image_from_image(im,8*ix,32,8,8,0);\r
- end;\r
- bubble:=rotate_image_from_image(im,0,40,8,8,0);\r
- im:=ld_tex('explosion.png',path,'terrain/');\r
- for ix:=0 to 15 do\r
- pr_boom[ix]:=rotate_image_from_image(im,32*ix,0,32,32,0);\r
- end;\r
+ Particles.LoadTextures(path);\r
\r
im:=ld_tex('partition.png',path,'gui/');\r
gui[18]:=rotate_image_from_image(im,0,0,84,42,0);\r
\r
im:=ld_tex('partition.png',path,'gui/');\r
gui[18]:=rotate_image_from_image(im,0,0,84,42,0);\r
\r
//anim_del2:=0;\r
\r
\r
//anim_del2:=0;\r
\r
- inv.resetData;\r
-\r
- chest.resetData;\r
-\r
- furnace.resetData;\r
-\r
- drop.resetData;\r
-\r
- mob.resetData;\r
-\r
- //gb_up_pa:=0;\r
- reset_particles(max_particles+1);\r
+ Inv.ResetData;\r
+ Chest.ResetData;\r
+ Furnace.ResetData;\r
+ Drop.ResetData;\r
+ Mobs.ResetData;\r
+ Particles.ResetData;\r
\r
for ix:=0 to 255 do\r
begin\r
\r
for ix:=0 to 255 do\r
begin\r
write_byte(getBackMap(ix));\r
write_byte(getBiomMap(ix));\r
end;\r
write_byte(getBackMap(ix));\r
write_byte(getBiomMap(ix));\r
end;\r
- drw_load_line('Chests',55);\r
- //Chests\r
- chest.saveData;\r
- drw_load_line('Furnaces',60);\r
- //Furnaces\r
- furnace.saveData;\r
- drw_load_line('Mobs',70);\r
- //Mobs\r
- mob.saveData;\r
- drw_load_line('Drop',80);\r
- //Drop\r
- drop.saveData;\r
- drw_load_line('Particles',85);\r
- //Particles\r
- writeint(max_particles);\r
- write_byte(gb_up_pa);\r
- for ix:=0 to max_particles do\r
- begin\r
- write_byte(get_particle_type(ix));\r
- write_byte(get_particle_ani(ix));\r
- writeint(get_particle_x(ix));\r
- writeint(get_particle_y(ix));\r
- end;\r
- drw_load_line('Other',90);\r
- //Other\r
+\r
+ drw_load_line('Chests', 55);\r
+ Chest.SaveData;\r
+ drw_load_line('Furnaces', 60);\r
+ Furnace.SaveData;\r
+ drw_load_line('Mobs', 70);\r
+ Mobs.SaveData;\r
+ drw_load_line('Drop', 80);\r
+ Drop.SaveData;\r
+ drw_load_line('Particles', 85);\r
+ Particles.SaveData;\r
+\r
+ drw_load_line('Other', 90);\r
write_byte(updx);\r
write_byte(updy);\r
writebool(osadki);\r
write_byte(updx);\r
write_byte(updy);\r
writebool(osadki);\r
setBackMap(read_byte, ix);\r
setBiomMap(read_byte, ix);\r
end;\r
setBackMap(read_byte, ix);\r
setBiomMap(read_byte, ix);\r
end;\r
- drw_load_line('Chests',55);\r
- //Chests\r
- chest.loadData;\r
- drw_load_line('Furnaces',60);\r
- //Furnaces\r
- furnace.loadData;\r
- //Mobs\r
- mob.loadData;\r
- drw_load_line('Drop',80);\r
- //Drop\r
- drop.loadData;\r
- drw_load_line('Particles',85);\r
- //Particles\r
- max_particles:=readint;\r
- reset_particles(max_particles+1);\r
- gb_up_pa:=read_byte;\r
- for ix:=0 to max_particles do\r
- begin\r
- set_particle_type(ix,read_byte);\r
- set_particle_ani(ix,read_byte);\r
- set_particle_x(ix,readint);\r
- set_particle_y(ix,readint);\r
- end;\r
- drw_load_line('Other',90);\r
- //Other\r
+ drw_load_line('Chests', 55);\r
+ Chest.LoadData;\r
+ drw_load_line('Furnaces', 60);\r
+ Furnace.LoadData;\r
+ Mobs.LoadData;\r
+ drw_load_line('Drop', 80);\r
+ Drop.LoadData;\r
+ drw_load_line('Particles', 85);\r
+ Particles.LoadData;\r
+\r
+ drw_load_line('Other',90);\r
updx:=read_byte;\r
updy:=read_byte;\r
osadki:=readbool;\r
updx:=read_byte;\r
updy:=read_byte;\r
osadki:=readbool;\r
end; else\r
if m_cur=-1 then\r
begin\r
end; else\r
if m_cur=-1 then\r
begin\r
- s_particles:=not s_particles;\r
+ Particles.enabled := not Particles.enabled;\r
end; else\r
if m_cur=0 then\r
begin\r
end; else\r
if m_cur=0 then\r
begin\r
\r
drw_btn('Light:'+light_type,-3,m_cur,0,1);\r
drw_btn('Weather:'+ifosad,-2,m_cur,0,1);\r
\r
drw_btn('Light:'+light_type,-3,m_cur,0,1);\r
drw_btn('Weather:'+ifosad,-2,m_cur,0,1);\r
- drw_btn('Particles:'+s_particles,-1,m_cur,0,1);\r
+ drw_btn('Particles:' + Particles.enabled, -1, m_cur, 0, 1);\r
drw_btn('Hide GUI:'+not drawgui,0,m_cur,0,1);\r
drw_btn('Touch:'+(load_key_tex>0),1,m_cur,0,1);\r
drw_btn('JPEG:'+s_jpeg_quality,2,m_cur,0,1);\r
drw_btn('Hide GUI:'+not drawgui,0,m_cur,0,1);\r
drw_btn('Touch:'+(load_key_tex>0),1,m_cur,0,1);\r
drw_btn('JPEG:'+s_jpeg_quality,2,m_cur,0,1);\r
drw_txt('Roman_V - Lib_safeload',cur,18,0);\r
\r
drw_txt('Site: '+#104+#116+#116+#112+#58+#47+#47+#100+#101+#97+#100+#115+#111+#102+#116+#119+#97+#114+#101+#46+#114+#117,cur,21,0);\r
drw_txt('Roman_V - Lib_safeload',cur,18,0);\r
\r
drw_txt('Site: '+#104+#116+#116+#112+#58+#47+#47+#100+#101+#97+#100+#115+#111+#102+#116+#119+#97+#114+#101+#46+#114+#117,cur,21,0);\r
- drw_txt(#68+#101+#97+#68+#83+#111+#102+#116+#87+#97+#114+#101+' 2012-'+getyear(getcurrenttime),cur,22,0);\r
+ drw_txt(#68+#101+#97+#68+#83+#111+#102+#116+#87+#97+#114+#101+' 2012-2014',cur,22,0);\r
\r
drw_txt('Hello! :D',cur,100,1);\r
\r
\r
drw_txt('Hello! :D',cur,100,1);\r
\r
item:=inv.getItem(invcur);\r
sum:=inv.getSum(invcur);\r
block:=getMap(x, y);\r
item:=inv.getItem(invcur);\r
sum:=inv.getSum(invcur);\r
block:=getMap(x, y);\r
- sblock:=getItemInfo(item);\r
+ sblock := Items.GetData(item);\r
\r
\r
- if getItemType(item)=ITEM_TYPE_BLOCK then\r
- if inv.isNull(invcur)=false then\r
- if getBlockSet(block)=true then\r
+ if (Items.GetType(item) = Items.block) and (Inv.IsNull(invcur) = false) then\r
+ if Blocks.IsOverlapped(block) then\r
// if (coll_xy(x, y)=false) or (getBlockColl(item)=0) then\r
begin\r
if set_block_code(sblock, x, y)=false then\r
// if (coll_xy(x, y)=false) or (getBlockColl(item)=0) then\r
begin\r
if set_block_code(sblock, x, y)=false then\r
for ix:=minx to maxx do\r
for iy:=miny to maxy do\r
begin\r
for ix:=minx to maxx do\r
for iy:=miny to maxy do\r
begin\r
- if ifosad then if (getBackMap(ix)>=iy) and (osadki=true) and getBlockTrans(getmap(ix,iy)) then\r
- begin\r
- if getBiomMap(ix)=0 then drawimage(osad[0,osadki_ani],(ix*16)-camx,(iy*16)-camy);\r
- else\r
- if getBiomMap(ix)=2 then drawimage(osad[1,osadki_ani],(ix*16)-camx,(iy*16)-camy);\r
- else\r
- if getBiomMap(ix)=3 then drawimage(osad[0,osadki_ani],(ix*16)-camx,(iy*16)-camy);\r
- end;\r
- if drw_back then\r
- if getBlockTrans(getmap(ix,iy)) then\r
- draw_back(ix,iy);\r
-\r
- if getBlockFore(getmap(ix,iy))=false then\r
- draw_block(ix,iy);\r
+ if ifosad and osadki and (getBackMap(ix) >= iy) and Blocks.IsTransporent(getmap(ix, iy)) then begin\r
+ if getBiomMap(ix) = 0 then drawimage(osad[0, osadki_ani], (ix * 16) - camx, (iy * 16) - camy)\r
+ else if getBiomMap(ix) = 2 then drawimage(osad[1, osadki_ani], (ix * 16) - camx, (iy * 16) - camy)\r
+ else if getBiomMap(ix) = 3 then drawimage(osad[0, osadki_ani], (ix * 16) - camx, (iy * 16) - camy)\r
+ end;\r
+ if drw_back and Blocks.IsTransporent(getmap(ix, iy)) then draw_back(ix, iy);\r
+ if Blocks.IsForeground(getmap(ix,iy)) = false then BlocksLogic.Draw(ix, iy, camx, camy);\r
end;\r
{===================[drop]===================}\r
end;\r
{===================[drop]===================}\r
- drop.draw(camx, camy);\r
+ Drop.Draw(camx, camy);\r
{===================[particles]===================}\r
{===================[particles]===================}\r
- if s_particles then draw_particle;\r
+ Particles.Draw(camx, camy);\r
{===================[player]===================}\r
{===================[player]===================}\r
- if hp>0 then\r
- begin\r
- player.draw(camx, camy);\r
- end;\r
-\r
+ Player.Draw(camx, camy);\r
{===================[mobs]===================}\r
{===================[mobs]===================}\r
- mob.draw(camx, camy);\r
+ Mobs.Draw(camx, camy);\r
{===================[draw_blocks]===================}\r
for ix:=minx to maxx do\r
for iy:=miny to maxy do\r
begin\r
{===================[draw_blocks]===================}\r
for ix:=minx to maxx do\r
for iy:=miny to maxy do\r
begin\r
- if getBlockFore(getmap(ix, iy)) then\r
- draw_block(ix, iy);\r
+ if Blocks.IsForeground(getmap(ix, iy)) then BlocksLogic.Draw(ix, iy, camx, camy);\r
\r
setcolor(0, 0, 0);\r
if light_type = 1 then\r
\r
setcolor(0, 0, 0);\r
if light_type = 1 then\r
drawimage(gui[1],tmp_ax,0);\r
for ix:=0 to 8 do\r
begin\r
drawimage(gui[1],tmp_ax,0);\r
for ix:=0 to 8 do\r
begin\r
- drawItem(inv.getItem(ix), inv.getSum(ix), (ix*16)+tmp_ax+ix*2+4, 1, true);\r
+ ItemsLogic.Draw(inv.getItem(ix), inv.getSum(ix), (ix*16)+tmp_ax+ix*2+4, 1, true);\r
end;\r
drawimage(gui[17],(invslot*16)+tmp_ax+invslot*2+2,0);\r
\r
end;\r
drawimage(gui[17],(invslot*16)+tmp_ax+invslot*2+2,0);\r
\r
toolind:=0;\r
end;\r
\r
toolind:=0;\r
end;\r
\r
-procedure usetools(invcur, x, y:integer);\r
- var\r
- item, sum, block:integer;\r
- begin\r
- block:=getmap(x, y);\r
- item:=inv.getItem(invcur);\r
- sum:=inv.getSum(invcur);\r
-\r
- if gamemode=1 then\r
- destroy_block_cr(block, x, y);\r
- else\r
- if (block>0) then\r
- begin\r
- if (getItemType(item)=ITEM_TYPE_TOOL) and (getBlockTool(block)=getToolType(item)) then\r
- toolus:=toolus+getToolSpeed(item);\r
- else\r
- toolus:=toolus+1;\r
-\r
- if toolus>=getBlockHP(block) then\r
- begin\r
- if ((getItemType(item)=ITEM_TYPE_TOOL) and (getBlockTool(block)=getToolType(item)) and (getToolLvl(item)>=getBlockLvl(block))) or (getBlockLvl(block)<=0) then\r
- begin\r
- setMap(0, x, y);\r
- destroy_block_1(block, x, y);\r
- setMapInfo(0, x, y);\r
- end;\r
- else\r
- begin\r
- setMap(0, x, y);\r
- destroy_block_0(block, x, y);\r
- setMapInfo(0, x, y);\r
- end;\r
-\r
- if getItemType(item)=ITEM_TYPE_TOOL then\r
- begin\r
- inv.setSum(inv.getSum(invcur)-1, invcur);\r
- inv.fixNull(invcur);\r
- end;\r
-\r
- toolus:=0;\r
- toolind:=0;\r
- end;\r
- end;\r
+ procedure usetools(invcur, x, y : integer);\r
+ var\r
+ item, sum, block, tool : integer;\r
+ begin\r
+ block := GetMap(x, y);\r
+ item := Inv.GetItem(invcur);\r
+ sum := Inv.GetSum(invcur);\r
+ tool := Items.GetData(item);\r
+\r
+ if gamemode = 1 then begin\r
+ destroy_block_cr(block, x, y);\r
+ end else if block <> 0 then begin\r
+ if (Items.GetType(item) = Items.tool) and (Blocks.GetTool(block) = Tools.GetType(tool)) then begin\r
+ toolus := toolus + Tools.GetSpeed(tool);\r
+ end else begin\r
+ toolus := toolus + 1;\r
+ end;\r
\r
\r
- if (toolus>0) and (toolus<=getBlockHP(block)) then\r
- toolind:=((toolus*100) div getBlockHP(block)) div 10;\r
- end;\r
+ if toolus >= Blocks.GetResistant(block) then begin\r
+ Debug('usetools: tool = ' + tool);\r
+ if ((Items.GetType(item) = Items.tool) and (Blocks.GetTool(block) = Tools.GetType(tool)) and (Tools.GetLevel(tool) >= Blocks.GetLevel(block))) or (Blocks.GetLevel(block) <= 0) then begin\r
+ SetMap(0, x, y);\r
+ destroy_block_1(block, x, y);\r
+ SetMapInfo(0, x, y);\r
+ end else begin\r
+ SetMap(0, x, y);\r
+ destroy_block_0(block, x, y);\r
+ SetMapInfo(0, x, y);\r
+ end;\r
\r
\r
-function rt_useweap:boolean;\r
- var\r
- x, y, w, h, i, damg:integer;\r
- item:integer;\r
- begin\r
- x:=player.getX;\r
- y:=player.getY;\r
- w:=player.getW;\r
- h:=player.getH;\r
- item:=inv.getItem(invslot);\r
+ if Items.GetType(item) = Items.tool then begin\r
+ Inv.SetSum(Inv.GetSum(invcur) - 1, invcur);\r
+ Inv.FixNull(invcur);\r
+ end;\r
\r
\r
- if getItemType(item)=1 then\r
- damg:=getToolDamg(item);\r
- else\r
- damg:=1;\r
+ toolus:=0;\r
+ toolind:=0;\r
+ end;\r
+ end;\r
\r
\r
- if posi=0 then\r
- i:=mob.findAndHit(damg, x-TILE_SIZE, y, TILE_SIZE+(w/2), h, -2, -3);\r
- else\r
- i:=mob.findAndHit(damg, x+(w/2), y, TILE_SIZE+(w/2), h, 2, -3);\r
+ if (toolus > 0) and (toolus <= Blocks.GetResistant(block)) then begin\r
+ toolind := ((toolus * 100) div Blocks.GetResistant(block)) div 10;\r
+ end;\r
+ end;\r
\r
\r
- if i<>-1 then\r
- begin\r
- inv.setSum(inv.getSum(invslot)-1, invslot);\r
- inv.fixNull(invslot);\r
- rt_useweap:=true;\r
- end;\r
- end;\r
+ function rt_useweap:boolean;\r
+ var\r
+ item : integer;\r
+ x, y, w, h, i, damg : integer;\r
+ begin\r
+ x := Player.GetX;\r
+ y := Player.GetY;\r
+ w := Player.GetW;\r
+ h := Player.GetH;\r
+ item := Inv.GetItem(invslot);\r
+ if Items.GetType(item) = Items.tool then damg := Tools.GetDamage(item) else damg := 1;\r
+\r
+ if posi=0 then i := Mobs.FindAndHit(damg, x - TILE_SIZE, y, TILE_SIZE + (w / 2), h, -2, -3);\r
+ else i := Mobs.FindAndHit(damg, x + (w / 2), y, TILE_SIZE + (w / 2), h, 2, -3);\r
+\r
+ if i >= 0 then begin\r
+ Inv.SetSum(Inv.GetSum(invslot) - 1, invslot);\r
+ Inv.FixNull(invslot);\r
+ rt_useweap := true;\r
+ end;\r
+ end;\r
\r
procedure rt_usetools;\r
var\r
\r
procedure rt_usetools;\r
var\r
var\r
i:integer;\r
begin\r
var\r
i:integer;\r
begin\r
- player.calcPhysics;\r
- mob.updatePhy;\r
- drop.calcPhy;\r
+ Player.CalcPhysics;\r
+ Mobs.UpdatePhy;\r
+ Drop.CalcPhy;\r
end;\r
\r
procedure light_fillrect(l,x,y,r:integer);\r
end;\r
\r
procedure light_fillrect(l,x,y,r:integer);\r
begin\r
setmaplight(ss,ix,iy);\r
if ss=0 then break;\r
begin\r
setmaplight(ss,ix,iy);\r
if ss=0 then break;\r
- ss:=ss-getBlockTr(getmap(ix,iy));\r
+ ss := ss - Blocks.GetLightAbsorbtion(getmap(ix, iy));\r
if ss<0 then ss:=0;\r
end;\r
for iy:=iy+1 to 127 do\r
if ss<0 then ss:=0;\r
end;\r
for iy:=iy+1 to 127 do\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
\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
- if x<0 then x:=0;\r
- if x+8>4094 then x:=4086;\r
- if getBlockColl(getmap(x div 16, y div 16))>0 then hp:=hp-1;\r
+ if x < 0 then x := 0;\r
+ else if x + 8 > 4094 then x := 4086;\r
+ if Blocks.IsSolid(getmap(x div 16, y div 16)) then hp := hp - 1;\r
+\r
if random(4096)=random(4096) then begin osadki:=not osadki; end;\r
osadki_ani:=osadki_ani+1;\r
if osadki_ani>7 then osadki_ani:=0;\r
\r
if random(4096)=random(4096) then begin osadki:=not osadki; end;\r
osadki_ani:=osadki_ani+1;\r
if osadki_ani>7 then osadki_ani:=0;\r
\r
- if random(20)=random(20) then create_particle(6,x,y);\r
+ if Random(20) = Random(20) then Particles.Create(Particles.bubble, x, y);\r
\r
if gamemode=1 then begin hp:=666; hunger:=666; end;\r
\r
\r
if gamemode=1 then begin hp:=666; hunger:=666; end;\r
\r
\r
//if s_spawn_mob then if random(4096)=1547 then megaspawn;\r
\r
\r
//if s_spawn_mob then if random(4096)=1547 then megaspawn;\r
\r
- mob.update;\r
-\r
- if particle_upd then update_particle;\r
+ Mobs.Update;\r
+ Particles.Update;\r
\r
if light_type>0 then\r
begin\r
\r
if light_type>0 then\r
begin\r
for ix:=minx to maxx do\r
for iy:=miny to maxy do\r
begin\r
for ix:=minx to maxx do\r
for iy:=miny to maxy do\r
begin\r
- if light_type=0 then setmaplight(15,ix,iy);\r
- else\r
- if light_type>0 then if getBlockLi(getmap(ix,iy))>0 then calc_light(getBlockLi(getmap(ix,iy)),ix,iy);\r
+ if light_type = 0 then begin\r
+ SetMapLight(15, ix, iy);\r
+ end else if (light_type > 0) and (Blocks.GetLightEmission(getmap(ix, iy)) > 0) then begin\r
+ calc_light(Blocks.GetLightEmission(GetMap(ix, iy)), ix, iy);\r
+ end;\r
end;\r
\r
minx:=(camx/16)-((getwidth/2)/16);\r
end;\r
\r
minx:=(camx/16)-((getwidth/2)/16);\r
hp_time:=getrelativetimems;\r
air_time:=getrelativetimems;\r
portal_time:=getrelativetimems;\r
hp_time:=getrelativetimems;\r
air_time:=getrelativetimems;\r
portal_time:=getrelativetimems;\r
+\r
repeat\r
proc_fps;\r
keyhandler;\r
repeat\r
proc_fps;\r
keyhandler;\r