?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1. *** mkspr.dpr   2021-02-18 13:06:23.493605603 +0300
  2. --- convega.pas 2021-02-18 13:12:42.694028570 +0300
  3. ***************
  4. *** 1,9 ****
  5. ! program mkspr;
  6. !
  7. ! {$APPTYPE CONSOLE}
  8.  
  9.   uses
  10. !   SysUtils, Graphics;
  11.  
  12.   const
  13.    bmphgt=4096;
  14. --- 1,7 ----
  15. ! program convega;
  16.  
  17.   uses
  18. !   SysUtils;
  19.  
  20.   const
  21.    bmphgt=4096;
  22. *************** const
  23. *** 13,22 ****
  24.     maxwid=1024;
  25.  
  26.   var
  27. !  xbase,ybase,sprnr,curaddr,spraddr,sprpg,filenr:integer;
  28. !  bshift,bhgt:longword;
  29.    bmp:array[0..bmphgt-1,0..255] of byte;
  30. -  tspraddr:array[0..255,0..2] of byte;
  31.    foutbuf:array[0..16384] of byte;
  32.    foutbufpos:integer;
  33.    filename:string;
  34. --- 11,18 ----
  35.     maxwid=1024;
  36.  
  37.   var
  38. !  xbase,ybase,curaddr:integer;
  39.    bmp:array[0..bmphgt-1,0..255] of byte;
  40.    foutbuf:array[0..16384] of byte;
  41.    foutbufpos:integer;
  42.    filename:string;
  43. *************** var
  44. *** 24,33 ****
  45.     pic: array [0..(maxhgt-1),0..(maxwid-1)] of byte; //ърЁЄшэър [Y,X]
  46.     pal: array [0..255] of byte;
  47.     zeros: array [0..255] of byte;
  48. -   img1,imgresult: TBitMap;
  49. -   bmtex, bmbg: TBitMap;
  50.     fin,fout: file of byte;
  51. -   frame:integer;
  52.    pg,pgplane,i,j,picdisp,paldisp,addr,hgt,wid,x,y:integer;
  53.    b,br,bg,bb:byte;
  54.    plane:integer;
  55. --- 20,26 ----
  56. *************** end;
  57. *** 42,53 ****
  58.  
  59.   procedure foutflush;
  60.   begin
  61. -       //sprites are listed as 0..254(255=exit) and accessed via table as 1..255
  62. -       //(inc e:ret z:ld a,(de)...)
  63. -       //thus, sprnr+1
  64. -   tspraddr[sprnr+1,0]:=spraddr and $ff;
  65. -   tspraddr[sprnr+1,1]:=(spraddr and $ff00)shr 8;
  66. -   tspraddr[sprnr+1,2]:=sprpg; //pg
  67.     BlockWrite(fout,foutbuf,foutbufpos);
  68.     foutbufpos:=0;
  69.   end;
  70. --- 35,40 ----
  71. *************** procedure mksprite(xbase,ybase,sprwid,sp
  72. *** 85,91 ****
  73.   var
  74.    x,y:integer;
  75.    mask,pixel:byte;
  76. !  curscraddr,oldscraddr,scraddrdelta,oldde:integer;
  77.  
  78.     function colisempty(col1,col2:byte):boolean;
  79.     begin
  80. --- 72,78 ----
  81.   var
  82.    x,y:integer;
  83.    mask,pixel:byte;
  84. !  curscraddr,oldscraddr,scraddrdelta,oldde:LongInt;
  85.  
  86.     function colisempty(col1,col2:byte):boolean;
  87.     begin
  88. *************** begin
  89. *** 177,183 ****
  90.       end; //x in layer
  91.       x:=x-sprwid-2;
  92.     end; //layers
  93. !   wrbyte($fd); //$fd
  94.     wrbyte(233); //jp (iy)
  95.   end;
  96.  
  97. --- 164,170 ----
  98.       end; //x in layer
  99.       x:=x-sprwid-2;
  100.     end; //layers
  101. !   wrbyte($fd); //0xfd
  102.     wrbyte(233); //jp (iy)
  103.   end;
  104.  
  105. *************** begin
  106. *** 185,208 ****
  107.     if paramcount<1
  108.     then filename:='pic.bmp'
  109.     else filename:=ParamStr(1);
  110. !   AssignFile(fin,filename); //256c 256x256
  111.     Reset(fin);
  112.     if(filesize(fin)=0)then Halt(1);
  113.     writeln('input file=',filename);
  114.  
  115. -   img1:=TBitMap.Create;
  116. -   img1.Height:=448;
  117. -   img1.Width:=320;
  118. -   img1.PixelFormat:=pf24bit;
  119. -   //bmtex:=TBitMap.Create;
  120. - //  bmtex.Height:=256;
  121. - //  bmtex.Width:=256;
  122. -   //bmtex.LoadFromFile(fn);
  123. - //  bmtex.PixelFormat:=pf24bit;
  124. -   //Image2.Picture.Assign(bmtex);
  125. -
  126.     BlockRead(fin,dump,FileSize(fin));
  127. !   CloseFile(fin);
  128.  
  129.     for i:=0 to 255 do zeros[i]:=0;
  130.  
  131. --- 172,184 ----
  132.     if paramcount<1
  133.     then filename:='pic.bmp'
  134.     else filename:=ParamStr(1);
  135. !   Assign(fin,filename); //256c 256x256
  136.     Reset(fin);
  137.     if(filesize(fin)=0)then Halt(1);
  138.     writeln('input file=',filename);
  139.  
  140.     BlockRead(fin,dump,FileSize(fin));
  141. !   Close(fin);
  142.  
  143.     for i:=0 to 255 do zeros[i]:=0;
  144.  
  145. *************** begin
  146. *** 242,248 ****
  147.     end;
  148.  
  149.     for pg:=0 to 1 do begin
  150. !   AssignFile(fout,IntToStr(pg)+filename+'x');
  151.     Rewrite(fout);
  152.     for pgplane:=0 to 1 do begin
  153.     plane:=pgplane*2+pg;
  154. --- 218,224 ----
  155.     end;
  156.  
  157.     for pg:=0 to 1 do begin
  158. !   Assign(fout,IntToStr(pg)+filename+'x');
  159.     Rewrite(fout);
  160.     for pgplane:=0 to 1 do begin
  161.     plane:=pgplane*2+pg;
  162. *************** begin
  163. *** 260,266 ****
  164.     end //if 0
  165.     else BlockWrite(fout,zeros,192-16);
  166.     end; //pgplane
  167. !   CloseFile(fout);
  168.     end; //pg
  169.  
  170.   end.
  171. --- 236,242 ----
  172.     end //if 0
  173.     else BlockWrite(fout,zeros,192-16);
  174.     end; //pgplane
  175. !   Close(fout);
  176.     end; //pg
  177.  
  178.   end.
  179.