improve Makefile, update example pictures
This commit is contained in:
parent
91306135b2
commit
0ea7dcef29
13 changed files with 89 additions and 50 deletions
|
|
@ -7,4 +7,9 @@ https://commons.wikimedia.org/wiki/File:Ara-Zoo-Muenster-2013.jpg
|
|||
https://commons.wikimedia.org/wiki/File:Snow_leopard_portrait.jpg
|
||||
* shinkansen.pict: 投稿者が撮影, CC BY-SA 3.0 <http://creativecommons.org/licenses/by-sa/3.0/>, via Wikimedia Commons
|
||||
https://commons.wikimedia.org/wiki/File:0key22-86.JPG
|
||||
|
||||
* Toco_Toucan.pict: Bernard DUPONT, CC BY-SA 2.0 <https://creativecommons.org/licenses/by-sa/2.0>, via Wikimedia Commons
|
||||
https://commons.wikimedia.org/wiki/File:Toco_Toucan_(Ramphastos_toco)_-_48153967707.jpg
|
||||
* 1911_Detroit_Electric.pict: Cullen328, CC BY-SA 3.0 <https://creativecommons.org/licenses/by-sa/3.0>, via Wikimedia Commons
|
||||
https://commons.wikimedia.org/wiki/File:1911_Detroit_Electric.jpg
|
||||
* ADDS-Envoy-620.pict: ADDS Envoy-1.jpg from terminals-wiki.org, CC-BY-SA 3.0
|
||||
https://terminals-wiki.org/wiki/index.php/File:ADDS_Envoy-1.jpg
|
||||
|
|
|
|||
BIN
examples/Toco_Toucan.pict
Normal file
BIN
examples/Toco_Toucan.pict
Normal file
Binary file not shown.
|
|
@ -24,6 +24,7 @@ var pic:PictData;
|
|||
infile:file;
|
||||
ch:char;
|
||||
stickMan:Sprite;
|
||||
rocket:Sprite;
|
||||
|
||||
procedure WaitVSync; external;
|
||||
|
||||
|
|
@ -80,6 +81,12 @@ begin
|
|||
aSprite.y := aSprite.y + aSprite.ydelta;
|
||||
|
||||
if aSprite.x > 608 then aSprite.x := 0;
|
||||
|
||||
if aSprite.y < 0 then
|
||||
begin
|
||||
aSprite.y := 200;
|
||||
aSprite.x := 0;
|
||||
end;
|
||||
end;
|
||||
aSprite.frameLeft := frameLeft;
|
||||
end;
|
||||
|
|
@ -87,6 +94,7 @@ end;
|
|||
procedure animLoop;
|
||||
var i:integer;
|
||||
oldX,oldY:integer;
|
||||
roldX,roldY:integer;
|
||||
begin
|
||||
stickMan.x := 0;
|
||||
stickMan.y := 310;
|
||||
|
|
@ -96,26 +104,39 @@ begin
|
|||
stickMan.xdelta := 2;
|
||||
stickMan.ydelta := 0;
|
||||
|
||||
oldX := stickMan.x;
|
||||
oldY := stickMan.y;
|
||||
|
||||
rocket.x := 0;
|
||||
rocket.y := 200;
|
||||
rocket.frameTime := 1;
|
||||
rocket.frameLeft := rocket.frameTime;
|
||||
rocket.curFrame := 0;
|
||||
rocket.xdelta := 2;
|
||||
rocket.ydelta := -1;
|
||||
|
||||
while not ConAvail do
|
||||
begin
|
||||
oldX := stickMan.x;
|
||||
oldY := stickMan.y;
|
||||
|
||||
|
||||
roldX := rocket.x;
|
||||
roldY := rocket.y;
|
||||
|
||||
PutSprite(roldX, roldY, rocket.frame[rocket.curFrame]);
|
||||
PutSprite(oldX, oldY, stickMan.frame[stickMan.curFrame]);
|
||||
|
||||
animateSprite(rocket);
|
||||
animateSprite(stickMan);
|
||||
Delay(10);
|
||||
|
||||
{Delay(1);}
|
||||
WaitVSync;
|
||||
|
||||
UndrawSprite(oldX, oldY, pic.pixeldata);
|
||||
UndrawSprite(roldX, roldY, pic.pixeldata);
|
||||
end;
|
||||
end;
|
||||
|
||||
begin
|
||||
filename := 'grey.pict';
|
||||
filename := 'background.pict';
|
||||
open(infile, filename, ModeReadonly);
|
||||
read(infile, pic);
|
||||
close(infile);
|
||||
|
|
@ -125,12 +146,19 @@ begin
|
|||
loadPalette(pic);
|
||||
showPic(pic);
|
||||
|
||||
open(infile, 'Walking.sprt', ModeReadOnly);
|
||||
open(infile, 'walking.sprt', ModeReadOnly);
|
||||
loadSpriteFrame(stickMan, 0, infile, 0);
|
||||
loadSpriteFrame(stickMan, 1, infile, 1);
|
||||
loadSpriteFrame(stickMan, 2, infile, 2);
|
||||
loadSpriteFrame(stickMan, 3, infile, 3);
|
||||
close(infile);
|
||||
|
||||
open(infile, 'rocket.sprt', ModeReadOnly);
|
||||
loadSpriteFrame(rocket, 0, infile, 0);
|
||||
loadSpriteFrame(rocket, 1, infile, 1);
|
||||
loadSpriteFrame(rocket, 2, infile, 2);
|
||||
loadSpriteFrame(rocket, 3, infile, 3);
|
||||
close(infile);
|
||||
|
||||
animLoop;
|
||||
end.
|
||||
|
|
|
|||
Binary file not shown.
BIN
examples/rocket.sprt
Normal file
BIN
examples/rocket.sprt
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,3 +1,7 @@
|
|||
(* This program does not work anymore, because
|
||||
it uses the old sprite routines with 16x16 sprites.
|
||||
It is only included for historical reasons.
|
||||
*)
|
||||
program XmasAnimation;
|
||||
uses sprites;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,12 +3,17 @@ SASM=./sasm
|
|||
LSYMGEN=./lsymgen
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .pas .o
|
||||
.SUFFIXES: .pas .o .s .prog
|
||||
|
||||
.pas.s:
|
||||
$(PCOMP) $<
|
||||
.s.prog:
|
||||
$(SASM) $<
|
||||
|
||||
.pas:
|
||||
fpc -Mobjfpc -gl $<
|
||||
|
||||
all: pcomp sasm sdis lsymgen shortgen
|
||||
all: pcomp sasm sdis lsymgen shortgen nativeprogs
|
||||
|
||||
libs: pcomp sasm lsymgen shortgen
|
||||
$(SASM) ../lib/coreloader.s
|
||||
|
|
@ -17,33 +22,23 @@ libs: pcomp sasm lsymgen shortgen
|
|||
$(SASM) ../lib/stdlibwrap.s ../lib/stdlib.lib
|
||||
$(LSYMGEN) ../lib/stdlibwrap.sym ../lib/stdlib.lsym
|
||||
|
||||
nativecomp: pcomp sasm libs
|
||||
$(PCOMP) sasm.pas
|
||||
$(PCOMP) pcomp.pas
|
||||
$(PCOMP) lsymgen.pas
|
||||
$(PCOMP) shortgen.pas
|
||||
test: sasm.s pcomp.s lsymgen.s shortgen.s
|
||||
|
||||
nativeprogs: nativecomp
|
||||
$(PCOMP) ../progs/shell.pas
|
||||
$(PCOMP) ../progs/editor.pas
|
||||
$(PCOMP) ../progs/reclaim.pas
|
||||
$(PCOMP) ../progs/dumpdir.pas
|
||||
$(PCOMP) ../progs/partmgr.pas
|
||||
$(PCOMP) ../progs/xfer.pas
|
||||
$(PCOMP) ../progs/recover.pas
|
||||
$(PCOMP) ../progs/changemem.pas
|
||||
testprgs: sasm.prog pcomp.prog lsymgen.prog shortgen.prog
|
||||
|
||||
nativecomp: libs pcomp.prog sasm.prog lsymgen.prog shortgen.prog
|
||||
|
||||
nativeprogs: pcomp ../progs/shell.prog ../progs/editor.prog ../progs/reclaim.prog \
|
||||
../progs/dumpdir.prog ../progs/partmgr.prog ../progs/xfer.prog \
|
||||
../progs/recover.prog ../progs/changemem.prog
|
||||
$(SASM) ../lib/rommon.s
|
||||
$(SASM) -A ../lib/rommon.s ../lib/rom.mem
|
||||
|
||||
examples: nativecomp
|
||||
$(PCOMP) ../tests/readtest.pas
|
||||
$(PCOMP) ../tests/readchartest.pas
|
||||
$(PCOMP) ../tests/timetest.pas
|
||||
$(PCOMP) ../tests/test133.pas
|
||||
examples: nativecomp ../tests/readtest.prog ../tests/readchartest.prog ../tests/timetest.prog \
|
||||
../tests/test133.prog ../tests/cchangetest.prog ../tests/tree.prog
|
||||
-$(PCOMP) ../examples/chase.pas
|
||||
$(PCOMP) ../tests/cchangetest.pas
|
||||
$(PCOMP) ../tests/tree.pas
|
||||
-$(SASM) ../examples/chase.s
|
||||
-$(MAKE) -C ../rogue -f Makefile.tridoracpu
|
||||
|
||||
clean:
|
||||
rm -f pcomp sasm sdis libgen lsymgen *.o *.s
|
||||
rm -f pcomp sasm sdis libgen lsymgen *.o *.s *.prog
|
||||
|
|
|
|||
|
|
@ -351,9 +351,7 @@
|
|||
<Runs Version="1" Minor="22">
|
||||
<Run Id="synth_1" Type="Ft3:Synth" SrcSet="sources_1" Part="xc7a35ticsg324-1L" ConstrsSet="constrs_1" Description="Vivado Synthesis Defaults" AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" State="current" Dir="$PRUNDIR/synth_1" IncludeInArchive="true" IsChild="false" AutoIncrementalDir="$PSRCDIR/utils_1/imports/synth_1" AutoRQSDir="$PSRCDIR/utils_1/imports/synth_1" ParallelReportGen="true">
|
||||
<Strategy Version="1" Minor="2">
|
||||
<StratHandle Name="Vivado Synthesis Defaults" Flow="Vivado Synthesis 2020">
|
||||
<Desc>Vivado Synthesis Defaults</Desc>
|
||||
</StratHandle>
|
||||
<StratHandle Name="Vivado Synthesis Defaults" Flow="Vivado Synthesis 2020"/>
|
||||
<Step Id="synth_design"/>
|
||||
</Strategy>
|
||||
<GeneratedRun Dir="$PRUNDIR" File="gen_run.xml"/>
|
||||
|
|
@ -373,9 +371,7 @@
|
|||
</Run>
|
||||
<Run Id="impl_1" Type="Ft2:EntireDesign" Part="xc7a35ticsg324-1L" ConstrsSet="constrs_1" Description="Best predicted directive for place_design." AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" State="current" Dir="$PRUNDIR/impl_1" SynthRun="synth_1" IncludeInArchive="true" IsChild="false" GenFullBitstream="true" AutoIncrementalDir="$PSRCDIR/utils_1/imports/impl_1" LaunchOptions="-jobs 6 " AutoRQSDir="$PSRCDIR/utils_1/imports/impl_1" ParallelReportGen="true">
|
||||
<Strategy Version="1" Minor="2">
|
||||
<StratHandle Name="Performance_Auto_1" Flow="Vivado Implementation 2024">
|
||||
<Desc>Best predicted directive for place_design.</Desc>
|
||||
</StratHandle>
|
||||
<StratHandle Name="Performance_Auto_1" Flow="Vivado Implementation 2024"/>
|
||||
<Step Id="init_design"/>
|
||||
<Step Id="opt_design">
|
||||
<Option Id="Directive">0</Option>
|
||||
|
|
|
|||
BIN
tridoraemu/ADDS-Envoy-620.pict
Normal file
BIN
tridoraemu/ADDS-Envoy-620.pict
Normal file
Binary file not shown.
|
|
@ -31,15 +31,22 @@ def process_pixdata(outfile, pixdata, frameindex = 0, pix_w=640, pix_h=400):
|
|||
x += 8
|
||||
y += 1
|
||||
|
||||
def write_palette_word(outfile, r, g, b):
|
||||
r4 = r >> 4
|
||||
g4 = g >> 4
|
||||
b4 = b >> 4
|
||||
c12 = r4 << 8 | g4 << 4 | b4
|
||||
|
||||
outfile.write(c12.to_bytes(4, 'big'))
|
||||
|
||||
|
||||
def process_palette(outfile, palette):
|
||||
for r,g,b in palette:
|
||||
r4 = r >> 4
|
||||
g4 = g >> 4
|
||||
b4 = b >> 4
|
||||
c12 = r4 << 8 | g4 << 4 | b4
|
||||
|
||||
outfile.write(c12.to_bytes(4, 'big'))
|
||||
if len(palette[0]) == 4:
|
||||
for r,g,b,a in palette:
|
||||
write_palette_word(outfile, r, g, b)
|
||||
else:
|
||||
for r,g,b in palette:
|
||||
write_palette_word(outfile, r, g, b)
|
||||
|
||||
|
||||
def write_header(outfile):
|
||||
|
|
|
|||
|
|
@ -592,9 +592,6 @@ def create_image_with_stuff(imgfile):
|
|||
|
||||
slotnr = putfile("../examples/rtpair.pas", None , f, part, partstart, slotnr)
|
||||
|
||||
slotnr = putfile("../examples/5cubes.pas", None , f, part, partstart, slotnr)
|
||||
# slotnr = putfile("../examples/5cubes.prog", None , f, part, partstart, slotnr)
|
||||
|
||||
slotnr = putfile("../examples/3dcube.pas", None , f, part, partstart, slotnr)
|
||||
|
||||
slotnr = putfile("../examples/conway.pas", None , f, part, partstart, slotnr)
|
||||
|
|
@ -604,12 +601,19 @@ def create_image_with_stuff(imgfile):
|
|||
slotnr = putfile("../examples/lines.pas", None , f, part, partstart, slotnr)
|
||||
|
||||
slotnr = putfile("../examples/pictviewer.pas", None , f, part, partstart, slotnr)
|
||||
slotnr = putfile("../examples/ara.pict", "ara.pict" , f, part, partstart, slotnr)
|
||||
slotnr = putfile("../examples/shinkansen.pict", "shinkansen.pict" , f, part, partstart, slotnr)
|
||||
slotnr = putfile("../examples/snow_leopard.pict", "snow_leopard.pict" , f, part, partstart, slotnr)
|
||||
slotnr = putfile("../examples/Toco_Toucan.pict", None , f, part, partstart, slotnr)
|
||||
slotnr = putfile("../examples/shinkansen.pict", None , f, part, partstart, slotnr)
|
||||
slotnr = putfile("../examples/snow_leopard.pict", None , f, part, partstart, slotnr)
|
||||
|
||||
slotnr = putfile("../examples/benchmarks.pas", None , f, part, partstart, slotnr)
|
||||
|
||||
slotnr = putfile("../examples/animate.pas", None , f, part, partstart, slotnr)
|
||||
slotnr = putfile("../examples/sprites.inc", None , f, part, partstart, slotnr)
|
||||
slotnr = putfile("../examples/sprites.s", None , f, part, partstart, slotnr)
|
||||
slotnr = putfile("../examples/background.pict", None , f, part, partstart, slotnr)
|
||||
slotnr = putfile("../examples/walking.sprt", None , f, part, partstart, slotnr)
|
||||
slotnr = putfile("../examples/rocket.sprt", None , f, part, partstart, slotnr)
|
||||
|
||||
listdir(f, part)
|
||||
|
||||
part, partstart, slotnr = initfs(f, 5)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue