home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Zodiac Super OZ
/
MEDIADEPOT.ISO
/
FILES
/
13
/
N_B_V203.ZIP
/
CGB_ALL.DMO
< prev
next >
Wrap
Text File
|
1996-07-04
|
10KB
|
178 lines
$if 0
┌──────────────────────────╖ PowerBASIC v3.20
┌──┤ DASoft ╟──────────────────────┬──────────────────╖
│ ├──────────────────────────╢ Copyright 1995 │ DATE: 1995-10-01 ╟─╖
│ │ FILE NAME CGB_ALL .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
'.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°
' ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °
'┌────────────────────────────────
$INCLUDE "DAS-NB01.INC" '│
$INCLUDE "DAS-NB02.INC" '│
$INCLUDE "DAS-NBV1.INC" '│
$INCLUDE "DAS-NBV2.INC" '│
'│
%ALT_X = &h2D00 '│ CVI( CHR$(0,45) )
'│
CLS '│
IF fMouseSETUP?(0) = 0 THEN '│ gotta have a mouse
PRINT "CAN'T RUN THIS WITHOUT A MOUSE" '│
END '│
END IF '│
IF fDESQview% > 0 THEN '│ DESQview & DAC routines
PRINT "CAN'T RUN THIS WITH DESQ-VIEW" '│ collide some times
END '│
END IF '│
'│
SCREEN 12 '│ all systems <<GO>>
GraphicSETUP '│ set-up for DASoft's graphics
EventSETUP 1, 20 '│ set-up events
Blank$ = STRING$( 192, 63 ) '│ a flock of 63's for the DAC
DACwriteSTR Blank$ '│ eveything's white while we draw
'│
Mask$ = fMonoMask$( 94 ) '│ load a monochrome mask
Mask$ = fColorMask$( Mask$, 3, 8 ) '│ make it a 2color mask
PAINT (0,0), Mask$ '│ paint the whole screen
GBoxFFRAME 200, 5, 414, 42, 4, 9, 14, 0, 0 '│ title box
LOCATE 2, 28 '│
PRINT "Graphic Screen Clearing" '│
GBoxCOLOR2 200, 5, 414, 42, 0, 4 '│ re-color the background
'│
RESTORE DEMODATA '│ better safe than sorry
DIM E%(3,17) '│ our event array
A? = 0 '│
FOR E% = 1 TO 17 '│ read data & create the screen
READ M$, Trow?, Tcol? '│ msg and text addresses
FOR X% = 0 TO 3 '│ event box addresses
READ E%(X%,E%) '│
NEXT '│
IF E% = 17 THEN A? = 1 '│ box 17 is red
GBoxBEVELA E%(0,E%), 5, A?, A?+5, A?+10 '│ draw the box
LOCATE Trow?, Tcol? : PRINT M$ '│ print the message
NEXT '│
GBoxCOLOR2 E%(0,17),E%(1,17), _ '│ re-color the background again
E%(2,17),E%(3,17), 0, 1 '│
'│
DIM P0%(19201), P1%(19201) '│ arrays to save the screen
DIM P2%(19201), P3%(19201) '│ plane by plane
DIM P???(3) '│ pointers to the arrays so
P???(0) = VARPTR32( P0%(0) ) '│ we can put them into a loop
P???(1) = VARPTR32( P1%(0) ) '│
P???(2) = VARPTR32( P2%(0) ) '│
P???(3) = VARPTR32( P3%(0) ) '│
GOSUB SaveScreen '│ read screen data
E%(2,0) = 639 : E%(3,0) = 479 '│ whole screen is the event
fEventOpenG E%(0,0), 17 '│ open the event
fLoadDAScolor '│ re-color screen
MouseMakePtr "INVARROW" '│ new pointer for the rat
'│
DO '│ menu loop
MouseONnow '│
G% = fEventKey%( Hit%, CHR$(0,45) ) '│ await action!
MouseOFF '│ mouse off for now!
IF ( G% = %ALT_X ) OR _ '│ <ALT><X>
( Hit% = 17 ) THEN EXIT LOOP '│ <RED BUTTON>
SELECT CASE Hit% '│
CASE < 0 '│ no action on MOUSE DOWN
ITERATE '│
CASE 01 '│
ClearGBoxDN 0,0,639,479,0,Noise% '│
CASE 02 '│
ClearGBoxLF 0,0,639,479,0,Noise% '│
CASE 03 '│
ClearGBoxZIO 0,0,639,479,0,Noise% '│
CASE 04 '│
ClearGBoxDIO 0,0,639,479,0,Noise% '│
CASE 05 '│
ClearGBoxVBH 0,0,639,479,0,Noise% '│
CASE 06 '│
ClearGBoxDDN 0,0,639,479,0,Noise% '│
CASE 07 '│
ClearGBoxCLOCK 0,0,639,479,0,Noise% '│
CASE 08 '│
ClearGBoxUP 0,0,639,479,0,Noise% '│
CASE 09 '│
ClearGBoxRT 0,0,639,479,0,Noise% '│
CASE 10 '│
ClearGBoxZOI 0,0,639,479,0,Noise% '│
CASE 11 '│
ClearGBoxDOI 0,0,639,479,0,Noise% '│
CASE 12 '│
ClearGBoxVBV 0,0,639,479,0,Noise% '│
CASE 13 '│
ClearGBoxDUP 0,0,639,479,0,Noise% '│
CASE 14 '│
ClearGBoxSWEEP 0,0,639,479,0,Noise% '│
CASE 15 '│
ClearGBoxRND 0,0,639,479,0,Noise% '│
CASE 16 '│
Noise% = ( Noise% = 0 ) '│ change sound setting
LOCATE 18, 45 '│
IF Noise% THEN ? "N " ELSE ? "FF" '│ change message
GOSUB SaveScreen '│
ITERATE '│ no screen blanking
END SELECT '│
DELAY 1 '│ pause for effect
DACwriteSTR Blank$ '│ everything white again
FOR P? = 0 TO 3 '│ put the screen back
PutParr 0, 0, BYVAL P???(P?), 3, P? '│
NEXT '│
fLoadDAScolor '│ recolor the screen
LOOP '│
'│
CLS : PALETTE : SCREEN 0 '└─────────────────────────────────
END
' ═══════════════════════════════════════════════════════════════════════════
' ══════════ local stuff from here down ═════════════════════════════════════
' ═══════════════════════════════════════════════════════════════════════════
'┌────────────────────────────
FUNCTION fGetKey% () LOCAL PUBLIC '│ This is what fGetKey%
LOCAL G% '│ looks like when using
'│ fEventKey% the only
DO '│ difference is that its
IF INSTAT THEN G% = CVI(INKEY$ + CHR$(0)) '│ for kbrd and/or mouse
LOOP UNTIL ( G% <> 0 ) OR _ '│
( fMouseGetKey% <> 0 ) '│ change this to > 0
FUNCTION = G% '│ if you only want
'│ clicks
END FUNCTION '│
' ──────────────────────────────────────────────┼───────────────────────────
SAVESCREEN: '│
FOR P? = 0 TO 3 '│ read screen data
fGetParr 0, 0, 639, 479,BYVAL P???(P?),P? '│ from all 4 planes
NEXT '│
RETURN '│
' ──────────────────────────────────────────────┴───────────────────────────
' ──────── box data
' ──────────────────────────────────────────────────────────────────────────
DEMODATA:
DATA " Top to Bottom ", 07, 18, 122, 87, 291, 120
DATA " Left to Right ", 10, 12, 74, 135, 243, 168
DATA "Zoom Inside/Out B ", 13, 06, 26, 183, 195, 216
DATA "Zoom Inside/Out D ", 16, 04, 10, 231, 179, 264
DATA "Venetian Blinds H ", 19, 06, 26, 279, 195, 312
DATA "Diagonal Top/Down ", 22, 12, 74, 327, 243, 360
DATA " Single Sweep ", 25, 18, 122, 375, 291, 408
DATA " Bottom to Top ", 7, 46, 347, 87, 516, 120
DATA " Right to Left ", 10, 52, 395, 135, 564, 168
DATA "Zoom Outside/In B ", 13, 58, 443, 183, 614, 216
DATA "Zoom Outside/In D ", 16, 60, 459, 231, 628, 264
DATA "Venetian Blinds V ", 19, 58, 443, 279, 614, 312
DATA "Diagonal Bottom/Up", 22, 52, 395, 327, 564, 360
DATA " Double Sweep ", 25, 46, 347, 375, 516, 408
DATA " Random Blocks ", 14, 32, 235, 199, 404, 232
DATA " Sound is OFF ", 18, 32, 235, 263, 404, 296
DATA "Exit To DOS" , 29, 67, 514, 438, 629, 471