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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue