Update of /cvsroot/win32forth/win32forth/apps/Console-Games
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv24329/Console-Games
Modified Files:
strek.f tetris.f
Log Message:
Jos: To simplify console applications. Saving boring cut and past actions.
Index: strek.f
===================================================================
RCS file: /cvsroot/win32forth/win32forth/apps/Console-Games/strek.f,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** strek.f 13 Aug 2008 11:40:41 -0000 1.2
--- strek.f 16 Aug 2008 13:31:24 -0000 1.3
***************
*** 1534,1539 ****
--- 1534,1543 ----
;
+ : set-console-title ( -- )
+ Z" Super Star Trek" CONHNDL call SetWindowText drop ;
+
: strek ( -- )
\ page
+ set-console-title
cr cr
cr ." ------*------, "
***************
*** 1551,1587 ****
;
! \ create a turnkey application
! create-turnkey? [IF]
!
! : set-console-title ( -- )
! Z" Super Star Trek" CONHNDL call SetWindowText drop ;
!
! also hidden
!
! : strek-hello ( -- ) \ startup stuff
!
! \ default initialization (needed for all turnkey apps)
! initialization-chain do-chain
! init-console drop
! unset-except set-except \ exception handling needs to be set after the console is started
! exception@ if bye then
!
! \ our own initialization
! menu-off \ close menubar
! HideStatusBar: ConsoleWindow \ close the statusbar
! set-console-title \ set window title
! init-screen \ show console
! get-commandline \ copy commandline to SOURCE
! default-application \ and run our app
! ;
! previous
! \ override default-hello with our own one
! ' strek-hello is default-hello
! \ and create the turnkey app.
! &forthdir count &appdir place
0 0 ' strek APPLICATION StarTrek.exe
1 pause-seconds bye
--- 1555,1569 ----
;
! \ create an application that runs in the console
! create-turnkey? [IF]
! \ override default-hello to start
! in-console \ the application in a visible console
! \ create the application
! &forthdir count &appdir place \ in the Forth-directory
0 0 ' strek APPLICATION StarTrek.exe
+
1 pause-seconds bye
Index: tetris.f
===================================================================
RCS file: /cvsroot/win32forth/win32forth/apps/Console-Games/tetris.f,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** tetris.f 13 Aug 2008 11:40:41 -0000 1.2
--- tetris.f 16 Aug 2008 13:31:24 -0000 1.3
***************
*** 390,395 ****
forth definitions
: tt \ --- ; play the tetris game
! initialize
s" Press any key " bottom-msg key drop draw-bottom
begin
--- 390,398 ----
forth definitions
+ : set-console-title ( -- )
+ Z" Tetris" CONHNDL call SetWindowText drop ;
+
: tt \ --- ; play the tetris game
! set-console-title initialize
s" Press any key " bottom-msg key drop draw-bottom
begin
***************
*** 403,438 ****
! \ create a turnkey application
create-turnkey? [IF]
! : set-console-title ( -- )
! Z" Tetris" CONHNDL call SetWindowText drop ;
!
! also hidden
!
! : tetris-hello ( -- ) \ startup stuff
!
! \ default initialization (needed for all turnkey apps)
! initialization-chain do-chain
! init-console drop
! exception@ if bye then
! unset-except set-except \ exception handling needs to be set after the console is started
!
! \ our own initialization
! menu-off \ close menubar
! HideStatusBar: ConsoleWindow \ close the statusbar
! set-console-title \ set window title
! init-screen \ show console
! get-commandline \ copy commandline to SOURCE
! default-application \ and run our app
! ;
!
! previous
!
! \ override default-hello with our own one
! ' tetris-hello is default-hello
! \ and create the turnkey app.
! &forthdir count &appdir place
0 0 ' tt APPLICATION tetris.exe
1 pause-seconds bye
--- 406,417 ----
! \ create an application in the console
create-turnkey? [IF]
! \ override default-hello to start
! in-console \ the application in a visible console
! \ create the application
! &forthdir count &appdir place \ in the Forth-directory
0 0 ' tt APPLICATION tetris.exe
1 pause-seconds bye
|