home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Zodiac Super OZ
/
MEDIADEPOT.ISO
/
FILES
/
13
/
N_B_V203.ZIP
/
GBOXSAVE.DMO
< prev
next >
Wrap
Text File
|
1996-07-04
|
4KB
|
108 lines
$if 0
┌──────────────────────────╖ PowerBASIC v3.20
┌──┤ DASoft ╟──────────────────────┬──────────────────╖
│ ├──────────────────────────╢ Copyright 1995 │ DATE: 1996-06-14 ╟─╖
│ │ FILE NAME GBOXSAVE.DMO ║ by ╘════════════════─ ║ ║
│ │ ║ Don Schullian, Jr. ║ ║
│ ╘══════════════════════════╝ ║ ║
│ A license is hereby granted to the holder to use this source code in ║ ║
│ any program, commercial or otherwise, without receiving the express ║ ║
│ permission of the copyright holder and without paying any royalties, ║ ║
│ as long as this code is not distributed in any compilable format. ║ ║
│ IE: source code files, PowerBASIC Unit files, and printed listings ║ ║
╘═╤═════════════════════════════════════════════════════════════════════╝ ║
│ .................................... ║
╘═══════════════════════════════════════════════════════════════════════╝
$endif
'.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°
' ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °
%ENTER_key = &h000D : %ESC_key = &h001B : %SPACE_key = &h0020
%HOME_key = &h4700 : %UP_key = &h4800 : %PGUP_key = &h4900
%LEFT_key = &h4B00 : : %RIGHT_key = &h4D00
%END_key = &h4F00 : %DOWN_key = &h5000 : %PGDN_key = &h5100
%CTRL_HOME = &h7700 : %CTRL_UP = &h8D00 : %CTRL_PGUP = &h8400
%CTRL_LEFT = &h7300 : : %CTRL_RIGHT = &h7400
%CTRL_END = &h7500 : %CTRL_DOWN = &h9100 : %CTRL_PGDN = &h7600
$INCLUDE "DAS-NB01.INC"
$INCLUDE "DAS-NB02.INC"
$INCLUDE "DAS-NBV1.INC"
$INCLUDE "DAS-NBV2.INC"
CLS
SCREEN 12
GraphicSetup
'TempFile% = fGwndoSETUP%( "", 9 ) ' this really isn't necessary
'IF TempFile% = 0 THEN GOTO BYEBYE ' but can be used
FOR Col% = 0 TO 639 STEP 40
Rcol% = Col% + 39
FOR Row% = 0 TO 479 STEP 40
INCR Attr?
IF Attr? = 16 THEN Attr? = 1
Brow% = Row% + 39
GBoxDRAW Col%,Row%,Rcol%,Brow%,0,3,15
PAINT (Col%+2, Row%+2), Attr?, 15
NEXT
NEXT
GBoxDRAW 1, 1, 638, 478, 0, 3, 15
Wndo% = fGBoxSAVE%( 8, 16, 250, 111 )
GBoxBEVEL 8, 16, 250, 111, 5, 0, 7, 8
GBoxDRAW 8, 16, 250, 111, 0, 3, 0
LOCATE 3, 4 : PRINT "This is a movable test box."
LOCATE 4, 4 : PRINT "Use the arrow keys to move."
LOCATE 5, 4 : PRINT " PRESS <SPACE> TO PLACE "
LOCATE 6, 4 : PRINT " PRESS <ESC> TO QUIT "
Lcol% = 8 : MaxX% = 398 : X% = 0
Trow% = 16 : MaxY% = 384 : Y% = 0
DO
IF X% <> 0 THEN
INCR Lcol%, X%
Lcol% = MIN%( MaxX%, MAX%( 1, Lcol% ) )
X% = 0
END IF
IF Y% <> 0 THEN
INCR Trow%, Y%
Trow% = MIN%( MaxY%, MAX%( 1, Trow% ) )
Y% = 0
END IF
Rcol% = Lcol% + 242
Brow% = Trow% + 95
GBOXdraw Lcol%, Trow%, Rcol%, Brow%, &hCCCC, 2, 15
G% = fAnyKey%
GBOXdraw Lcol%, Trow%, Rcol%, Brow%, &hCCCC, 2, 15
SELECT CASE G%
CASE %HOME_key , 55 : Y% = -1 : X% = -1
CASE %UP_key , 56 : Y% = -1
CASE %PGUP_key , 57 : Y% = -1 : X% = +1
CASE %RIGHT_key, 54 : X% = +1
CASE %LEFT_key , 52 : X% = -1
CASE %END_key , 49 : Y% = +1 : X% = -1
CASE %DOWN_key , 50 : Y% = +1
CASE %PGDN_key , 51 : Y% = +1 : X% = +1
CASE %CTRL_HOME : Y% = -5 : X% = -5
CASE %CTRL_UP : Y% = -5
CASE %CTRL_PGUP : Y% = -5 : X% = +5
CASE %CTRL_LEFT : X% = -5
CASE %CTRL_RIGHT : X% = +5
CASE %CTRL_END : Y% = +5 : X% = -5
CASE %CTRL_DOWN : Y% = +5
CASE %CTRL_PGDN : Y% = +5 : X% = +5
CASE %ENTER_key : GBoxMOVE Lcol%, Trow%, -Wndo%
CASE %SPACE_key : GboxMOVE Lcol%, Trow%, +Wndo%
CASE %ESC_key : EXIT LOOP
GBoxREST -1, -1, 0
END SELECT
LOOP
BYEBYE:
CLS
GwndoCLOSE
SCREEN 0
END