Home » Archimedes archive » Acorn User » AU 1996-Xmas.adf » Features » Arcade/!Gush/Data/Prototypes

Arcade/!Gush/Data/Prototypes

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Acorn User » AU 1996-Xmas.adf » Features
Filename: Arcade/!Gush/Data/Prototypes
Read OK:
File size: 07E1 bytes
Load address: 0000
Exec address: 0000
File contents
# Example prototypes file, for !Gush demo
#
# This is a 'retrospective' spec document; you won't understand it until
# you've looked at an example of what it describes :-)
#
# A list of variables, of the syntax <variable> = <value>; there must be
# at least one space either side of the = sign.
#
# -- Spaces are significant in the <value> part
# -- Blank lines and those starting with a hash (#) are ignored
# -- Each prototype definition must start with the 'id' and 'frames' variables,
#    then you can have any or none of the others, then a number of 'frame'
#    variables before the next 'id' variable.
#
# Valid variables are:
#
#   id       = <four-character ID> <no. of frames>
#                starts each prototype definition off
#   handler  = <handler> specifies the function name of the object's handler
#                which is expected to be linked with the object file.
#   objflags = <list of flag names>
#                These correspond to the object_flags in the h.Popcorn header
#                file.
#   frame    = <frame name> [S@x,y] [C@x,y]
#                There should be as many 'frame' variables as specified in the
#                'frames' variable above.  S and C correspond to size and
#                centering informaton for each frame; if they are omitted, they
#                are worked out from the sprite files, assuming they are
#                Popcorn sprites.

# Ball objects
#
#   These have only one frame, but have a variety of flags set.  They
#   need 'velocities' and 'gravity' to ensure smooth movement, though
#   try removing 'gravity' from one or both ball definitions for some
#   not-quite-right effects.

id       = GENR 0
handler  = generator_handler
objflags = attn_every

id       = BLUE 1
handler  = ball_handler
objflags = std_plot velocities collide gravity attn_plotout
frame    = <Gush$Dir>.Graphics.Blue

id       = YELO 1
handler  = ball_handler
objflags = std_plot velocities collide gravity attn_plotout
frame    = <Gush$Dir>.Graphics.Yellow
00000000  23 20 45 78 61 6d 70 6c  65 20 70 72 6f 74 6f 74  |# Example protot|
00000010  79 70 65 73 20 66 69 6c  65 2c 20 66 6f 72 20 21  |ypes file, for !|
00000020  47 75 73 68 20 64 65 6d  6f 0a 23 0a 23 20 54 68  |Gush demo.#.# Th|
00000030  69 73 20 69 73 20 61 20  27 72 65 74 72 6f 73 70  |is is a 'retrosp|
00000040  65 63 74 69 76 65 27 20  73 70 65 63 20 64 6f 63  |ective' spec doc|
00000050  75 6d 65 6e 74 3b 20 79  6f 75 20 77 6f 6e 27 74  |ument; you won't|
00000060  20 75 6e 64 65 72 73 74  61 6e 64 20 69 74 20 75  | understand it u|
00000070  6e 74 69 6c 0a 23 20 79  6f 75 27 76 65 20 6c 6f  |ntil.# you've lo|
00000080  6f 6b 65 64 20 61 74 20  61 6e 20 65 78 61 6d 70  |oked at an examp|
00000090  6c 65 20 6f 66 20 77 68  61 74 20 69 74 20 64 65  |le of what it de|
000000a0  73 63 72 69 62 65 73 20  3a 2d 29 0a 23 0a 23 20  |scribes :-).#.# |
000000b0  41 20 6c 69 73 74 20 6f  66 20 76 61 72 69 61 62  |A list of variab|
000000c0  6c 65 73 2c 20 6f 66 20  74 68 65 20 73 79 6e 74  |les, of the synt|
000000d0  61 78 20 3c 76 61 72 69  61 62 6c 65 3e 20 3d 20  |ax <variable> = |
000000e0  3c 76 61 6c 75 65 3e 3b  20 74 68 65 72 65 20 6d  |<value>; there m|
000000f0  75 73 74 20 62 65 0a 23  20 61 74 20 6c 65 61 73  |ust be.# at leas|
00000100  74 20 6f 6e 65 20 73 70  61 63 65 20 65 69 74 68  |t one space eith|
00000110  65 72 20 73 69 64 65 20  6f 66 20 74 68 65 20 3d  |er side of the =|
00000120  20 73 69 67 6e 2e 0a 23  0a 23 20 2d 2d 20 53 70  | sign..#.# -- Sp|
00000130  61 63 65 73 20 61 72 65  20 73 69 67 6e 69 66 69  |aces are signifi|
00000140  63 61 6e 74 20 69 6e 20  74 68 65 20 3c 76 61 6c  |cant in the <val|
00000150  75 65 3e 20 70 61 72 74  0a 23 20 2d 2d 20 42 6c  |ue> part.# -- Bl|
00000160  61 6e 6b 20 6c 69 6e 65  73 20 61 6e 64 20 74 68  |ank lines and th|
00000170  6f 73 65 20 73 74 61 72  74 69 6e 67 20 77 69 74  |ose starting wit|
00000180  68 20 61 20 68 61 73 68  20 28 23 29 20 61 72 65  |h a hash (#) are|
00000190  20 69 67 6e 6f 72 65 64  0a 23 20 2d 2d 20 45 61  | ignored.# -- Ea|
000001a0  63 68 20 70 72 6f 74 6f  74 79 70 65 20 64 65 66  |ch prototype def|
000001b0  69 6e 69 74 69 6f 6e 20  6d 75 73 74 20 73 74 61  |inition must sta|
000001c0  72 74 20 77 69 74 68 20  74 68 65 20 27 69 64 27  |rt with the 'id'|
000001d0  20 61 6e 64 20 27 66 72  61 6d 65 73 27 20 76 61  | and 'frames' va|
000001e0  72 69 61 62 6c 65 73 2c  0a 23 20 20 20 20 74 68  |riables,.#    th|
000001f0  65 6e 20 79 6f 75 20 63  61 6e 20 68 61 76 65 20  |en you can have |
00000200  61 6e 79 20 6f 72 20 6e  6f 6e 65 20 6f 66 20 74  |any or none of t|
00000210  68 65 20 6f 74 68 65 72  73 2c 20 74 68 65 6e 20  |he others, then |
00000220  61 20 6e 75 6d 62 65 72  20 6f 66 20 27 66 72 61  |a number of 'fra|
00000230  6d 65 27 0a 23 20 20 20  20 76 61 72 69 61 62 6c  |me'.#    variabl|
00000240  65 73 20 62 65 66 6f 72  65 20 74 68 65 20 6e 65  |es before the ne|
00000250  78 74 20 27 69 64 27 20  76 61 72 69 61 62 6c 65  |xt 'id' variable|
00000260  2e 0a 23 0a 23 20 56 61  6c 69 64 20 76 61 72 69  |..#.# Valid vari|
00000270  61 62 6c 65 73 20 61 72  65 3a 0a 23 0a 23 20 20  |ables are:.#.#  |
00000280  20 69 64 20 20 20 20 20  20 20 3d 20 3c 66 6f 75  | id       = <fou|
00000290  72 2d 63 68 61 72 61 63  74 65 72 20 49 44 3e 20  |r-character ID> |
000002a0  3c 6e 6f 2e 20 6f 66 20  66 72 61 6d 65 73 3e 0a  |<no. of frames>.|
000002b0  23 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |#               |
000002c0  20 73 74 61 72 74 73 20  65 61 63 68 20 70 72 6f  | starts each pro|
000002d0  74 6f 74 79 70 65 20 64  65 66 69 6e 69 74 69 6f  |totype definitio|
000002e0  6e 20 6f 66 66 0a 23 20  20 20 68 61 6e 64 6c 65  |n off.#   handle|
000002f0  72 20 20 3d 20 3c 68 61  6e 64 6c 65 72 3e 20 73  |r  = <handler> s|
00000300  70 65 63 69 66 69 65 73  20 74 68 65 20 66 75 6e  |pecifies the fun|
00000310  63 74 69 6f 6e 20 6e 61  6d 65 20 6f 66 20 74 68  |ction name of th|
00000320  65 20 6f 62 6a 65 63 74  27 73 20 68 61 6e 64 6c  |e object's handl|
00000330  65 72 0a 23 20 20 20 20  20 20 20 20 20 20 20 20  |er.#            |
00000340  20 20 20 20 77 68 69 63  68 20 69 73 20 65 78 70  |    which is exp|
00000350  65 63 74 65 64 20 74 6f  20 62 65 20 6c 69 6e 6b  |ected to be link|
00000360  65 64 20 77 69 74 68 20  74 68 65 20 6f 62 6a 65  |ed with the obje|
00000370  63 74 20 66 69 6c 65 2e  0a 23 20 20 20 6f 62 6a  |ct file..#   obj|
00000380  66 6c 61 67 73 20 3d 20  3c 6c 69 73 74 20 6f 66  |flags = <list of|
00000390  20 66 6c 61 67 20 6e 61  6d 65 73 3e 0a 23 20 20  | flag names>.#  |
000003a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 54 68  |              Th|
000003b0  65 73 65 20 63 6f 72 72  65 73 70 6f 6e 64 20 74  |ese correspond t|
000003c0  6f 20 74 68 65 20 6f 62  6a 65 63 74 5f 66 6c 61  |o the object_fla|
000003d0  67 73 20 69 6e 20 74 68  65 20 68 2e 50 6f 70 63  |gs in the h.Popc|
000003e0  6f 72 6e 20 68 65 61 64  65 72 0a 23 20 20 20 20  |orn header.#    |
000003f0  20 20 20 20 20 20 20 20  20 20 20 20 66 69 6c 65  |            file|
00000400  2e 0a 23 20 20 20 66 72  61 6d 65 20 20 20 20 3d  |..#   frame    =|
00000410  20 3c 66 72 61 6d 65 20  6e 61 6d 65 3e 20 5b 53  | <frame name> [S|
00000420  40 78 2c 79 5d 20 5b 43  40 78 2c 79 5d 0a 23 20  |@x,y] [C@x,y].# |
00000430  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 54  |               T|
00000440  68 65 72 65 20 73 68 6f  75 6c 64 20 62 65 20 61  |here should be a|
00000450  73 20 6d 61 6e 79 20 27  66 72 61 6d 65 27 20 76  |s many 'frame' v|
00000460  61 72 69 61 62 6c 65 73  20 61 73 20 73 70 65 63  |ariables as spec|
00000470  69 66 69 65 64 20 69 6e  20 74 68 65 0a 23 20 20  |ified in the.#  |
00000480  20 20 20 20 20 20 20 20  20 20 20 20 20 20 27 66  |              'f|
00000490  72 61 6d 65 73 27 20 76  61 72 69 61 62 6c 65 20  |rames' variable |
000004a0  61 62 6f 76 65 2e 20 20  53 20 61 6e 64 20 43 20  |above.  S and C |
000004b0  63 6f 72 72 65 73 70 6f  6e 64 20 74 6f 20 73 69  |correspond to si|
000004c0  7a 65 20 61 6e 64 0a 23  20 20 20 20 20 20 20 20  |ze and.#        |
000004d0  20 20 20 20 20 20 20 20  63 65 6e 74 65 72 69 6e  |        centerin|
000004e0  67 20 69 6e 66 6f 72 6d  61 74 6f 6e 20 66 6f 72  |g informaton for|
000004f0  20 65 61 63 68 20 66 72  61 6d 65 3b 20 69 66 20  | each frame; if |
00000500  74 68 65 79 20 61 72 65  20 6f 6d 69 74 74 65 64  |they are omitted|
00000510  2c 20 74 68 65 79 0a 23  20 20 20 20 20 20 20 20  |, they.#        |
00000520  20 20 20 20 20 20 20 20  61 72 65 20 77 6f 72 6b  |        are work|
00000530  65 64 20 6f 75 74 20 66  72 6f 6d 20 74 68 65 20  |ed out from the |
00000540  73 70 72 69 74 65 20 66  69 6c 65 73 2c 20 61 73  |sprite files, as|
00000550  73 75 6d 69 6e 67 20 74  68 65 79 20 61 72 65 0a  |suming they are.|
00000560  23 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |#               |
00000570  20 50 6f 70 63 6f 72 6e  20 73 70 72 69 74 65 73  | Popcorn sprites|
00000580  2e 0a 0a 23 20 42 61 6c  6c 20 6f 62 6a 65 63 74  |...# Ball object|
00000590  73 0a 23 0a 23 20 20 20  54 68 65 73 65 20 68 61  |s.#.#   These ha|
000005a0  76 65 20 6f 6e 6c 79 20  6f 6e 65 20 66 72 61 6d  |ve only one fram|
000005b0  65 2c 20 62 75 74 20 68  61 76 65 20 61 20 76 61  |e, but have a va|
000005c0  72 69 65 74 79 20 6f 66  20 66 6c 61 67 73 20 73  |riety of flags s|
000005d0  65 74 2e 20 20 54 68 65  79 0a 23 20 20 20 6e 65  |et.  They.#   ne|
000005e0  65 64 20 27 76 65 6c 6f  63 69 74 69 65 73 27 20  |ed 'velocities' |
000005f0  61 6e 64 20 27 67 72 61  76 69 74 79 27 20 74 6f  |and 'gravity' to|
00000600  20 65 6e 73 75 72 65 20  73 6d 6f 6f 74 68 20 6d  | ensure smooth m|
00000610  6f 76 65 6d 65 6e 74 2c  20 74 68 6f 75 67 68 0a  |ovement, though.|
00000620  23 20 20 20 74 72 79 20  72 65 6d 6f 76 69 6e 67  |#   try removing|
00000630  20 27 67 72 61 76 69 74  79 27 20 66 72 6f 6d 20  | 'gravity' from |
00000640  6f 6e 65 20 6f 72 20 62  6f 74 68 20 62 61 6c 6c  |one or both ball|
00000650  20 64 65 66 69 6e 69 74  69 6f 6e 73 20 66 6f 72  | definitions for|
00000660  20 73 6f 6d 65 0a 23 20  20 20 6e 6f 74 2d 71 75  | some.#   not-qu|
00000670  69 74 65 2d 72 69 67 68  74 20 65 66 66 65 63 74  |ite-right effect|
00000680  73 2e 0a 0a 69 64 20 20  20 20 20 20 20 3d 20 47  |s...id       = G|
00000690  45 4e 52 20 30 0a 68 61  6e 64 6c 65 72 20 20 3d  |ENR 0.handler  =|
000006a0  20 67 65 6e 65 72 61 74  6f 72 5f 68 61 6e 64 6c  | generator_handl|
000006b0  65 72 0a 6f 62 6a 66 6c  61 67 73 20 3d 20 61 74  |er.objflags = at|
000006c0  74 6e 5f 65 76 65 72 79  0a 0a 69 64 20 20 20 20  |tn_every..id    |
000006d0  20 20 20 3d 20 42 4c 55  45 20 31 0a 68 61 6e 64  |   = BLUE 1.hand|
000006e0  6c 65 72 20 20 3d 20 62  61 6c 6c 5f 68 61 6e 64  |ler  = ball_hand|
000006f0  6c 65 72 0a 6f 62 6a 66  6c 61 67 73 20 3d 20 73  |ler.objflags = s|
00000700  74 64 5f 70 6c 6f 74 20  76 65 6c 6f 63 69 74 69  |td_plot velociti|
00000710  65 73 20 63 6f 6c 6c 69  64 65 20 67 72 61 76 69  |es collide gravi|
00000720  74 79 20 61 74 74 6e 5f  70 6c 6f 74 6f 75 74 0a  |ty attn_plotout.|
00000730  66 72 61 6d 65 20 20 20  20 3d 20 3c 47 75 73 68  |frame    = <Gush|
00000740  24 44 69 72 3e 2e 47 72  61 70 68 69 63 73 2e 42  |$Dir>.Graphics.B|
00000750  6c 75 65 0a 0a 69 64 20  20 20 20 20 20 20 3d 20  |lue..id       = |
00000760  59 45 4c 4f 20 31 0a 68  61 6e 64 6c 65 72 20 20  |YELO 1.handler  |
00000770  3d 20 62 61 6c 6c 5f 68  61 6e 64 6c 65 72 0a 6f  |= ball_handler.o|
00000780  62 6a 66 6c 61 67 73 20  3d 20 73 74 64 5f 70 6c  |bjflags = std_pl|
00000790  6f 74 20 76 65 6c 6f 63  69 74 69 65 73 20 63 6f  |ot velocities co|
000007a0  6c 6c 69 64 65 20 67 72  61 76 69 74 79 20 61 74  |llide gravity at|
000007b0  74 6e 5f 70 6c 6f 74 6f  75 74 0a 66 72 61 6d 65  |tn_plotout.frame|
000007c0  20 20 20 20 3d 20 3c 47  75 73 68 24 44 69 72 3e  |    = <Gush$Dir>|
000007d0  2e 47 72 61 70 68 69 63  73 2e 59 65 6c 6c 6f 77  |.Graphics.Yellow|
000007e0  0a                                                |.|
000007e1