> DefRoom 1.20  25-May-94 V1.00  02-Aug-97 V1.20 (: 2W&86: Obj% &301,Buf% &100,ctrl% 20,data% 127,Sprite% 7,Icon% 31:X%=ctrl%:Y%=X%256 <-Room0%=&8000:rom0%=4:rom1%=5:Room1%=&8000 F3 Room1%=FNalloc(&4000):IFRoom1%=0:Room1%=&8000 P&OSGBPB=&FFD1:in%=0:out%=0:room%=-1 Zasm: err:end: d?3"Jet Set Willy Room Editor"''4"(C)1989-97 J.G.Harston" n" 23;9,7;0;0;0; 23;4,38;0;0;0; x$ 23;10,&60;0;0;0;23;7,31;0;0;0;  23,136,255,0,0,0,0,0,0,0 , 23,137,128,128,128,128,128,128,128,128 23,138,16,0,16,0,16,0,16,0 , 23,139,&3C,&42,&99,&A1,&A1,&99,&42,&3C %A%=016:32,A%);""::40,"") Room: err:end: menu:end: : 1ݤalloc(L%):A%-1:-A%-512>L%:A%L%:=A% =0 : ݤerr::= : end:*FX4 : : Kݤmenu:A$=:A$>"0" A$<"5":34,blk%*2+1)" "9" ";:blk%=A$-1:Blk:=0 ")A$>135 A$<140:Move:x%,y%);:=0 ,y%=16:name:=0 6y%>16 y%<20:exit:=0 @ y%=21::: J: T A$=" " put_in ^ A$="H" help():Xc,Yc); h A$="E" EditChar r A$="M" - MOVE TO ROOM | U - UNDO  O - OBJECTS  A$="C" Convs  A$="L" Load:Indicate  A$="S" Save:Indicate  A$="R" Room:Indicate  A$="*" Oscli:Indicate =1 : *Blk:34,blk%*2+1)">"9"<"x%,y%);: : "Move:A$=137:x%=(x%+1)31: A$=136:x%=(x%-1)31: A$=138:y%=y%+1: A$=139:y%=(y%-1)(y%>0):  : &name:A%=A$:room%<0: 0FA%>31 A%<128:Buff%?x%=A%:A%-12*(A%=127):x%=(x%+1)31:x%=0:13 : D: NJRoom:0,21)"Room= ";:8,8,8:""A$:A$="":5,21);room%;x%,y%);: X-room%>=0:copy(Buf%,r(room%),256,rom0%) bIroom%=A$:copy(r(room%),Buf%,256,rom0%):copy(&A3FF,Obj%,513,rom1%) lDisp:x%=0:y%=0: v: %Disp:A%=07:23,128+A%:B%=07 (Buf%?(161+A%*9+B%-1*(A%=7)):::30 ;A%=0127:B%=Buf%?A%:C%=03:128+(B%64):B%=(B%*4)&FF :(A%7)=7: :PrN(Buf%+128,):A%=01 @slope(A%,Buf%?(214+4*A%),Buf%!(215+4*A%),Buf%?(217+4*A%)): >A%=240:Buf%?A%<>255:Sprite(Buf%?A%,Buf%?(A%+1)):A%=A%+2 !Buf%?A%=255 A%>255:Objects Info:Chars: : *slope(Type%,Dir%,Ad%,Num%):Num%<1: "sx%=Ad%31:sy%=(Ad%&1E0)32: Dsx%,sy%);(133-A%);:sx%=sx%+2*(Dir%(1-Type%))-1:sy%=sy%-Type% 2Num%=Num%-1:Num%<1 sx%>31 sx%<0 sy%<0:  : .PrN(A%,F%):C%=031:B%=A%?C%:B%>32:F%=  2F%:B%>31 B%<128:B%-12*(B%=127) F%:255 *>31:C%=32 4: >: H.ݤr(R%):R%<64:=Room0%+256*R%+rom0%*&10000 R2=Room1%+256*(R%-&B0-&22*(R%<&B0))+rom1%*&10000 \: fcopy(Src%,Dst%,Len%,Rom%) p+!&70=Src%:!&72=Dst%:!&74=Len%:?&76=Rom% z mc%: : asm:mc%50:a%=01 AP%=mc%:[OPT a%*2:\ &70/1=>src, &72/3=>dst, &74/5=len, &76=rom "LDA &F4:PHA:LDA &76:JSR SetRom  LDY #0:LDA &75:BEQ ZeroPages  .loop (LDA (&70),Y:STA (&72),Y:INY:BNE loop $INC &71:INC &73:DEC &75:BNE loop .ZeroPages LDA &74:BEQ ZeroBytes .ZeroPageLp LDA (&70),Y:STA (&72),Y:INY DEC &74:BNE ZeroPageLp .ZeroBytes PLA  .SetRom $STA &F4:STA &FE30:RTS .]: 8: B*Objects:Num%=?Obj%: A%=Num%+1 256 LT((Obj%?A%)63)=room%:(Obj%?(A%+256))31,Obj%?(A%+256)32-8*(Obj%?A%>127))""; V: `: j;Sprite(Num%,Psn%):copy(&A000+8*Num%,Sprite%,8,rom1%) t,Sprite%?2=Psn%:Num%=?Sprite%7:Num%=0: ~&Num%=3:z%=010:16,z%)138;:: Num%=4:: Arrows @ic%=(((Sprite%?1 Sprite%?0) Sprite%?2)&E0)+256*Sprite%?5 "Sprite%?2 31,Sprite%?316); copy(ic%,Icon%,32,rom1%) 6 33,A*2);"BkGnd:Wall: Floor:Nasty:Slope:Conv.:******Objct:",A*6+1,6);35,A*2+1);(128+A) 2 < FDoSprites P$ A,B,C:A=0:0,22);" Sprites: " Z dQB=?(Buffer+A*2+240):B<>255 (A*8+1)40,23+(A 5));B;"/";?(Buffer+A*2+241); n" B=1:C=0 10:15,C);"";: x-A=A+1:A=7 B=255:33,24);"(C)JGH";:30  ݤcol(C)=C 2+4*(C 1) copy(rom,src,dst) *?&74=rom:?&71=src 256:?&73=dst 256  copy:  assem1  copy 39  P=0 1  P%=copy  [OPT P*2 LDY #0:STY &70:STY &72 LDA &F4:PHA LDA &74:STA &F4:STA &FE30  .loop LDA (&70),Y:STA (&72),Y:INY  BNE loop "PLA:STA &F4:STA &FE30 ,RTS 6]: @"ݤerr: chn<>0 X=chn:chn=0:#X J =17 -1 =0 T7 X%:X%=-1:0,23);:: <128 X% " at line ";; ^ X% *FX4 h=X% r Start |19,0,4,0,0,0 KRoom=-1:0,0);" ***** JSW Room Editor *****"'5"(C)1989 J.G.Harston." help(0):char=0 :  Xc=0:Yc=0  err 26:Xc,Yc);:*FX4,1 : : : help(flg) & flg 28,0,24,39,18,12 0,18); #"JSW Room editor instructions" 8'"1,2,3,4 Select room blocks"'"R : Select new room" '"H : Help C : Conveyors/Slopes" "S : Save L : Load"  flg flg=::26:Info: & 26: 03Indicate:34,char*2+1);">";9;"<";Xc,Yc);: : Move D A$=137 Xc=(Xc+1)31: N A$=136 Xc=(Xc-1)31: X A$=138 Yc=Yc+1: b" A$=139 Yc=(Yc-1) (Yc>0): l v put_in  a,b +a=Buffer+Xc 4+Yc*8:b=3*4^(3-(Xc 3)) E?a=(?a b) (char*b/3):128+char:Xc=(Xc+1)31:Xc=0 Xc,Yc);  clr:0,23);79;:30: clr1:0,23);39;:30:  Save  rst,rend,f$,r,A%,X%,Y% <0,24);"Save a set of rooms";:0,23);"Room start: "rst "clr1:0,23);"Room end: "rend mclr1: (rst<64 rend>63) (rst>63 rend<64) 0,23);"Must be continuous in 0-63 or 64-79";:Z=:clr: 0,23);"Filename: "f$ H rst>63 "SAVE "+f$+" "+~_RADDR(rst)+" "+~_RADDR(rend):clr: . Room<>-1 copy(rom,Buffer,_RADDR(Room))  $chn=(f$): chn=0 "Error":Z=: $?cblk=chn:X%=cblk:Y%=X%256:A%=2   r=rst rend * copy(rom,_RADDR(r),Buffer) 4cblk!1=Buffer:cblk!5=256 > OSBGPB:r H #chn R. Room<>-1 copy(rom,_RADDR(Room),Buffer) \ fOscli: A$:*FX4 p28,0,24,39,18,12 z :"*"A$ A$:A$="":*FX4,1 12,26:Info: name_in: Room=-1 S A$>=" " A$<="~" ?(Buffer+128+Xc)= A$:A$;:Xc=(Xc+1)31:A$="":Xc=00,16);  EditChar: Room=-1 : 0,23);"Edit char: "c$  c$<"1" c$>"7" clr: 28,0,16,31,0,12  > Map  Map out JSW rooms  25-07-97 JGH: 0.01 : :&84:buf%256,Obj%513,Sprite%8,Icon%32:assem:room%=-1 8"JSW Mapping Program"'"1: Small Map"'"2: Large Map" $A$=:"12",A$):'A$' .3"Print out? (Y/N)";:P$=:"YyNn",P$):" "P$' 8P$="Y"P$="y":P$="Y" B"Rom: "rom%:rom%=0:rom%=4 L copy(&A3FF,Obj%,513,rom%+1) V!"Start room: "b%:b%=0:b%=60 `A$="1":small: jA$="2":&80:large: t: ~ small :x%=0:y%=576 :  middle%=b%:x0%=x%:y0%=y% :here%=b%:map(here%,x%,y%) 5b%=buf%?235:y%=y%+64:b%=here% (b%=0 here%>2) b%=middle%:y%=y0% :here%=b%:map(here%,x%,y%) 5b%=buf%?236:y%=y%-64:b%=here% (b%=0 here%>2) -here%=middle%:y%=y0%:x%=x%+128:rd(here%) x%>&4FF:x%=0:y0%=128:y%=128 ,b%=buf%?234:b%=here% (b%=0 here%>2) P$="Y":dump(32)  : assem:mc%50:a%=01 (AP%=mc%:[OPT a%*2:\ &70/1=>src, &72/3=>dst, &74/5=len, &76=rom 2"LDA &F4:PHA:LDA &76:JSR SetRom < LDY #0:LDA &75:BEQ ZeroPages F .loop P(LDA (&70),Y:STA (&72),Y:INY:BNE loop Z$INC &71:INC &73:DEC &75:BNE loop d.ZeroPages nLDA &74:BEQ ZeroBytes x.ZeroPageLp LDA (&70),Y:STA (&72),Y:INY DEC &74:BNE ZeroPageLp .ZeroBytes PLA .SetRom STA &F4:STA &FE30:RTS ]: : map(r%,x%,y%):rd(r%) "z%=0 127:b%=buf%?z%:a%=03 0(b%&C0):69,x%+(a%+(z%7)*4)*4,y%-(z%8)*4 b%=(b%&3F)*4:: 4z%=0 1:cx%=buf%!(215+z%*4):n%=buf%?(217+z%*4) 1d%=buf%?(214+z%*4):cy%=(cx%32)15:cx%=cx%31 In%:a%=0n%-1:69,x%+(cx%+((d%(1-z%))*2-1)*a%)*4,y%-(cy%-a%*z%)*4: : ": ,rd(r%):r%=room%: 60copy(&8000+256*r%,buf%,256,rom%):room%=r%: @: Jcopy(Src%,Dst%,Len%,Rom%) T2!&70=Src%:!&72=Dst%:!&74=Len%:?&76=Rom%:mc%: ^: h large r 23,138,16,0,16,0,16,0,16,0 |, 23,139,&3C,&42,&99,&A1,&A1,&99,&42,&3C : :up:top%=here%:b%=here% :here%=b%:26,12 ]room(here%,0,0):b%=buf%?234:b%<>here%:room(b%,32,0):buf%?234<>b%:room(buf%?234,0,16) P$="Y":dump(17) 7rd(here%):b%=buf%?236:b%=here% (b%=0 here%>2) P$="Y":2:''':3 b%=top%: 4here%=b%:rd(here%):b%=buf%?236:buf%?234<>here% ;b%=buf%?234:rd(b%):b%=buf%?234:rd(b%):b%=buf%?234:up rd(here%):b%=buf%?235:b%=0 :  : ;up::here%=b%:rd(here%):b%=buf%?235:b%=here% b%<2  &: 02room(r%,x%,y%):28,x%,y%+15,x%+32,y%:rd(r%) : Disp: D: N%Disp:A%=07:23,128+A%:B%=07 X(buf%?(161+A%*9+B%-1*(A%=7)):::30 b;A%=0127:B%=buf%?A%:C%=03:128+(B%64):B%=(B%*4)&FF l:(A%7)=7 A%<>127: v :A%=01 @slope(A%,buf%?(214+4*A%),buf%!(215+4*A%),buf%?(217+4*A%)): GObjects:A%=240:buf%?A%<>255:Sprite(buf%?A%,buf%?(A%+1)):A%=A%+2 #buf%?A%=255:PrN(buf%+128,): : *slope(Type%,Dir%,Ad%,Num%):Num%<1: "sx%=Ad%31:sy%=(Ad%&1E0)32: Fsx%,sy%);(133-A%);:sx%=sx%+2*((Dir%(1-Type%)))-1:sy%=sy%-Type% 2Num%=Num%-1:Num%<1 sx%>31 sx%<0 sy%<0: : (PrN(A%,F%):26,31,32,16+x%32+y%8 !C%=031:B%=A%?C%:B%>32:F%= 1F%:B%>31 B%<128:B%-12*(B%=127) F%:32 : : *Objects:Num%=?Obj%: A%=Num%+1 256 T((Obj%?A%)63)=room%:(Obj%?(A%+256))31,Obj%?(A%+256)32-8*(Obj%?A%>127))""; : *: 4,Sprite%?2=Psn%:Num%=?Sprite%7:Num%=0: H&Num%=3:z%=010:16,z%)138;:: RNum%=4:: Arrows \@ic%=(((Sprite%?1 Sprite%?0) Sprite%?2)&E0)+256*Sprite%?5 f"Sprite%?2 31,Sprite%?316); pcopy(ic%,Icon%,32,rom%+1) z&3FF)) : 1,byte%:  1,10,1,13::*FX229 (-1):=27:*FX125 *FX229,1 ! 1,27,1,76,1,num%,1,num%256  x%=0 1535 2:byte%=0  pixel%=0 7 $@byte%=byte%*2+&200+(x%&1FF),511-pixel%*4-((x%&FFE00)16)) .: 1,byte%::*FX229 8% 1,10,1,13,3:(-1):=27:*FX125 B