;mode800
*define
nsa

;;;
;;; menu
;;;
resetmenu
insertmenu "I",END
insertmenu "Zbg",RESET
;insertmenu "̑Iɐi",SKIP
insertmenu "ǃXLbv",SKIP
insertmenu "I[g[h",AUTO
insertmenu "eLXgXs[h",SUB
	insertmenu "x",TEXTSLOW,1
	insertmenu "",TEXTMIDDLE,1
	insertmenu "",TEXTFAST,1
insertmenu "tHg",FONT
insertmenu "",SUB
	insertmenu "tXN[",FULL,1
	insertmenu "EBhE",WINDOW,1
rmenu "EBhE",windowerase,"Z[u",save,"[h",load,"z",lookback,"^Cgɖ߂",reset

defsub name
humanz 100
windowback
rubyon 10,10
usewheel
lookbacksp 12,13
textgosub *text_lb

kidokuskip
filelog
globalon
selectcolor #80C1FF,#78EDFF
menusetwindow 26,26,0,5,0,0,#00A0A0
menuselectcolor #FFFFFF,#7CFC00,#BBBBBB
transmode alpha
	effect 2,10,1000;Vb^[1000ms
	effect 3,6,1000;RJ[e(ʓ])
	effect 10,17,1000;POUCNCiɖ߂j
	effect 11,16,1000;PPUCNAEgi]^CXbvj
	;;tOpϐ

;;
;; MANUAL
;;ϐ%0`%999ƁAϐ$0`$999Aꂼ1000݂܂B
;;0Ԃ199Ԃ܂łʂ̕ϐŁA200Ԃ999Ԃ܂łO[oϐłB
;;ʂ̕ϐ́AQ[IAreset߂Ȃǂœŏɖ߂
;;l܂AO[oϐ͏܂B
;;
;;̓Iɂ́AႦ΁Aʂ̕ϐ͍DxɁA
;;O[oϐ̓NAtOɁAƂgł傤B
;;
numalias creditnow,11		;
numalias creditx,12		;
numalias credity,13		;
numalias creditscroll,14	;
numalias bwait,15
numalias sub1,16

;; ϐ𑝂₵火̃Zbgɂނ
;; UłȂ[goĂ܂P[XB 
;;

defaultspeed 80,50,20
game

*load
systemcall load

*save
systemcall save

goto *start

*start
textspeeddefault
caption "Projct J 2nd"
;bg white,1
bg "haikei\projectj\title.JPG",2
btndef ""
;goto *begin_game_dayo
	*loop
	lsp 1,":s/26,26,0;#330099#FF3E3E͂߂",360,320
	lsp 2,":s/26,26,0;#FF3E3E#FF69B4Â",360,360
;	if %endh1 == 0 goto *game_shokai
;	if %endh2 == 0 goto *game_shokai
;	if %endh3 == 0 goto *game_shokai
;	if %endc1 == 0 goto *game_shokai
;	if %endc2 == 0 goto *game_shokai
;	if %endt1 == 0 goto *game_shokai
;	if %endt2 == 0 goto *game_shokai
;	if %ends1 == 0 goto *game_shokai
;	if %ends2 == 0 goto *game_shokai
;	lsp 6,":s/26,26,0;#FF3E3E#FF69B4܂",170,402:;GfBOׂČꍇǉ
;	*game_shokai
;	lsp 3,":s/26,26,0;#FF3E3E#FF69B4Q[Љ",240,320
	lsp 5,":s/26,26,0;#FF3E3E#FF69B4@ I"    ,365,400
;	lsp 4,":s/26,26,0;#FF3E3E#FF69B4bf[h" ,240,320
	lsp 7,":s/26,26,0;#FF3E3E#FF69B4Copyright " ,360,440
	spbtn 1,1
	spbtn 2,2
	spbtn 3,3
	spbtn 4,4
	spbtn 5,5
	spbtn 6,6
	spbtn 7,7

	btnwait %0
	if %0==-3	csp -1:	goto *loop
	if %0==-2	csp -1:	goto *loop
	if %0==-1	csp -1:	goto *loop
	if %0==0	csp -1:	goto *loop
	if %0==1	csp -1:	goto *begin_ore_route
	if %0==2	csp -1:	goto *load
;	if %0==3	csp -1:	goto *omake:;Q[Љ
	if %0==5	csp -1:	goto *exit
	if %0==4	csp -1:	goto *cg_mode_begin
;	if %0==6	csp -1:	goto *maron_omake:;܂̂܂
	if %0==7	csp -1:	goto *copyright:;Rs[Cg

*begin_ore_route
gosub *reset_window
gosub *reset
rmode 1
goto *begin_game_dayo

*exit
mesbox "I܂B","ImF"
end

*text_lb
btndef clear
gosub *sysbtn

*textbtnloop
ispage %0
getcursorpos %1,%2:;ʒu擾 x,y
if %0=1 amsp 5,%1,%2+9:vsp 5,1:;y[W҂J[\
if %0=0 amsp 6,%1,%2+7:vsp 6,1:;s҂J[\
print 1

textbtnwait %0
repaint
if %0=-2 gosub *cursctrl:gosub *sysbtn:goto *textbtnloop
if %0=-1 gosub *rclick:goto *textbtnloop
if %0= 0 vsp 6,0:goto  *end_textbtn
if %0=100 allsphide:systemcall save:allspresume:goto *textbtnloop
if %0=101 allsphide:systemcall load:allspresume:goto *textbtnloop
if %0=102 gosub *cursctrl:gosub *sysbtn:goto *textbtnloop
goto *textbtnloop

*rclick
vsp 5,0
print 1
systemcall windowerase
return

*cursctrl
vsp 5,0
print 1
systemcall lookback
print 1
return

*end_textbtn
texec
vsp 5,0
print 1
saveon
return

;;
;; save, load, lookback
;;
*sysbtn
;btn 100,446,456,64,20,0,20
;btn 101,510,456,64,20,0,0
;btn 102,582,400,50,28,0,40
btn 100,558,570,80,25,0,25
btn 101,638,570,80,25,0,0
btn 102,727,500,62,35,0,50
return

*customsel
skipoff
btndef clear
gosub *sysbtn
getcselnum %0
getcursorpos %1,%2
cselbtn 0,50,%1,%2
add %2,25
cselbtn 1,51,%1,%2
if %0>2 add %2,25:cselbtn 2,52,%1,%2
if %0>3 add %2,25:cselbtn 3,53,%1,%2
if %0>4 add %2,25:cselbtn 4,54,%1,%2

*csel_loop
selectbtnwait %0
repaint
if %0=-1 systemcall windowerase:goto *csel_loop
if %0=100 systemcall save:goto *csel_loop
if %0=101 systemcall load:goto *csel_loop
if %0=102 gosub *cursctrl:gosub *sysbtn:goto *csel_loop
if %0>=50 & %0<=54 saveon:sub %0,50:cselgoto %0
goto *csel_loop

;;
;;
;;
*reset

return

;;---------------------------------------------
;;cg_mode http://www.interq.or.jp/earth/msym/ 
;;---------------------------------------------
*cg_mode_begin
;play "midi\pro_j06.mid"
;@lsp n,("A")"B""C",*,*
;@摜Aǂݍ񂾂ƂΉ摜BAΉ摜CAn
;̃XvCgɕ荞ނƂ菇łB
;;;
;;; XV
;;;

;;;
;;; cg-mode eof
;;;


;;;
;;; text window
;;;
;;;EEBhËʒu(̐l)
;;;E̍W(O̐)
;;;E(̍W̎̐)
;;;
;setwindow {̍WX},{VY},{},{Vc},{tHgTCYX},{VY},
;          {X},{VY},{\Xs[h},{0() or 1()},{0() or 1(et)},
;          {#EChEJ[},{EChEX},{VY},{EChEEX},{VY}
;
;setwindow {̍WX},{VY},{},{Vc},{tHgTCYX},{VY},
;          {X},{VY},{\Xs[h},{0() or 1()},{0() or 1(et)},
;          {摜t@C̃pX},{EChEX},{VY}

*reset_window
#ffffff
setwindow 64,428, 25,5, 24,24, 2,10, 30, 0,1, ":a;text.bmp",  0,402
textspeeddefault
btndef "system.bmp"
lsph  5,":l/3,160,2;cursor1.bmp",0,0
lsph  6,":a/4,120,0;cursor2.bmp",0,0
lsph 12,":l/2,0,3;upbtn.bmp",727,500
lsph 13,":l/2,0,3;dwbtn.bmp",727,535
lsph 15,"img\name_window.bmp",10,348		;O\pEBhE
erasetextwindow 0
textoff
return

*reset_window_daigo
#ffffff
setwindow 64,428, 25,5, 24,24, 2,10, 30, 0,1, ":a;text_daigo.bmp",  0,402
textspeeddefault
btndef "system.bmp"
lsph  5,":l/3,160,2;cursor1.bmp",0,0
lsph 12,":l/2,0,3;upbtn.bmp",727,500
lsph 13,":l/2,0,3;dwbtn.bmp",727,535
lsph 15,"img\name_window.bmp",10,348		;O\pEBhE
erasetextwindow 0
textoff
return

*reset_window_akira
#ffffff
setwindow 64,428, 25,5, 24,24, 2,10, 30, 0,1, ":a;text_akira.bmp",  0,402
textspeeddefault
btndef "system.bmp"
lsph  5,":l/3,160,2;cursor1.bmp",0,0
lsph 12,":l/2,0,3;upbtn.bmp",727,500
lsph 13,":l/2,0,3;dwbtn.bmp",727,535
lsph 15,"img\name_window.bmp",10,348		;O\pEBhE
erasetextwindow 0
textoff
return

;http://f39.aaa.livedoor.jp/~nscr/index.html
;==========================================================================
;	O\
;==========================================================================
*name
	csp 14			;\pXvCg
	getparam $0		;w肳ꂽ擾
	len %0,$0		;ϐ%0ɕ$0̒Ԃ
	div %0,2		;len߂œ镶͔płׁASp2Ŋ
	
	if %0 = 0 vsp 15,0:print 1:return			;ȌꍇAȉɂ菈
	if %0 = 1 lsph 14,":s/26,28,0;#FFFFFF$0",104,356
	if %0 = 2 lsph 14,":s/26,28,0;#FFFFFF$0", 91,356
	if %0 = 3 lsph 14,":s/26,28,0;#FFFFFF$0", 78,356
	if %0 = 4 lsph 14,":s/26,28,0;#FFFFFF$0", 65,356
	if %0 = 5 lsph 14,":s/26,28,0;#FFFFFF$0", 52,356
	if %0 = 6 lsph 14,":s/26,28,0;#FFFFFF$0", 39,356
	;XvCg\
	vsp 14,1
	vsp 15,1
	print 1
return

;;;
;;; eof
;;;

