summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0f57c7b)
raw | patch | inline | side by side (parent: 0f57c7b)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sat, 11 Mar 2017 15:45:33 +0000 (18:45 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sat, 11 Mar 2017 15:45:33 +0000 (18:45 +0300) |
BUGS | patch | blob | history | |
res/autoexec.cfg | patch | blob | history | |
src/CAVE.mpsrc | patch | blob | history | |
src/console.pas | patch | blob | history | |
src/func.mpsrc | patch | blob | history |
index ca7100b88244eb735982ddc446565ce598c97ce6..29fcd090109ea73aa04ff8e29665ef511e084a98 100644 (file)
--- a/BUGS
+++ b/BUGS
+ От больших грибов больно уж чорные тени. У тыкв тоже надо поправить.
После удаления всех сохранений кнопки остаются на вид активными
Даже в четвёртой альфе грибы генерировались в пещерах! Нужно вернуть!
-Текстурпаки вроде как не работают
++ Текстурпаки вроде как не работают
diff --git a/res/autoexec.cfg b/res/autoexec.cfg
index b639c324b84524208475dc10caee7de3e1bfdb25..ba654bc46c99ded5845727ef3126b8782ef4825b 100644 (file)
--- a/res/autoexec.cfg
+++ b/res/autoexec.cfg
+;ЛОл\r
+\r
+\r
;Standard execute file for CaveCraft\r
SET_RESOLUTION 176 208 TRUE\r
BL_UPD 2\r
MAX_PARTICLES 255\r
EXEC AUTO keyboard.cfg\r
EXEC AUTO vkeyboard.cfg\r
-EXEC AUTO textures.cfg\r
EXEC AUTO items.cfg\r
EXEC AUTO blocks.cfg\r
EXEC AUTO crafts.cfg\r
diff --git a/src/CAVE.mpsrc b/src/CAVE.mpsrc
index e23b86557999db0064020d785f14b54745bd2a30..af345fdff2db525c4e5ca5a5aa1f44efbd8c4ba7 100644 (file)
--- a/src/CAVE.mpsrc
+++ b/src/CAVE.mpsrc
moon_phase:integer;\r
toolus,toolind:integer;\r
osadki_ani:integer;\r
- sd,sav_fl:string;\r
+ sav_fl:string;\r
global_light:integer;\r
world_typ:integer;\r
float:image;\r
delay(del);\r
end;\r
\r
-procedure cleartextures;\r
- var\r
- no:image;\r
- ix,iy,iz:integer;\r
- begin\r
- bg[0]:=no;\r
- bg[1]:=no;\r
- float:=no;\r
- compas:=no;\r
- for ix:=0 to 7 do clock[ix]:=no;\r
-\r
- {for ix:=0 to maxBlockTex do\r
- begin\r
- tex[ix]:=no;\r
- tex8[ix]:=no;\r
- end;\r
- for ix:=0 to maxItemTex do\r
- begin\r
- item[ix]:=no;\r
- item8[ix]:=no;\r
- end;}\r
- for ix:=0 to 8 do back[ix]:=no;\r
-\r
- player.freeSkin;\r
-\r
- for ix:=0 to 34 do\r
- gui[ix]:=no;\r
-\r
- for ix:=0 to 9 do tue[ix]:=no;\r
-\r
- for ix:=0 to 7 do osad[0,ix]:=no;\r
- for ix:=0 to 7 do osad[1,ix]:=no;\r
+procedure ClearTextures;\r
+ var\r
+ no : image;\r
+ ix, iy, iz : integer;\r
+ begin\r
+ bg[0] := no;\r
+ bg[1] := no;\r
+ float := no;\r
+ compas := no;\r
+ for ix := 0 to 7 do\r
+ clock[ix] := no;\r
+\r
+ for ix := 0 to maxBlockTex do\r
+ begin\r
+ tex[ix] := no;\r
+ tex8[ix] := no;\r
+ end;\r
+ for ix := 0 to maxItemTex do\r
+ begin\r
+ item[ix] := no;\r
+ item8[ix] := no;\r
+ end;\r
\r
- for ix:=0 to 15 do light[ix]:=no;\r
+ for ix := 0 to 8 do\r
+ back[ix]:=no;\r
\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
- bubble:=no;\r
+ player.freeSkin;\r
\r
- for ix:=0 to 15 do\r
- pr_boom[ix]:=no;\r
+ for ix := 0 to 34 do\r
+ gui[ix] := no;\r
+ for ix := 0 to 9 do\r
+ tue[ix] := no;\r
+ for ix := 0 to 7 do\r
+ osad[0, ix] := no;\r
+ for ix := 0 to 7 do\r
+ osad[1, ix] := no;\r
\r
- mob.freeSkin;\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
- sky:=no;\r
+ bubble := no;\r
+ for ix := 0 to 15 do\r
+ pr_boom[ix] := no;\r
\r
- sun:=no;\r
- moon:=no;\r
+ mob.freeSkin;\r
\r
- sign_im:=no;\r
+ sky := no;\r
+ sun := no;\r
+ moon := no;\r
+ sign_im := no;\r
\r
- for ix:=0 to CONST_MAX_CURS do\r
- LoadCurImg(no, ix);\r
+ for ix := 0 to CONST_MAX_CURS do\r
+ LoadCurImg(no, ix);\r
\r
- //resetVirtualKeyboard(-1);\r
- end;\r
+ //resetVirtualKeyboard(-1);\r
+ end;\r
\r
procedure create_msg(s:string);\r
var\r
for ix:=0 to 8 do back[ix]:=rotate_image_from_image(im,ix*16,0,16,16,0);\r
end;\r
\r
+ console.exec('textures.cfg', 'AUTO');\r
+\r
player.loadSkin('char_ani.png', path);\r
mob.loadSkin(path);\r
\r
rs:=openRecordStore('SD');\r
sd:=readRecordStoreEntry(rs,1);\r
closeRecordStore(rs);\r
- console.exec('autoexec.cfg', 'AUTO', true);\r
+ console.exec('autoexec.cfg', 'AUTO');\r
if sd='' then\r
begin\r
init_touch;\r
if m_cur=0 then begin\r
if cur_name>0 then\r
begin\r
+ debug("Select TexturePack @ /" + sd + "/cavecraft/texturepacks/" + names[cur_name]);\r
tex_pack:=names[cur_name];\r
LoadDrawFont('/'+sd+'/cavecraft/texturepacks/'+tex_pack+'/');\r
loadtexture('/'+sd+'/cavecraft/texturepacks/'+tex_pack+'/');\r
rs:=openRecordStore('TX');\r
t:=addRecordStoreEntry(rs,tex_pack);\r
closeRecordStore(rs);\r
+\r
+ LoadDrawFont('/'+sd+'/cavecraft/texturepacks/'+tex_pack+'/');\r
+ loadtexture('/'+sd+'/cavecraft/texturepacks/'+tex_pack+'/');\r
end;\r
else\r
begin\r
+ debug("Cancel Select TecturePack");\r
tex_pack:='';\r
loadtexture('/');\r
deleteRecordStore('TX');\r
diff --git a/src/console.pas b/src/console.pas
index 49b9435b2a561e9b72e8bfd2a6b3fe1eb16d77bd..d239081938d95dfe1b38c054877edd2d8ca483f9 100644 (file)
--- a/src/console.pas
+++ b/src/console.pas
\r
sd:string;\r
\r
+ EOFstr, ENDstr:boolean;\r
//max_particles:integer; - module\r
\r
procedure save_settings;\r
procedure load_settings;\r
procedure call_console;\r
- procedure exec(s, search:string; acces:boolean);\r
+ procedure exec(s, search:string);\r
procedure addToLog(str:string);\r
\r
implementation\r
lastCommand:string;\r
\r
parseStr:string;\r
- EOFstr, ENDstr:boolean;\r
\r
stack: array [0..0] of integer;\r
stack_pointer:integer;\r
\r
- autoexec_acces:boolean;\r
regimg:image;\r
\r
procedure resetStack(size:integer);\r
\r
com:=UpCase(nextWord);\r
\r
- if (cheats) or (autoexec_acces) or (gamemode=1) then\r
+ if (cheats) or (gamemode=1) then\r
begin\r
if com='TIME' then\r
game_time:=decodeInt(nextWord);\r
if com='EXEC' then\r
begin\r
tmp:=nextWord;\r
- exec(nextWord, tmp, autoexec_acces);\r
+ exec(nextWord, tmp);\r
end;\r
else\r
if com='RESET_ITEMS' then\r
end;\r
else\r
if com='LOAD_TEX' then\r
- regimg:=ld_tex(nextWord, '/'+sd+'/cavecraft/', '');\r
+ begin\r
+ regimg:=ld_tex(nextWord, '/'+sd+'/cavecraft/texturepacks/'+tex_pack+'/', '');\r
+ end;\r
else\r
if com='RESET_TEX' then\r
resetTmpImg;\r
forever;\r
end;\r
\r
-procedure exec(s, search:string; acces:boolean);\r
+procedure exec(s, search:string);\r
var\r
res:resource;\r
str:string;\r
- tmp_acces, tmpEOF:boolean;\r
+ tmpEOF : Boolean;\r
begin\r
- tmp_acces:=autoexec_acces;\r
- autoexec_acces:=acces;\r
-\r
search:=UpCase(search);\r
\r
if search='LOCAL' then\r
else\r
begin\r
addToLog('Unknown load type "'+search+'", file "'+s+'" not executed!');\r
- autoexec_acces:=tmp_acces;\r
exit;\r
end;\r
\r
else\r
addToLog('Execute file "'+s+'" not found!');\r
\r
+ EOFstr := false;\r
+ ENDstr := false;\r
CloseResource(res);\r
- autoexec_acces:=tmp_acces;\r
end;\r
\r
initialization\r
diff --git a/src/func.mpsrc b/src/func.mpsrc
index a80e3eca0bcb3966906e285a8b71fe66dea9fe68..5089d0cc60be5a4b483fb3aba90da7b744cd566f 100644 (file)
--- a/src/func.mpsrc
+++ b/src/func.mpsrc
implementation\r
uses canvas,imgcolor,jsr75i, vars, safeload, items,maps, items_store;\r
\r
- //Загрузка изображения из текстурпака, ели такого нет, то происходит загрузка из архива игры\r
-function ld_tex(name,path,folder:string):image;\r
- begin\r
- if tex_pack<>'' then\r
- begin\r
- if file_exists(path+folder+name)=1 then\r
- begin\r
- ld_tex:=safely_load_image_fs(path+folder+name);\r
- end; else ld_tex:=loadimage('/'+folder+name);\r
- end;\r
- if tex_pack='' then ld_tex:=loadimage('/'+folder+name);\r
- end;\r
+//Загрузка текстуры с автоматическим выбором источника\r
+function ld_tex(name, path, folder : String) : Image;\r
+ var\r
+ n, p : String;\r
+ begin\r
+ n := folder + name;\r
+\r
+ //Debug("ld_tex (tex_pack:" + tex_pack + ") : " + path + n);\r
+\r
+ if file_exists(path + n) = 1 then\r
+ ld_tex := safely_load_image_fs(path + n);\r
+ else\r
+ ld_tex := loadimage('/' + n);\r
+ end;\r
\r
function readint:integer;\r
var\r