X-Git-Url: https://deadsoftware.ru/gitweb?p=cavecraft.git;a=blobdiff_plain;f=src%2FCAVE.mpsrc;h=af345fdff2db525c4e5ca5a5aa1f44efbd8c4ba7;hp=cbaf09682a729eb203c74bd271a0cbd0e84010f9;hb=e1395893ec7223a8a86c66cdc49e4a9fb48b15c2;hpb=813fcf6956eb4e583f687aa77eba1ef4a9b4a1f1 diff --git a/src/CAVE.mpsrc b/src/CAVE.mpsrc index cbaf096..af345fd 100644 --- a/src/CAVE.mpsrc +++ b/src/CAVE.mpsrc @@ -32,8 +32,7 @@ uses video; const - version = 'BETA 9'; - version_map = 9; + version_map = 9; var keymode,updx,updy:integer; @@ -54,7 +53,7 @@ var moon_phase:integer; toolus,toolind:integer; osadki_ani:integer; - sd,sav_fl:string; + sav_fl:string; global_light:integer; world_typ:integer; float:image; @@ -108,68 +107,70 @@ procedure maxfps; delay(del); end; -procedure cleartextures; - var - no:image; - ix,iy,iz:integer; - begin - bg[0]:=no; - bg[1]:=no; - float:=no; - compas:=no; - for ix:=0 to 7 do clock[ix]:=no; - - {for ix:=0 to maxBlockTex do - begin - tex[ix]:=no; - tex8[ix]:=no; - end; - for ix:=0 to maxItemTex do - begin - item[ix]:=no; - item8[ix]:=no; - end;} - for ix:=0 to 8 do back[ix]:=no; - - player.freeSkin; - - for ix:=0 to 34 do - gui[ix]:=no; - - for ix:=0 to 9 do tue[ix]:=no; - - for ix:=0 to 7 do osad[0,ix]:=no; - for ix:=0 to 7 do osad[1,ix]:=no; +procedure ClearTextures; + var + no : image; + ix, iy, iz : integer; + begin + bg[0] := no; + bg[1] := no; + float := no; + compas := no; + for ix := 0 to 7 do + clock[ix] := no; + + for ix := 0 to maxBlockTex do + begin + tex[ix] := no; + tex8[ix] := no; + end; + for ix := 0 to maxItemTex do + begin + item[ix] := no; + item8[ix] := no; + end; - for ix:=0 to 15 do light[ix]:=no; + for ix := 0 to 8 do + back[ix]:=no; - for ix:=0 to 7 do - begin - pr_1[ix]:=no; - pr_2[ix]:=no; - pr_3[ix]:=no; - pr_4[ix]:=no; - pr_5[ix]:=no; - end; - bubble:=no; + player.freeSkin; - for ix:=0 to 15 do - pr_boom[ix]:=no; + for ix := 0 to 34 do + gui[ix] := no; + for ix := 0 to 9 do + tue[ix] := no; + for ix := 0 to 7 do + osad[0, ix] := no; + for ix := 0 to 7 do + osad[1, ix] := no; - mob.freeSkin; + for ix := 0 to 15 do + light[ix] := no; + for ix := 0 to 7 do + begin + pr_1[ix] := no; + pr_2[ix] := no; + pr_3[ix] := no; + pr_4[ix] := no; + pr_5[ix] := no; + end; - sky:=no; + bubble := no; + for ix := 0 to 15 do + pr_boom[ix] := no; - sun:=no; - moon:=no; + mob.freeSkin; - sign_im:=no; + sky := no; + sun := no; + moon := no; + sign_im := no; - for ix:=0 to CONST_MAX_CURS do - LoadCurImg(no, ix); + for ix := 0 to CONST_MAX_CURS do + LoadCurImg(no, ix); - //resetVirtualKeyboard(-1); - end; + //resetVirtualKeyboard(-1); + end; procedure create_msg(s:string); var @@ -205,6 +206,8 @@ procedure loadtexture(path:string); for ix:=0 to 8 do back[ix]:=rotate_image_from_image(im,ix*16,0,16,16,0); end; + console.exec('textures.cfg', 'AUTO'); + player.loadSkin('char_ani.png', path); mob.loadSkin(path); @@ -1039,7 +1042,7 @@ procedure start_uu; rs:=openRecordStore('SD'); sd:=readRecordStoreEntry(rs,1); closeRecordStore(rs); - console.exec('autoexec.cfg', 'AUTO', true); + console.exec('autoexec.cfg', 'AUTO'); if sd='' then begin init_touch; @@ -1395,6 +1398,7 @@ procedure menu_tex; if m_cur=0 then begin if cur_name>0 then begin + debug("Select TexturePack @ /" + sd + "/cavecraft/texturepacks/" + names[cur_name]); tex_pack:=names[cur_name]; LoadDrawFont('/'+sd+'/cavecraft/texturepacks/'+tex_pack+'/'); loadtexture('/'+sd+'/cavecraft/texturepacks/'+tex_pack+'/'); @@ -1402,9 +1406,13 @@ procedure menu_tex; rs:=openRecordStore('TX'); t:=addRecordStoreEntry(rs,tex_pack); closeRecordStore(rs); + + LoadDrawFont('/'+sd+'/cavecraft/texturepacks/'+tex_pack+'/'); + loadtexture('/'+sd+'/cavecraft/texturepacks/'+tex_pack+'/'); end; else begin + debug("Cancel Select TecturePack"); tex_pack:=''; loadtexture('/'); deleteRecordStore('TX'); @@ -2889,10 +2897,10 @@ procedure game; drop.reflux; player.getDrop; -// game_time:=game_time+(600000 div (fps_t*1000)); + game_time:=game_time+(600000 div (fps_t*1000)); // Ускорение игрового времени в 10 раз - game_time := game_time + (600000 div (fps_t*100)); +// game_time := game_time + (600000 div (fps_t*100)); if (game_time>600000) or (game_time<0) then begin