Source,
main_menu:
load image "background.png",1
set text size 12
blue=RGB(0,128,255)
white=RGB(255,255,255)
selectedItem=1
do
paste image 1,0,0
`print menu items
if selectedItem=1 then ink blue,0 else ink black,0
text 300,350,"Play Game"
if selectedItem=2 then ink blue,0 else ink black,0
text 400,350,"Instructions"
if selectedItem=3 then ink blue,0 else ink black,0
text 500,350,"About"
if selectedItem=4 then ink blue,0 else ink black,0
text 600,350,"Exit"
`select menu items
if leftkey()=1 and hold=0 then dec selectedItem : hold=1
if rightkey()=1 and hold=0 then inc selectedItem : hold=1
if leftkey()=0 and rightkey()=0 then hold=0
if selectedItem>4 then selectedItem=1
if selectedItem<1 then selectedItem=4
`choose what to do when an item is selected
if returnkey()=1
`play game
if selectedItem=1 then goto new_game
`display instructions
if selectedItem=2
load image "instructions.png",1001
paste image 1001,64,32
sync : sync
`clear up after myself
delete image 1001
endif
`display information about the game
if selectedItem=3
load image "instructions.png",1001
paste image 1001,64,32
sync : sync
`clear up after myself
delete image 1001
endif
`quit the game
if selectedItem=4
end
endif
endif
sync
loop
return
pave:
backdrop off
load image "hospitaltexture.bmp",10
load object "hospital.3ds",1
texture object 1,10
load image "asphalt.png",9
if mouseclick()=1 then paste image 9,mousex(),mousey()
return
new_game:
cls
ink rgb(244,214,210),1
money$=amount$
day#=1
input "Hospital Name:",name$
if name$="Jordan Stories Hospital" then money#=money#+1000000
object_manage:
cls
print "",name$
load image "pave.png",5
paste image 5,550,60
backdrop off
load object "hospital.3ds",1
point object 1,0,0,0
load image "hospitaltexture.bmp",1
texture object 1,1
wait 60000 : day#=day#+1
if day#=2 then gosub patient_arrives
next_day:
cls
load object "hospital.3ds",1
point object 1,0,0,0
load image "hospitaltexture.bmp",1
texture object 1,1
print "Saving...."
OPEN TO WRITE 1,"C:\Program Files\"+name$
if mouseclick()=1 then gosub inside
do
mousx# = mousex()
mousy# = mousey()
imagex1#=6432
imagex2#=032
imagey1#=3362
imagey2#=062
if mousex()>550 and mousex()<650 and mousey()>66 and mousey()<130 and mouseclick()=1 then clicked=1 else clicked=0
Bttnclick=1
IF Mouseclick()=1 and BttnClick=1 then gosub pave
loop
return
inside:
patient_arrives:
cls
load image "patientarriving1.png",5
paste image 5,50,50
input "What do you want to perform Doctor?",perform$
if perform$="shock" then gosub shock else print "Yes Doctor!"
if perform$=perform$ then gosub next_day
return
shock:
cls
load image "shockhim!.png",6
paste image 6,50,50
wait 10000 : gosub next_day