0 Members and 1 Guest are viewing this topic.

.GL₄+22→→°RoomStartL₄+24→→°RoomWidthL₄+26→→°RoomHeightL₄+28→→°RoomXL₄+30→→°RoomYL₄+32→→°NewRoomXL₄+34→→°NewRoomYL₄+36→→°InvalidL₄+38→→°URL₄+40→→°LLL₄+42→→°NewRoomX2L₄+44→→°NewRoomY2L₄+20→→°RoomsFill(L₁,36,0)0→Rooms→RoomX→RoomY→RoomHeight→RoomWidthClrDrawGenFloor()CheckFloor()Main()Lbl MainWhile 1Input()EndIf getKey(15)ReturnLbl CheckFloorFor(J,1,Rooms)J*4+L₁-4→ZJ+(J*((J>0)*4))-4→YDrawText(1,Y,"(")DrawInt(4,Y,{Z})DrawText(13,Y,",")DrawInt(16,Y,{Z+1})DrawText(24,Y,")")DrawInt(29,Y,{Z+2})DrawInt(38,Y,{Z+3})EndReturnLbl GenFloorWhile Rooms<9GenRoom()PlaceRoom()EndReturnLbl GenRoomGetRoomStart()While 1GetRoomSide()→RoomWidthEnd!If ChkRoomWidth()While 1GetRoomSide()→RoomHeightEnd!If ChkRoomHeight()ReturnLbl PlaceRoomIf Rooms<9RoomY+RoomHeight-1→{RoomX+RoomWidth-1→{RoomY→{RoomX→{Rooms+1→Rooms*4+L₁-4}+1}+1}+1}EndReturnLbl GetRoomStart6+(rand^(33))→RoomX4+(rand^(40))→RoomYReturnLbl GetRoomSide4+(rand^(9))ReturnLbl ChkRoomWidth(RoomX+RoomWidth-1>41)ReturnLbl ChkRoomHeight(RoomY+RoomHeight-1>43)ReturnLbl DrawTextFor(I,0,length(r₃)-1)conj({r₃+I}-32*4+°CharSprites,L₄+50,4)Fill(L₄+54,4,0)DrawChar()EndReturnLbl DrawIntr₃/10+16→{L₅}r₃^10+16→{L₅+1}For(I,0,1)conj({L₅+I}*4+°CharSprites,L₄+50,4)Fill(L₄+54,4,0)DrawChar()EndReturnLbl DrawCharPt-On(r₁+(I*((I>0)*4)),r₂,L₄+50)ReturnLbl InputIf getKey(9)ClrDraw0→RoomsGenFloor()EndReturn[]→°CharSprites[0000000080800080][A0A00000A0E0E0A0][60C060C0A060C0A0][40A060E040400000][4080804040202040][A040A0000040E040][000040800000E000][0000008000204080][E0A0A0E0C04040E0][E020C0E0E06020E0][A0A0E020E08060E0][E080E0E0E0204040][E0A0E0E0E0A0E020][4000400040004080][0020402000E000E0][00804080E0200040][40A0E04060A0E0A0][C0E0A0E0E08080E0][C0A0A0E0E0C080E0][E0C08080E080A0C0][A0E0A0A0E04040E0][6020A040A0C0A0A0][808080E0E0E0A0A0][C0A0A0A0C0A0A060][C0A0E080E0A0E040][C0A0C0A0E08020E0][E0404040A0A0A060][A0A0A040A0A0E0E0][A040A0A0A0A04040][E02080E000000000]

.GL4+22->->°RoomStartL4+24->->°RoomWidthL4+26->->°RoomHeightL4+28->->°RoomXL4+30->->°RoomYL4+32->->°NewRoomXL4+34->->°NewRoomYL4+36->->°InvalidL4+38->->°URL4+40->->°LLL4+42->->°NewRoomX2L4+44->->°NewRoomY2L4+20->->°RoomsFill(L1,36,0)0->Rooms->RoomX->RoomY->RoomHeight->RoomWidthClrDrawGenFloor()CheckFloor()Main()Lbl Main While 1 DispGraph Input() EndIf getKey(15)ReturnLbl CheckFloor For(J,1,Rooms) J*4+L1-4->Z J*5-4->Y DrawText(1,Y,"(") DrawInt(4,Y,{Z}) DrawText(13,Y,",") DrawInt(16,Y,{Z+1}) DrawText(24,Y,")") DrawInt(29,Y,{Z+2}) DrawInt(38,Y,{Z+3}) EndReturnLbl GenFloor While Rooms<9 GenRoom() PlaceRoom() EndReturnLbl GenRoom GetRoomStart() While 1 GetRoomSide()->RoomWidth End!If ChkRoomWidth() While 1 GetRoomSide()->RoomHeight End!If ChkRoomHeight()ReturnLbl PlaceRoom If Rooms<9 RoomY+RoomHeight-1->{RoomX+RoomWidth-1->{RoomY->{RoomX->{Rooms+1->Rooms*4+L1-4}+1}+1}+1} EndReturnLbl GetRoomStart 6+(rand^(33))->RoomX 4+(rand^(40))->RoomYReturnLbl GetRoomSide 4+(rand^(9))ReturnLbl ChkRoomWidth (RoomX+RoomWidth-1>41)ReturnLbl ChkRoomHeight (RoomY+RoomHeight-1>43)ReturnLbl DrawText For(I,0,length([r3])-1) Copy({[r3]+I}-32*4+°CharSprites,L4+50,4) Fill(L4+54,4,0) DrawChar() EndReturnLbl DrawInt [r3]/10+16->{L5} [r3]^10+16->{L5+1} For(I,0,1) Copy({L5+I}*4+°CharSprites,L4+50,4) Fill(L4+54,4,0) DrawChar() EndReturnLbl DrawChar Pt-On([r1]+(I*((I>0)*4)),[r2],L4+50)ReturnLbl Input If getKey(9) ClrDraw 0->Rooms GenFloor() EndReturn[]->°CharSprites[0000000080800080][A0A00000A0E0E0A0][60C060C0A060C0A0][40A060E040400000][4080804040202040][A040A0000040E040][000040800000E000][0000008000204080][E0A0A0E0C04040E0][E020C0E0E06020E0][A0A0E020E08060E0][E080E0E0E0204040][E0A0E0E0E0A0E020][4000400040004080][0020402000E000E0][00804080E0200040][40A0E04060A0E0A0][C0E0A0E0E08080E0][C0A0A0E0E0C080E0][E0C08080E080A0C0][A0E0A0A0E04040E0][6020A040A0C0A0A0][808080E0E0E0A0A0][C0A0A0A0C0A0A060][C0A0E080E0A0E040][C0A0C0A0E08020E0][E0404040A0A0A060][A0A0A040A0A0E0E0][A040A0A0A0A04040][E02080E000000000]