|
|
| (Nie pokazano 10 wersji utworzonych przez 3 użytkowników) |
| Linia 1: |
Linia 1: |
| Format pliku G2F jest przeznaczony dla programu [[Graph2Font]]. Autor z lenistwa uprościł go maksymalnie, przez co objętość plików G2F jest dosyć spora, średnio 160KB. Duża objętość i podatność na kompresję wynika głównie z tego że jest to zrzut pamięci zarezerwowanej na tablice używane przez G2F, ale jeśli kogoś interesują szczegóły to proszę bardzo:
| | {{disambig}} |
|
| |
|
| <pre>
| | * [[Graph2Font]] |
| procedure TForm1.SaveG2F1Click(Sender: TObject);
| | * [[G2F (format pliku)]] |
| var x,i,err:integer;
| |
| begin
| |
| if (gate>0) and (done>0) then begin
| |
| | |
| zm:=plik('.g2f'); assignfile(dane,zm); rewrite(dane,1);
| |
| | |
| bufor[0]:=Bajt; bufor[1]:=Pixel; bufor[2]:=Zestaw;
| |
| blockwrite(dane,bufor,3);
| |
| | |
| // zapisz screen
| |
| for x:=0 to 29 do
| |
| if mapa[x]=0 then blockwrite(dane,scren[CzarnyPas shr 3+x*48],bajt);
| |
| | |
| fillchar(temp,sizeof(temp),$ff);
| |
| for x:=0 to 29 do
| |
| if mapa[x]=0 then temp[table[x]]:=0;
| |
| | |
| for x:=0 to 15 do
| |
| if temp[x]=0 then blockwrite(dane,fonty[x shl 10],1024);
| |
| | |
| // zapisz table
| |
| blockwrite(dane,table,30);
| |
| | |
| // zapisz colors
| |
| blockwrite(dane,TabKolor,5*$100);
| |
| | |
| // zapisz sprites
| |
| blockwrite(dane,TabKolor[$500],4*$100);
| |
| | |
| blockwrite(dane,Spr0,$200); blockwrite(dane,Mis0,$200);
| |
| blockwrite(dane,Spr1,$200); blockwrite(dane,Mis1,$200);
| |
| blockwrite(dane,Spr2,$200); blockwrite(dane,Mis2,$200);
| |
| blockwrite(dane,Spr3,$200); blockwrite(dane,Mis3,$200);
| |
| | |
| blockwrite(dane,Smask,$800);
| |
| blockwrite(dane,Sprajt,240*290);
| |
| blockwrite(dane,SprajtX,240*290);
| |
| | |
| //znacznik 5-ego sprita i Mode (GED+, DLI)
| |
| fillchar(bufor,256,0);
| |
| bufor[1]:=form1.RadioGroup4.ItemIndex+1;
| |
| blockwrite(dane,bufor,256);
| |
| | |
| blockwrite(dane,raster,240*24);
| |
| | |
| blockwrite(dane,gfxMode,30); //gfxMode
| |
| blockwrite(dane,bufor,240-30);
| |
| | |
| val(form12.Edit1.Text,i,err); bufor[0]:=i+8; blockwrite(dane,bufor,16);
| |
| | |
| closefile(dane); SaveAfterExit:=false;
| |
| | |
| end else PokazHelp;
| |
| end;
| |
| </pre>
| |
| | |
| {{stub}}
| |
| [[Kategoria:Emulacja]]
| |
| [[Kategoria:Formaty plików]]
| |