Home » Archimedes archive » Archimedes World » AW-1994-02-Disc1.adf » Disk1Feb94 » !AWFeb94/Goodies/Basic/House/Housey2

!AWFeb94/Goodies/Basic/House/Housey2

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 » Archimedes World » AW-1994-02-Disc1.adf » Disk1Feb94
Filename: !AWFeb94/Goodies/Basic/House/Housey2
Read OK:
File size: 051F bytes
Load address: 0000
Exec address: 0000
File contents
    1MODE MODE
    2LIBRARY "PathLib:OS_units.Paths"
    3LIBRARY "PathLib:OS_units.Transforms"
    4PROCCreate_House
    5PROCCreateTransform
    6PROCDrawObjects
    7END
    8
    9DEF PROCCreateTransform
   10 PROCPath_CreateTransform(translate%)
   11 PROCPath_Translation(translate%,20,20)
   12ENDPROC
   13
   14DEF PROCDrawObjects
   15 REPEAT
   16  SYS "Draw_Stroke",house%
   17  PROCPath_Transform(house%,translate%)
   18  PRINT TAB(0,0);"Press space bar"
   19  x$=GET$
   20 UNTIL FALSE
   21ENDPROC
   22
   23DEF PROCCreate_House
   24PROCPath_ObjectBegin(house%,200)
   25 x%=0 : y%=0 : w%=400 : h%=300
   26 PROCPath_Rectangle(x%+w%DIV2,y%+h%DIV2,w%,h%)            : REM body of house
   27 PROCPath_Rectangle(x%+w%DIV2,y%+h%DIV6,w%DIV8,h%DIV3)    : REM door
   28 PROCPath_Rectangle(x%+w%DIV4,y%+2*h%DIV3,w%DIV8,h%DIV4)  : REM window
   29  PROCPath_Move(x%+3*w%DIV16,y%+2*h%DIV3)
   30  PROCPath_Draw(x%+5*w%DIV16,y%+2*h%DIV3)
   31  PROCPath_Move(x%+w%DIV4,y%+2*h%DIV3-h%DIV8)
   32  PROCPath_Draw(x%+w%DIV4,y%+2*h%DIV3+h%DIV8)
   33 PROCPath_Rectangle(x%+3*w%DIV4,y%+2*h%DIV3,w%DIV8,h%DIV4): REM window
   34  PROCPath_Move(x%+11*w%DIV16,y%+2*h%DIV3)
   35  PROCPath_Draw(x%+13*w%DIV16,y%+2*h%DIV3)
   36  PROCPath_Move(x%+3*w%DIV4,y%+2*h%DIV3-h%DIV8)
   37  PROCPath_Draw(x%+3*w%DIV4,y%+2*h%DIV3+h%DIV8)
   38 PROCPath_Move(x%,y%+h%)                                  : REM Roof
   39  PROCPath_Draw(x%+w%DIV8,y%+h%+h%DIV4)
   40  PROCPath_Draw(x%+7*w%DIV8,y%+h%+h%DIV4)
   41  PROCPath_Draw(x%+w%,y%+h%)
   42 PROCPath_Rectangle(x%+w%DIV4+w%DIV32,y%+5*h%DIV4+h%DIV16,w%DIV16,h%DIV8)
   43PROCPath_ObjectEnd
   44ENDPROC
� �
ț "PathLib:OS_units.Paths"
$ț "PathLib:OS_units.Transforms"
�Create_House
�CreateTransform
�DrawObjects
�

	� �CreateTransform

& �Path_CreateTransform(translate%)
( �Path_Translation(translate%,20,20)
�


� �DrawObjects
 �
  ș "Draw_Stroke",house%
(  �Path_Transform(house%,translate%)
  � �0,0);"Press space bar"

  x$=�
 � �
�

� �Create_House
!�Path_ObjectBegin(house%,200)
" x%=0 : y%=0 : w%=400 : h%=300
H �Path_Rectangle(x%+w%�2,y%+h%�2,w%,h%)            : � body of house
; �Path_Rectangle(x%+w%�2,y%+h%�6,w%�8,h%�3)    : � door
= �Path_Rectangle(x%+w%�4,y%+2*h%�3,w%�8,h%�4)  : � window
&  �Path_Move(x%+3*w%�16,y%+2*h%�3)
&  �Path_Draw(x%+5*w%�16,y%+2*h%�3)
(  �Path_Move(x%+w%�4,y%+2*h%�3-h%�8)
 (  �Path_Draw(x%+w%�4,y%+2*h%�3+h%�8)
!= �Path_Rectangle(x%+3*w%�4,y%+2*h%�3,w%�8,h%�4): � window
"'  �Path_Move(x%+11*w%�16,y%+2*h%�3)
#'  �Path_Draw(x%+13*w%�16,y%+2*h%�3)
$*  �Path_Move(x%+3*w%�4,y%+2*h%�3-h%�8)
%*  �Path_Draw(x%+3*w%�4,y%+2*h%�3+h%�8)
&C �Path_Move(x%,y%+h%)                                  : � Roof
'$  �Path_Draw(x%+w%�8,y%+h%+h%�4)
(&  �Path_Draw(x%+7*w%�8,y%+h%+h%�4)
)  �Path_Draw(x%+w%,y%+h%)
*> �Path_Rectangle(x%+w%�4+w%�32,y%+5*h%�4+h%�16,w%�16,h%�8)
+�Path_ObjectEnd
,�
�
00000000  0d 00 01 07 eb 20 eb 0d  00 02 1f c8 9b 20 22 50  |..... ....... "P|
00000010  61 74 68 4c 69 62 3a 4f  53 5f 75 6e 69 74 73 2e  |athLib:OS_units.|
00000020  50 61 74 68 73 22 0d 00  03 24 c8 9b 20 22 50 61  |Paths"...$.. "Pa|
00000030  74 68 4c 69 62 3a 4f 53  5f 75 6e 69 74 73 2e 54  |thLib:OS_units.T|
00000040  72 61 6e 73 66 6f 72 6d  73 22 0d 00 04 11 f2 43  |ransforms".....C|
00000050  72 65 61 74 65 5f 48 6f  75 73 65 0d 00 05 14 f2  |reate_House.....|
00000060  43 72 65 61 74 65 54 72  61 6e 73 66 6f 72 6d 0d  |CreateTransform.|
00000070  00 06 10 f2 44 72 61 77  4f 62 6a 65 63 74 73 0d  |....DrawObjects.|
00000080  00 07 05 e0 0d 00 08 04  0d 00 09 16 dd 20 f2 43  |............. .C|
00000090  72 65 61 74 65 54 72 61  6e 73 66 6f 72 6d 0d 00  |reateTransform..|
000000a0  0a 26 20 f2 50 61 74 68  5f 43 72 65 61 74 65 54  |.& .Path_CreateT|
000000b0  72 61 6e 73 66 6f 72 6d  28 74 72 61 6e 73 6c 61  |ransform(transla|
000000c0  74 65 25 29 0d 00 0b 28  20 f2 50 61 74 68 5f 54  |te%)...( .Path_T|
000000d0  72 61 6e 73 6c 61 74 69  6f 6e 28 74 72 61 6e 73  |ranslation(trans|
000000e0  6c 61 74 65 25 2c 32 30  2c 32 30 29 0d 00 0c 05  |late%,20,20)....|
000000f0  e1 0d 00 0d 04 0d 00 0e  12 dd 20 f2 44 72 61 77  |.......... .Draw|
00000100  4f 62 6a 65 63 74 73 0d  00 0f 06 20 f5 0d 00 10  |Objects.... ....|
00000110  1d 20 20 c8 99 20 22 44  72 61 77 5f 53 74 72 6f  |.  .. "Draw_Stro|
00000120  6b 65 22 2c 68 6f 75 73  65 25 0d 00 11 28 20 20  |ke",house%...(  |
00000130  f2 50 61 74 68 5f 54 72  61 6e 73 66 6f 72 6d 28  |.Path_Transform(|
00000140  68 6f 75 73 65 25 2c 74  72 61 6e 73 6c 61 74 65  |house%,translate|
00000150  25 29 0d 00 12 1f 20 20  f1 20 8a 30 2c 30 29 3b  |%)....  . .0,0);|
00000160  22 50 72 65 73 73 20 73  70 61 63 65 20 62 61 72  |"Press space bar|
00000170  22 0d 00 13 0a 20 20 78  24 3d be 0d 00 14 08 20  |"....  x$=..... |
00000180  fd 20 a3 0d 00 15 05 e1  0d 00 16 04 0d 00 17 13  |. ..............|
00000190  dd 20 f2 43 72 65 61 74  65 5f 48 6f 75 73 65 0d  |. .Create_House.|
000001a0  00 18 21 f2 50 61 74 68  5f 4f 62 6a 65 63 74 42  |..!.Path_ObjectB|
000001b0  65 67 69 6e 28 68 6f 75  73 65 25 2c 32 30 30 29  |egin(house%,200)|
000001c0  0d 00 19 22 20 78 25 3d  30 20 3a 20 79 25 3d 30  |..." x%=0 : y%=0|
000001d0  20 3a 20 77 25 3d 34 30  30 20 3a 20 68 25 3d 33  | : w%=400 : h%=3|
000001e0  30 30 0d 00 1a 48 20 f2  50 61 74 68 5f 52 65 63  |00...H .Path_Rec|
000001f0  74 61 6e 67 6c 65 28 78  25 2b 77 25 81 32 2c 79  |tangle(x%+w%.2,y|
00000200  25 2b 68 25 81 32 2c 77  25 2c 68 25 29 20 20 20  |%+h%.2,w%,h%)   |
00000210  20 20 20 20 20 20 20 20  20 3a 20 f4 20 62 6f 64  |         : . bod|
00000220  79 20 6f 66 20 68 6f 75  73 65 0d 00 1b 3b 20 f2  |y of house...; .|
00000230  50 61 74 68 5f 52 65 63  74 61 6e 67 6c 65 28 78  |Path_Rectangle(x|
00000240  25 2b 77 25 81 32 2c 79  25 2b 68 25 81 36 2c 77  |%+w%.2,y%+h%.6,w|
00000250  25 81 38 2c 68 25 81 33  29 20 20 20 20 3a 20 f4  |%.8,h%.3)    : .|
00000260  20 64 6f 6f 72 0d 00 1c  3d 20 f2 50 61 74 68 5f  | door...= .Path_|
00000270  52 65 63 74 61 6e 67 6c  65 28 78 25 2b 77 25 81  |Rectangle(x%+w%.|
00000280  34 2c 79 25 2b 32 2a 68  25 81 33 2c 77 25 81 38  |4,y%+2*h%.3,w%.8|
00000290  2c 68 25 81 34 29 20 20  3a 20 f4 20 77 69 6e 64  |,h%.4)  : . wind|
000002a0  6f 77 0d 00 1d 26 20 20  f2 50 61 74 68 5f 4d 6f  |ow...&  .Path_Mo|
000002b0  76 65 28 78 25 2b 33 2a  77 25 81 31 36 2c 79 25  |ve(x%+3*w%.16,y%|
000002c0  2b 32 2a 68 25 81 33 29  0d 00 1e 26 20 20 f2 50  |+2*h%.3)...&  .P|
000002d0  61 74 68 5f 44 72 61 77  28 78 25 2b 35 2a 77 25  |ath_Draw(x%+5*w%|
000002e0  81 31 36 2c 79 25 2b 32  2a 68 25 81 33 29 0d 00  |.16,y%+2*h%.3)..|
000002f0  1f 28 20 20 f2 50 61 74  68 5f 4d 6f 76 65 28 78  |.(  .Path_Move(x|
00000300  25 2b 77 25 81 34 2c 79  25 2b 32 2a 68 25 81 33  |%+w%.4,y%+2*h%.3|
00000310  2d 68 25 81 38 29 0d 00  20 28 20 20 f2 50 61 74  |-h%.8).. (  .Pat|
00000320  68 5f 44 72 61 77 28 78  25 2b 77 25 81 34 2c 79  |h_Draw(x%+w%.4,y|
00000330  25 2b 32 2a 68 25 81 33  2b 68 25 81 38 29 0d 00  |%+2*h%.3+h%.8)..|
00000340  21 3d 20 f2 50 61 74 68  5f 52 65 63 74 61 6e 67  |!= .Path_Rectang|
00000350  6c 65 28 78 25 2b 33 2a  77 25 81 34 2c 79 25 2b  |le(x%+3*w%.4,y%+|
00000360  32 2a 68 25 81 33 2c 77  25 81 38 2c 68 25 81 34  |2*h%.3,w%.8,h%.4|
00000370  29 3a 20 f4 20 77 69 6e  64 6f 77 0d 00 22 27 20  |): . window.."' |
00000380  20 f2 50 61 74 68 5f 4d  6f 76 65 28 78 25 2b 31  | .Path_Move(x%+1|
00000390  31 2a 77 25 81 31 36 2c  79 25 2b 32 2a 68 25 81  |1*w%.16,y%+2*h%.|
000003a0  33 29 0d 00 23 27 20 20  f2 50 61 74 68 5f 44 72  |3)..#'  .Path_Dr|
000003b0  61 77 28 78 25 2b 31 33  2a 77 25 81 31 36 2c 79  |aw(x%+13*w%.16,y|
000003c0  25 2b 32 2a 68 25 81 33  29 0d 00 24 2a 20 20 f2  |%+2*h%.3)..$*  .|
000003d0  50 61 74 68 5f 4d 6f 76  65 28 78 25 2b 33 2a 77  |Path_Move(x%+3*w|
000003e0  25 81 34 2c 79 25 2b 32  2a 68 25 81 33 2d 68 25  |%.4,y%+2*h%.3-h%|
000003f0  81 38 29 0d 00 25 2a 20  20 f2 50 61 74 68 5f 44  |.8)..%*  .Path_D|
00000400  72 61 77 28 78 25 2b 33  2a 77 25 81 34 2c 79 25  |raw(x%+3*w%.4,y%|
00000410  2b 32 2a 68 25 81 33 2b  68 25 81 38 29 0d 00 26  |+2*h%.3+h%.8)..&|
00000420  43 20 f2 50 61 74 68 5f  4d 6f 76 65 28 78 25 2c  |C .Path_Move(x%,|
00000430  79 25 2b 68 25 29 20 20  20 20 20 20 20 20 20 20  |y%+h%)          |
00000440  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000450  20 20 20 20 20 20 20 20  3a 20 f4 20 52 6f 6f 66  |        : . Roof|
00000460  0d 00 27 24 20 20 f2 50  61 74 68 5f 44 72 61 77  |..'$  .Path_Draw|
00000470  28 78 25 2b 77 25 81 38  2c 79 25 2b 68 25 2b 68  |(x%+w%.8,y%+h%+h|
00000480  25 81 34 29 0d 00 28 26  20 20 f2 50 61 74 68 5f  |%.4)..(&  .Path_|
00000490  44 72 61 77 28 78 25 2b  37 2a 77 25 81 38 2c 79  |Draw(x%+7*w%.8,y|
000004a0  25 2b 68 25 2b 68 25 81  34 29 0d 00 29 1d 20 20  |%+h%+h%.4)..).  |
000004b0  f2 50 61 74 68 5f 44 72  61 77 28 78 25 2b 77 25  |.Path_Draw(x%+w%|
000004c0  2c 79 25 2b 68 25 29 0d  00 2a 3e 20 f2 50 61 74  |,y%+h%)..*> .Pat|
000004d0  68 5f 52 65 63 74 61 6e  67 6c 65 28 78 25 2b 77  |h_Rectangle(x%+w|
000004e0  25 81 34 2b 77 25 81 33  32 2c 79 25 2b 35 2a 68  |%.4+w%.32,y%+5*h|
000004f0  25 81 34 2b 68 25 81 31  36 2c 77 25 81 31 36 2c  |%.4+h%.16,w%.16,|
00000500  68 25 81 38 29 0d 00 2b  13 f2 50 61 74 68 5f 4f  |h%.8)..+..Path_O|
00000510  62 6a 65 63 74 45 6e 64  0d 00 2c 05 e1 0d ff     |bjectEnd..,....|
0000051f