X-Git-Url: https://deadsoftware.ru/gitweb?p=cavecraft.git;a=blobdiff_plain;f=src%2Ffunc.mpsrc;h=1edb76fff251e27bdccf396df6ba65a86fcdd230;hp=5089d0cc60be5a4b483fb3aba90da7b744cd566f;hb=HEAD;hpb=e1395893ec7223a8a86c66cdc49e4a9fb48b15c2 diff --git a/src/func.mpsrc b/src/func.mpsrc index 5089d0c..1edb76f 100644 --- a/src/func.mpsrc +++ b/src/func.mpsrc @@ -3,9 +3,11 @@ unit func; interface function get_spawn_x:integer;//Возвращает блок по X где должен появиться игрок function get_spawn_y:integer;//Возвращает блок по Y где должен появиться игрок +(* procedure draw_block(xx,yy:integer); procedure drawSmallItem(item, x, y:integer); procedure drawItem(item, sum, x, y:integer; indicator:boolean;); +*) procedure LoadDrawFont(s:string); procedure DrawFontTextSpec(str:string; x, y, color:integer; spec:boolean;); procedure DrawFontText(str:string; x, y:integer); @@ -18,7 +20,7 @@ procedure writestr(s:string); function readstr:string; implementation - uses canvas,imgcolor,jsr75i, vars, safeload, items,maps, items_store; + uses canvas, imgcolor, jsr75i, vars, safeload, Blocks, maps, items_store; //Загрузка текстуры с автоматическим выбором источника function ld_tex(name, path, folder : String) : Image; @@ -102,6 +104,7 @@ function readstr:string; if getmap(get_spawn_x,iy)<>0 then begin get_spawn_y:=(iy-2); break; end; end; +(* procedure drawSmallItem(item, x, y:integer); begin if getItemTexType(item)=0 then @@ -110,7 +113,9 @@ function readstr:string; if getItemTexType(item)=1 then drawimage(item8[getItemTex(item)], x, y); end; +*) +(* procedure draw_block(xx,yy:integer); begin if (getmap(xx,yy)=123) or (getmap(xx,yy)=124) then @@ -122,9 +127,9 @@ function readstr:string; end; else if (getmap(xx,yy)=92) or (getmap(xx,yy)=93) then begin - if (getBlockSet(getmap(xx-1,yy))=false) and (getBlockSet(getmap(xx+1,yy))=true) then setclip((xx*16)-camx,(yy*16)-camy,10,16); else - if (getBlockSet(getmap(xx+1,yy))=false) and (getBlockSet(getmap(xx-1,yy))=true) then setclip((xx*16)-camx+6,(yy*16)-camy,10,16); else - if (getBlockSet(getmap(xx+1,yy))=true) and (getBlockSet(getmap(xx-1,yy))=true) then setclip((xx*16)-camx+6,(yy*16)-camy,4,16); + if (Blocks.IsOverlapped(getmap(xx - 1, yy)) = false) and (Blocks.IsOverlapped(getmap(xx + 1, yy)) = true) then setclip((xx*16)-camx,(yy*16)-camy,10,16); else + if (Blocks.IsOverlapped(getmap(xx + 1, yy)) = false) and (Blocks.IsOverlapped(getmap(xx - 1, yy)) = true) then setclip((xx*16)-camx+6,(yy*16)-camy,10,16); else + if (Blocks.IsOverlapped(getmap(xx + 1, yy)) = true) and (Blocks.IsOverlapped(getmap(xx - 1, yy)) = true) then setclip((xx*16)-camx+6,(yy*16)-camy,4,16); drawimage(tex[getBlockTex(getmap(xx,yy))],(xx*16)-camx,(yy*16)-camy); setclip(0,0,getwidth,getheight); end; else @@ -165,7 +170,9 @@ function readstr:string; if getmap(xx,yy)<>0 then drawimage(tex[getBlockTex(getmap(xx,yy))],(xx*16)-camx,(yy*16)-camy); end; +*) +(* procedure drawItem(item, sum, x, y:integer; indicator:boolean;); var pa_xo,ugol:integer; @@ -213,7 +220,7 @@ function readstr:string; drawfonttext(''+sum, x, y+8); end; end; - +*) //Загрузка шрифта из файла под именем s procedure LoadDrawFont(s:string);