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

!AWFeb94/Goodies/Basic/House/Housey3

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/Housey3
Read OK:
File size: 055E bytes
Load address: 0000
Exec address: 0000
File contents
    1MODE MODE
    2LIBRARY "PathLib:OS_units.Paths"
    3LIBRARY "PathLib:OS_units.Transforms"
    4ORIGIN 640,512
    5PROCCreate_House
    6PROCCreateTransform
    7PROCDrawObjects
    8END
    9
   10DEF PROCCreateTransform
   11 PROCPath_CreateTransform(rotmagtrans%)
   12 PROCPath_Rotation(rotmagtrans%,PI/16)
   13 PROCPath_Magnify(rotmagtrans%,.95)
   14 PROCPath_Translation(rotmagtrans%,20,20)
   15ENDPROC
   16
   17DEF PROCDrawObjects
   18 REPEAT
   19  SYS "Draw_Stroke",house%
   20  PROCPath_Transform(house%,rotmagtrans%)
   21  x$=GET$
   22 UNTIL FALSE
   23ENDPROC
   24
   25DEF PROCCreate_House
   26PROCPath_ObjectBegin(house%,200)
   27 x%=0 : y%=0 : w%=400 : h%=300
   28 PROCPath_Rectangle(x%+w%DIV2,y%+h%DIV2,w%,h%)            : REM body of house
   29 PROCPath_Rectangle(x%+w%DIV2,y%+h%DIV6,w%DIV8,h%DIV3)    : REM door
   30 PROCPath_Rectangle(x%+w%DIV4,y%+2*h%DIV3,w%DIV8,h%DIV4)  : REM window
   31  PROCPath_Move(x%+3*w%DIV16,y%+2*h%DIV3)
   32  PROCPath_Draw(x%+5*w%DIV16,y%+2*h%DIV3)
   33  PROCPath_Move(x%+w%DIV4,y%+2*h%DIV3-h%DIV8)
   34  PROCPath_Draw(x%+w%DIV4,y%+2*h%DIV3+h%DIV8)
   35 PROCPath_Rectangle(x%+3*w%DIV4,y%+2*h%DIV3,w%DIV8,h%DIV4): REM window
   36  PROCPath_Move(x%+11*w%DIV16,y%+2*h%DIV3)
   37  PROCPath_Draw(x%+13*w%DIV16,y%+2*h%DIV3)
   38  PROCPath_Move(x%+3*w%DIV4,y%+2*h%DIV3-h%DIV8)
   39  PROCPath_Draw(x%+3*w%DIV4,y%+2*h%DIV3+h%DIV8)
   40 PROCPath_Move(x%,y%+h%)                                  : REM Roof
   41  PROCPath_Draw(x%+w%DIV8,y%+h%+h%DIV4)
   42  PROCPath_Draw(x%+7*w%DIV8,y%+h%+h%DIV4)
   43  PROCPath_Draw(x%+w%,y%+h%)
   44 PROCPath_Rectangle(x%+w%DIV4+w%DIV32,y%+5*h%DIV4+h%DIV16,w%DIV16,h%DIV8)
   45PROCPath_ObjectEnd
   46ENDPROC
� �
ț "PathLib:OS_units.Paths"
$ț "PathLib:OS_units.Transforms"
ȑ 640,512
�Create_House
�CreateTransform
�DrawObjects
�
	

� �CreateTransform
( �Path_CreateTransform(rotmagtrans%)
& �Path_Rotation(rotmagtrans%,�/16)

$ �Path_Magnify(rotmagtrans%,.95)
* �Path_Translation(rotmagtrans%,20,20)
�

� �DrawObjects
 �
  ș "Draw_Stroke",house%
*  �Path_Transform(house%,rotmagtrans%)

  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 0e c8 91  |ransforms"......|
00000050  20 36 34 30 2c 35 31 32  0d 00 05 11 f2 43 72 65  | 640,512.....Cre|
00000060  61 74 65 5f 48 6f 75 73  65 0d 00 06 14 f2 43 72  |ate_House.....Cr|
00000070  65 61 74 65 54 72 61 6e  73 66 6f 72 6d 0d 00 07  |eateTransform...|
00000080  10 f2 44 72 61 77 4f 62  6a 65 63 74 73 0d 00 08  |..DrawObjects...|
00000090  05 e0 0d 00 09 04 0d 00  0a 16 dd 20 f2 43 72 65  |........... .Cre|
000000a0  61 74 65 54 72 61 6e 73  66 6f 72 6d 0d 00 0b 28  |ateTransform...(|
000000b0  20 f2 50 61 74 68 5f 43  72 65 61 74 65 54 72 61  | .Path_CreateTra|
000000c0  6e 73 66 6f 72 6d 28 72  6f 74 6d 61 67 74 72 61  |nsform(rotmagtra|
000000d0  6e 73 25 29 0d 00 0c 26  20 f2 50 61 74 68 5f 52  |ns%)...& .Path_R|
000000e0  6f 74 61 74 69 6f 6e 28  72 6f 74 6d 61 67 74 72  |otation(rotmagtr|
000000f0  61 6e 73 25 2c af 2f 31  36 29 0d 00 0d 24 20 f2  |ans%,./16)...$ .|
00000100  50 61 74 68 5f 4d 61 67  6e 69 66 79 28 72 6f 74  |Path_Magnify(rot|
00000110  6d 61 67 74 72 61 6e 73  25 2c 2e 39 35 29 0d 00  |magtrans%,.95)..|
00000120  0e 2a 20 f2 50 61 74 68  5f 54 72 61 6e 73 6c 61  |.* .Path_Transla|
00000130  74 69 6f 6e 28 72 6f 74  6d 61 67 74 72 61 6e 73  |tion(rotmagtrans|
00000140  25 2c 32 30 2c 32 30 29  0d 00 0f 05 e1 0d 00 10  |%,20,20)........|
00000150  04 0d 00 11 12 dd 20 f2  44 72 61 77 4f 62 6a 65  |...... .DrawObje|
00000160  63 74 73 0d 00 12 06 20  f5 0d 00 13 1d 20 20 c8  |cts.... .....  .|
00000170  99 20 22 44 72 61 77 5f  53 74 72 6f 6b 65 22 2c  |. "Draw_Stroke",|
00000180  68 6f 75 73 65 25 0d 00  14 2a 20 20 f2 50 61 74  |house%...*  .Pat|
00000190  68 5f 54 72 61 6e 73 66  6f 72 6d 28 68 6f 75 73  |h_Transform(hous|
000001a0  65 25 2c 72 6f 74 6d 61  67 74 72 61 6e 73 25 29  |e%,rotmagtrans%)|
000001b0  0d 00 15 0a 20 20 78 24  3d be 0d 00 16 08 20 fd  |....  x$=..... .|
000001c0  20 a3 0d 00 17 05 e1 0d  00 18 04 0d 00 19 13 dd  | ...............|
000001d0  20 f2 43 72 65 61 74 65  5f 48 6f 75 73 65 0d 00  | .Create_House..|
000001e0  1a 21 f2 50 61 74 68 5f  4f 62 6a 65 63 74 42 65  |.!.Path_ObjectBe|
000001f0  67 69 6e 28 68 6f 75 73  65 25 2c 32 30 30 29 0d  |gin(house%,200).|
00000200  00 1b 22 20 78 25 3d 30  20 3a 20 79 25 3d 30 20  |.." x%=0 : y%=0 |
00000210  3a 20 77 25 3d 34 30 30  20 3a 20 68 25 3d 33 30  |: w%=400 : h%=30|
00000220  30 0d 00 1c 48 20 f2 50  61 74 68 5f 52 65 63 74  |0...H .Path_Rect|
00000230  61 6e 67 6c 65 28 78 25  2b 77 25 81 32 2c 79 25  |angle(x%+w%.2,y%|
00000240  2b 68 25 81 32 2c 77 25  2c 68 25 29 20 20 20 20  |+h%.2,w%,h%)    |
00000250  20 20 20 20 20 20 20 20  3a 20 f4 20 62 6f 64 79  |        : . body|
00000260  20 6f 66 20 68 6f 75 73  65 0d 00 1d 3b 20 f2 50  | of house...; .P|
00000270  61 74 68 5f 52 65 63 74  61 6e 67 6c 65 28 78 25  |ath_Rectangle(x%|
00000280  2b 77 25 81 32 2c 79 25  2b 68 25 81 36 2c 77 25  |+w%.2,y%+h%.6,w%|
00000290  81 38 2c 68 25 81 33 29  20 20 20 20 3a 20 f4 20  |.8,h%.3)    : . |
000002a0  64 6f 6f 72 0d 00 1e 3d  20 f2 50 61 74 68 5f 52  |door...= .Path_R|
000002b0  65 63 74 61 6e 67 6c 65  28 78 25 2b 77 25 81 34  |ectangle(x%+w%.4|
000002c0  2c 79 25 2b 32 2a 68 25  81 33 2c 77 25 81 38 2c  |,y%+2*h%.3,w%.8,|
000002d0  68 25 81 34 29 20 20 3a  20 f4 20 77 69 6e 64 6f  |h%.4)  : . windo|
000002e0  77 0d 00 1f 26 20 20 f2  50 61 74 68 5f 4d 6f 76  |w...&  .Path_Mov|
000002f0  65 28 78 25 2b 33 2a 77  25 81 31 36 2c 79 25 2b  |e(x%+3*w%.16,y%+|
00000300  32 2a 68 25 81 33 29 0d  00 20 26 20 20 f2 50 61  |2*h%.3).. &  .Pa|
00000310  74 68 5f 44 72 61 77 28  78 25 2b 35 2a 77 25 81  |th_Draw(x%+5*w%.|
00000320  31 36 2c 79 25 2b 32 2a  68 25 81 33 29 0d 00 21  |16,y%+2*h%.3)..!|
00000330  28 20 20 f2 50 61 74 68  5f 4d 6f 76 65 28 78 25  |(  .Path_Move(x%|
00000340  2b 77 25 81 34 2c 79 25  2b 32 2a 68 25 81 33 2d  |+w%.4,y%+2*h%.3-|
00000350  68 25 81 38 29 0d 00 22  28 20 20 f2 50 61 74 68  |h%.8).."(  .Path|
00000360  5f 44 72 61 77 28 78 25  2b 77 25 81 34 2c 79 25  |_Draw(x%+w%.4,y%|
00000370  2b 32 2a 68 25 81 33 2b  68 25 81 38 29 0d 00 23  |+2*h%.3+h%.8)..#|
00000380  3d 20 f2 50 61 74 68 5f  52 65 63 74 61 6e 67 6c  |= .Path_Rectangl|
00000390  65 28 78 25 2b 33 2a 77  25 81 34 2c 79 25 2b 32  |e(x%+3*w%.4,y%+2|
000003a0  2a 68 25 81 33 2c 77 25  81 38 2c 68 25 81 34 29  |*h%.3,w%.8,h%.4)|
000003b0  3a 20 f4 20 77 69 6e 64  6f 77 0d 00 24 27 20 20  |: . window..$'  |
000003c0  f2 50 61 74 68 5f 4d 6f  76 65 28 78 25 2b 31 31  |.Path_Move(x%+11|
000003d0  2a 77 25 81 31 36 2c 79  25 2b 32 2a 68 25 81 33  |*w%.16,y%+2*h%.3|
000003e0  29 0d 00 25 27 20 20 f2  50 61 74 68 5f 44 72 61  |)..%'  .Path_Dra|
000003f0  77 28 78 25 2b 31 33 2a  77 25 81 31 36 2c 79 25  |w(x%+13*w%.16,y%|
00000400  2b 32 2a 68 25 81 33 29  0d 00 26 2a 20 20 f2 50  |+2*h%.3)..&*  .P|
00000410  61 74 68 5f 4d 6f 76 65  28 78 25 2b 33 2a 77 25  |ath_Move(x%+3*w%|
00000420  81 34 2c 79 25 2b 32 2a  68 25 81 33 2d 68 25 81  |.4,y%+2*h%.3-h%.|
00000430  38 29 0d 00 27 2a 20 20  f2 50 61 74 68 5f 44 72  |8)..'*  .Path_Dr|
00000440  61 77 28 78 25 2b 33 2a  77 25 81 34 2c 79 25 2b  |aw(x%+3*w%.4,y%+|
00000450  32 2a 68 25 81 33 2b 68  25 81 38 29 0d 00 28 43  |2*h%.3+h%.8)..(C|
00000460  20 f2 50 61 74 68 5f 4d  6f 76 65 28 78 25 2c 79  | .Path_Move(x%,y|
00000470  25 2b 68 25 29 20 20 20  20 20 20 20 20 20 20 20  |%+h%)           |
00000480  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000490  20 20 20 20 20 20 20 3a  20 f4 20 52 6f 6f 66 0d  |       : . Roof.|
000004a0  00 29 24 20 20 f2 50 61  74 68 5f 44 72 61 77 28  |.)$  .Path_Draw(|
000004b0  78 25 2b 77 25 81 38 2c  79 25 2b 68 25 2b 68 25  |x%+w%.8,y%+h%+h%|
000004c0  81 34 29 0d 00 2a 26 20  20 f2 50 61 74 68 5f 44  |.4)..*&  .Path_D|
000004d0  72 61 77 28 78 25 2b 37  2a 77 25 81 38 2c 79 25  |raw(x%+7*w%.8,y%|
000004e0  2b 68 25 2b 68 25 81 34  29 0d 00 2b 1d 20 20 f2  |+h%+h%.4)..+.  .|
000004f0  50 61 74 68 5f 44 72 61  77 28 78 25 2b 77 25 2c  |Path_Draw(x%+w%,|
00000500  79 25 2b 68 25 29 0d 00  2c 3e 20 f2 50 61 74 68  |y%+h%)..,> .Path|
00000510  5f 52 65 63 74 61 6e 67  6c 65 28 78 25 2b 77 25  |_Rectangle(x%+w%|
00000520  81 34 2b 77 25 81 33 32  2c 79 25 2b 35 2a 68 25  |.4+w%.32,y%+5*h%|
00000530  81 34 2b 68 25 81 31 36  2c 77 25 81 31 36 2c 68  |.4+h%.16,w%.16,h|
00000540  25 81 38 29 0d 00 2d 13  f2 50 61 74 68 5f 4f 62  |%.8)..-..Path_Ob|
00000550  6a 65 63 74 45 6e 64 0d  00 2e 05 e1 0d ff        |jectEnd.......|
0000055e