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

!AWFeb94/Goodies/Basic/House/Housey1

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/Housey1
Read OK:
File size: 0594 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 INPUT '"Number of rotations";n%
   12 PROCPath_CreateTransform(rotate%)
   13 PROCPath_Rotation(rotate%,PI/(2*n%))
   14ENDPROC
   15
   16DEF PROCDrawObjects  
   17 col%=0
   18 REPEAT
   19  FOR i%=1 TO n%
   20   SYS "Draw_Stroke",house%
   21   PROCPath_Transform(house%,rotate%)
   22   PRINT TAB(0,3);"Press space bar"
   23   x$=GET$
   24  NEXT
   25  col%+=1 : GCOL 1+col% MOD 6
   26  UNTIL FALSE      
   27ENDPROC
   28
   29DEF PROCCreate_House
   30PROCPath_ObjectBegin(house%,200)
   31 x%=0 : y%=0 : w%=400 : h%=300
   32 PROCPath_Rectangle(x%+w%DIV2,y%+h%DIV2,w%,h%)            : REM body of house
   33 PROCPath_Rectangle(x%+w%DIV2,y%+h%DIV6,w%DIV8,h%DIV3)    : REM door
   34 PROCPath_Rectangle(x%+w%DIV4,y%+2*h%DIV3,w%DIV8,h%DIV4)  : REM window
   35  PROCPath_Move(x%+3*w%DIV16,y%+2*h%DIV3)
   36  PROCPath_Draw(x%+5*w%DIV16,y%+2*h%DIV3)
   37  PROCPath_Move(x%+w%DIV4,y%+2*h%DIV3-h%DIV8)
   38  PROCPath_Draw(x%+w%DIV4,y%+2*h%DIV3+h%DIV8)
   39 PROCPath_Rectangle(x%+3*w%DIV4,y%+2*h%DIV3,w%DIV8,h%DIV4): REM window
   40  PROCPath_Move(x%+11*w%DIV16,y%+2*h%DIV3)
   41  PROCPath_Draw(x%+13*w%DIV16,y%+2*h%DIV3)
   42  PROCPath_Move(x%+3*w%DIV4,y%+2*h%DIV3-h%DIV8)
   43  PROCPath_Draw(x%+3*w%DIV4,y%+2*h%DIV3+h%DIV8)
   44 PROCPath_Move(x%,y%+h%)                                  : REM Roof
   45  PROCPath_Draw(x%+w%DIV8,y%+h%+h%DIV4)
   46  PROCPath_Draw(x%+7*w%DIV8,y%+h%+h%DIV4)
   47  PROCPath_Draw(x%+w%,y%+h%)
   48 PROCPath_Rectangle(x%+w%DIV4+w%DIV32,y%+5*h%DIV4+h%DIV16,w%DIV16,h%DIV8)
   49PROCPath_ObjectEnd
   50ENDPROC
   51
� �
ț "PathLib:OS_units.Paths"
$ț "PathLib:OS_units.Transforms"
ȑ 640,512
�Create_House
�CreateTransform
�DrawObjects
�
	

� �CreateTransform
  � '"Number of rotations";n%
# �Path_CreateTransform(rotate%)

% �Path_Rotation(rotate%,�/(2*n%))
�

� �DrawObjects  
 col%=0
 �
  � i%=1 � n%
   ș "Draw_Stroke",house%
&   �Path_Transform(house%,rotate%)
    � �0,3);"Press space bar"
   x$=�
  �
  col%+=1 : � 1+col% � 6
  � �      
�

� �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%)
0> �Path_Rectangle(x%+w%�4+w%�32,y%+5*h%�4+h%�16,w%�16,h%�8)
1�Path_ObjectEnd
2�
3
�
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 20  |ateTransform... |
000000b0  20 e8 20 27 22 4e 75 6d  62 65 72 20 6f 66 20 72  | . '"Number of r|
000000c0  6f 74 61 74 69 6f 6e 73  22 3b 6e 25 0d 00 0c 23  |otations";n%...#|
000000d0  20 f2 50 61 74 68 5f 43  72 65 61 74 65 54 72 61  | .Path_CreateTra|
000000e0  6e 73 66 6f 72 6d 28 72  6f 74 61 74 65 25 29 0d  |nsform(rotate%).|
000000f0  00 0d 25 20 f2 50 61 74  68 5f 52 6f 74 61 74 69  |..% .Path_Rotati|
00000100  6f 6e 28 72 6f 74 61 74  65 25 2c af 2f 28 32 2a  |on(rotate%,./(2*|
00000110  6e 25 29 29 0d 00 0e 05  e1 0d 00 0f 04 0d 00 10  |n%))............|
00000120  14 dd 20 f2 44 72 61 77  4f 62 6a 65 63 74 73 20  |.. .DrawObjects |
00000130  20 0d 00 11 0b 20 63 6f  6c 25 3d 30 0d 00 12 06  | .... col%=0....|
00000140  20 f5 0d 00 13 11 20 20  e3 20 69 25 3d 31 20 b8  | .....  . i%=1 .|
00000150  20 6e 25 0d 00 14 1e 20  20 20 c8 99 20 22 44 72  | n%....   .. "Dr|
00000160  61 77 5f 53 74 72 6f 6b  65 22 2c 68 6f 75 73 65  |aw_Stroke",house|
00000170  25 0d 00 15 26 20 20 20  f2 50 61 74 68 5f 54 72  |%...&   .Path_Tr|
00000180  61 6e 73 66 6f 72 6d 28  68 6f 75 73 65 25 2c 72  |ansform(house%,r|
00000190  6f 74 61 74 65 25 29 0d  00 16 20 20 20 20 f1 20  |otate%)...    . |
000001a0  8a 30 2c 33 29 3b 22 50  72 65 73 73 20 73 70 61  |.0,3);"Press spa|
000001b0  63 65 20 62 61 72 22 0d  00 17 0b 20 20 20 78 24  |ce bar"....   x$|
000001c0  3d be 0d 00 18 07 20 20  ed 0d 00 19 1c 20 20 63  |=.....  .....  c|
000001d0  6f 6c 25 2b 3d 31 20 3a  20 e6 20 31 2b 63 6f 6c  |ol%+=1 : . 1+col|
000001e0  25 20 83 20 36 0d 00 1a  0f 20 20 fd 20 a3 20 20  |% . 6....  . .  |
000001f0  20 20 20 20 0d 00 1b 05  e1 0d 00 1c 04 0d 00 1d  |    ............|
00000200  13 dd 20 f2 43 72 65 61  74 65 5f 48 6f 75 73 65  |.. .Create_House|
00000210  0d 00 1e 21 f2 50 61 74  68 5f 4f 62 6a 65 63 74  |...!.Path_Object|
00000220  42 65 67 69 6e 28 68 6f  75 73 65 25 2c 32 30 30  |Begin(house%,200|
00000230  29 0d 00 1f 22 20 78 25  3d 30 20 3a 20 79 25 3d  |)..." x%=0 : y%=|
00000240  30 20 3a 20 77 25 3d 34  30 30 20 3a 20 68 25 3d  |0 : w%=400 : h%=|
00000250  33 30 30 0d 00 20 48 20  f2 50 61 74 68 5f 52 65  |300.. H .Path_Re|
00000260  63 74 61 6e 67 6c 65 28  78 25 2b 77 25 81 32 2c  |ctangle(x%+w%.2,|
00000270  79 25 2b 68 25 81 32 2c  77 25 2c 68 25 29 20 20  |y%+h%.2,w%,h%)  |
00000280  20 20 20 20 20 20 20 20  20 20 3a 20 f4 20 62 6f  |          : . bo|
00000290  64 79 20 6f 66 20 68 6f  75 73 65 0d 00 21 3b 20  |dy of house..!; |
000002a0  f2 50 61 74 68 5f 52 65  63 74 61 6e 67 6c 65 28  |.Path_Rectangle(|
000002b0  78 25 2b 77 25 81 32 2c  79 25 2b 68 25 81 36 2c  |x%+w%.2,y%+h%.6,|
000002c0  77 25 81 38 2c 68 25 81  33 29 20 20 20 20 3a 20  |w%.8,h%.3)    : |
000002d0  f4 20 64 6f 6f 72 0d 00  22 3d 20 f2 50 61 74 68  |. door.."= .Path|
000002e0  5f 52 65 63 74 61 6e 67  6c 65 28 78 25 2b 77 25  |_Rectangle(x%+w%|
000002f0  81 34 2c 79 25 2b 32 2a  68 25 81 33 2c 77 25 81  |.4,y%+2*h%.3,w%.|
00000300  38 2c 68 25 81 34 29 20  20 3a 20 f4 20 77 69 6e  |8,h%.4)  : . win|
00000310  64 6f 77 0d 00 23 26 20  20 f2 50 61 74 68 5f 4d  |dow..#&  .Path_M|
00000320  6f 76 65 28 78 25 2b 33  2a 77 25 81 31 36 2c 79  |ove(x%+3*w%.16,y|
00000330  25 2b 32 2a 68 25 81 33  29 0d 00 24 26 20 20 f2  |%+2*h%.3)..$&  .|
00000340  50 61 74 68 5f 44 72 61  77 28 78 25 2b 35 2a 77  |Path_Draw(x%+5*w|
00000350  25 81 31 36 2c 79 25 2b  32 2a 68 25 81 33 29 0d  |%.16,y%+2*h%.3).|
00000360  00 25 28 20 20 f2 50 61  74 68 5f 4d 6f 76 65 28  |.%(  .Path_Move(|
00000370  78 25 2b 77 25 81 34 2c  79 25 2b 32 2a 68 25 81  |x%+w%.4,y%+2*h%.|
00000380  33 2d 68 25 81 38 29 0d  00 26 28 20 20 f2 50 61  |3-h%.8)..&(  .Pa|
00000390  74 68 5f 44 72 61 77 28  78 25 2b 77 25 81 34 2c  |th_Draw(x%+w%.4,|
000003a0  79 25 2b 32 2a 68 25 81  33 2b 68 25 81 38 29 0d  |y%+2*h%.3+h%.8).|
000003b0  00 27 3d 20 f2 50 61 74  68 5f 52 65 63 74 61 6e  |.'= .Path_Rectan|
000003c0  67 6c 65 28 78 25 2b 33  2a 77 25 81 34 2c 79 25  |gle(x%+3*w%.4,y%|
000003d0  2b 32 2a 68 25 81 33 2c  77 25 81 38 2c 68 25 81  |+2*h%.3,w%.8,h%.|
000003e0  34 29 3a 20 f4 20 77 69  6e 64 6f 77 0d 00 28 27  |4): . window..('|
000003f0  20 20 f2 50 61 74 68 5f  4d 6f 76 65 28 78 25 2b  |  .Path_Move(x%+|
00000400  31 31 2a 77 25 81 31 36  2c 79 25 2b 32 2a 68 25  |11*w%.16,y%+2*h%|
00000410  81 33 29 0d 00 29 27 20  20 f2 50 61 74 68 5f 44  |.3)..)'  .Path_D|
00000420  72 61 77 28 78 25 2b 31  33 2a 77 25 81 31 36 2c  |raw(x%+13*w%.16,|
00000430  79 25 2b 32 2a 68 25 81  33 29 0d 00 2a 2a 20 20  |y%+2*h%.3)..**  |
00000440  f2 50 61 74 68 5f 4d 6f  76 65 28 78 25 2b 33 2a  |.Path_Move(x%+3*|
00000450  77 25 81 34 2c 79 25 2b  32 2a 68 25 81 33 2d 68  |w%.4,y%+2*h%.3-h|
00000460  25 81 38 29 0d 00 2b 2a  20 20 f2 50 61 74 68 5f  |%.8)..+*  .Path_|
00000470  44 72 61 77 28 78 25 2b  33 2a 77 25 81 34 2c 79  |Draw(x%+3*w%.4,y|
00000480  25 2b 32 2a 68 25 81 33  2b 68 25 81 38 29 0d 00  |%+2*h%.3+h%.8)..|
00000490  2c 43 20 f2 50 61 74 68  5f 4d 6f 76 65 28 78 25  |,C .Path_Move(x%|
000004a0  2c 79 25 2b 68 25 29 20  20 20 20 20 20 20 20 20  |,y%+h%)         |
000004b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000004c0  20 20 20 20 20 20 20 20  20 3a 20 f4 20 52 6f 6f  |         : . Roo|
000004d0  66 0d 00 2d 24 20 20 f2  50 61 74 68 5f 44 72 61  |f..-$  .Path_Dra|
000004e0  77 28 78 25 2b 77 25 81  38 2c 79 25 2b 68 25 2b  |w(x%+w%.8,y%+h%+|
000004f0  68 25 81 34 29 0d 00 2e  26 20 20 f2 50 61 74 68  |h%.4)...&  .Path|
00000500  5f 44 72 61 77 28 78 25  2b 37 2a 77 25 81 38 2c  |_Draw(x%+7*w%.8,|
00000510  79 25 2b 68 25 2b 68 25  81 34 29 0d 00 2f 1d 20  |y%+h%+h%.4)../. |
00000520  20 f2 50 61 74 68 5f 44  72 61 77 28 78 25 2b 77  | .Path_Draw(x%+w|
00000530  25 2c 79 25 2b 68 25 29  0d 00 30 3e 20 f2 50 61  |%,y%+h%)..0> .Pa|
00000540  74 68 5f 52 65 63 74 61  6e 67 6c 65 28 78 25 2b  |th_Rectangle(x%+|
00000550  77 25 81 34 2b 77 25 81  33 32 2c 79 25 2b 35 2a  |w%.4+w%.32,y%+5*|
00000560  68 25 81 34 2b 68 25 81  31 36 2c 77 25 81 31 36  |h%.4+h%.16,w%.16|
00000570  2c 68 25 81 38 29 0d 00  31 13 f2 50 61 74 68 5f  |,h%.8)..1..Path_|
00000580  4f 62 6a 65 63 74 45 6e  64 0d 00 32 05 e1 0d 00  |ObjectEnd..2....|
00000590  33 04 0d ff                                       |3...|
00000594