Has no one tried out my game yet?
I've made a few small changes to make it run more smoothly, I'll post up Casio Criminal v1.1 tomorrow
and no one answered my question
How do I save data to my calculator?
[edit]
My emulator is coming along pretty well
`-------------------------------------------
` Calculator Emulator v beta 1.1
` By OBese87
`-------------------------------------------
hide mouse
sync on : sync rate 60
DIM screen$(5)
set text font "COURIER NEW"
set text size 12
set text opaque
`-------------------------------------------
`PROGRAM: Casio Criminal
`-------------------------------------------
M=0 : W=0
G=0 : C=0
0:
ClrText
new_line("~MAIN MENU~")
new_line("1.CRIMES")
new_line("2.HEIST")
new_line("3.STATS?")
A=get_input()
If A=1 then Goto 1
If A=2 then Goto 2
If A=3 then Goto 3
Goto 0
1:
ClrText
new_line("~CRIMES~")
new_line("1.GTA")
new_line("2.ROB SHOP")
new_line("3.MUG?")
A=get_input()
If A=0 then Goto 0
If A=1 then R=100
If A=2 then R=40
If A=3 then R=10
X=C+rnd(R)
Y=rnd(C+R)
S=0
If X>Y+R then S=rnd(R)
C=C+1
If S>0
If A=1
W=W+1
new_line("CAR STOLEN")
Else
M=M+S
new_line("LOOT")
new_line(str$(S))
EndIf
Else
new_line("FAIL")
EndIf
WaitEXE
Goto 1
3:
ClrText
new_line("~STATS~")
new_line("MONEY")
new_line(str$(M))
WaitEXE
new_line("CRIMES")
new_line(str$(C))
WaitEXE
new_line("CARS")
new_line(str$(W))
WaitEXE
new_line("GANGSTERS")
new_line(str$(G))
WaitEXE
Goto 0
2:
ClrText
new_line("~HEIST~")
new_line("1.GANG")
new_line("2.CAR")
new_line("3.COMMIT?")
A=get_input()
If A=0 then Goto 0
If A=1 then Goto 4
If A=2 then Goto 5
If A=3 then Goto 6
Goto 2
4:
ClrText
new_line("~GANG~")
new_line("GANGSTERS:")
new_line(str$(G))
WaitEXE
new_line("1.HIRE #200")
A=get_input()
If A=0 Then Goto 2
If A=1
If G<4
If M>=200
M=M-200
G=G+1
new_line("GANGSTER")
new_line("HIRED")
Else
new_line("INSUFFICIENT")
new_line("FUNDS")
Endif
Else
new_line("GANG FULL")
Endif
Endif
WaitEXE
Goto 4
5:
ClrText
new_line("~CAR~")
new_line("CARS:")
new_line(str$(W))
WaitEXE
new_line("1.BUY #200")
new_line("2.SELL #100?")
A=get_input()
If A=0 Then Goto 2
If A=1 Then X=-100
If A=1 Then Y=1
If A=2 Then X=100
If A=2 Then Y=-1
R=((W+Y)>=0)+((M+X)>=0)
If R=2
M=M+X
W=W+Y
new_line("DONE")
Else
new_line("FAIL")
Endif
WaitEXE
Goto 2
6:
If G=0 Then Goto 2
If W=0 Then Goto 2
ClrText
new_line("~COMMIT~")
WaitEXE
X=100Ran#*G
Y=100Ran#*4
S=0
If X>Y Then S=1000+rnd(5000)
If S>0
new_line("LOOT")
new_line(str$(S))
M=M+S
Else
new_line("FAIL")
Endif
WaitEXE
G=0
W=W-1
C=C+1
Goto 0
END
`-------------------------
` GOSUBS
`-------------------------
`-------------------------
` FUNCTIONS
`-------------------------
FUNCTION update_screen()
sx=250 : sy=160
fs=12 : fh=(fs+(fs/6)) : `font height
fgcol=rgb(20,30,20) : bgcol=rgb(120,140,90)
ink bgcol,0
box sx,sy,sx+fs^2,sy+fh*5.5
ink fgcol,bgcol
for ln = 1 to 5
text sx+2,sy+(ln-1)*fh,screen$(ln)
next ln
sync
ENDFUNCTION
FUNCTION new_line(new$)
`first look for empty lines to use
for ln = 1 to 5
If screen$(ln)=""
screen$(ln)=new$
update_screen()
exitfunction
endIf
next ln
`If no empty line then make space for new line
for ln = 1 to 5
screen$(ln-1)=screen$(ln)
next ln
`add new line to bottom of screen
screen$(5)=new$
update_screen()
ENDFUNCTION
FUNCTION get_insert_line()
i=0
`find empty line for input
for ln = 1 to 5
If screen$(ln)="" then i=ln : exitfunction i
next ln
`If no space make new line
new_line("") : i=5
ENDFUNCTION i
FUNCTION insert_line(ins$,ln)
screen$(ln)=ins$
update_screen()
ENDFUNCTION
FUNCTION get_input
A=0 : A$="" : c$=""
i=get_insert_line()
`display input in real-time
repeat
clear entry buffer
If keystate(14)>BS then A$=left$(A$,len(A$)-1)
sync
BS=keystate(14)
c$=left$(entry$(),1)
text 0,0,screen$(0)
If c$<>str$(val(c$)) then c$=""
A$=A$+c$
insert_line(A$,i)
If A$="" then A=-1 else A=val(A$)
until keystate(156) and A>-1
ENDFUNCTION A
FUNCTION ClrText
for ln = 0 to 5
screen$(ln)=""
next ln
ENDFUNCTION
FUNCTION WaitEXE
i=get_insert_line()
`Print wait line
insert_line(" ---disp---",i)
If keystate(156)=1 then repeat : sync : until keystate(156)=0
repeat : sync : until keystate(156)=1
screen$(i)=""
ENDFUNCTION
You have to kind of whack the keys to get an input, but I kinda like that
Enter 0 to go to previous menu
What do you think?
"You must be someone's friend to make comments about them." - MySpace lied.