home *** CD-ROM | disk | FTP | other *** search
- /*
- ** GetModeID.adpro
- **
- ** $VER: GetModeID.adpro 1.0.0 (12.1.94)
- **
- ** This REXX program is used to get the ModeID of a particular screen mode.
- ** This is particularly useful when used with the ADPro Get & Set screen mode
- ** rexx commands which require a screen mode ID. This will also get mode IDs
- ** for third party graphics cards supported through ADPro's render libraries.
- **
- ** This the screen mode requestor will only show currently available screen modes.
- **
- ** RTG boards that provide color mapped modes that emulate the Workbench will
- ** be shown as using the Amiga render library.
- **
- ** This script requires ADPro v2.5.0 (or higher).
- **
- ** Copyright © 1994 ASDG, Incorporated
- ** All Rights Reserved
- */
-
-
- ADDRESS "ADPro"
- OPTIONS RESULTS
-
- NL = '0A'X
- SQ = '27'X
- DQ = '22'X
- TRUE = 1
- FALSE = 0
- TempDefaults = "T:TempADProDefaults"
-
-
- /*
- ** Save the current environment.
- */
-
- SAVE_DEFAULTS TempDefaults
-
-
- /*
- ** Get a screen mode requestor
- */
-
- continue = TRUE
- DO WHILE (continue = TRUE)
- ADPRO_TO_FRONT
-
- GET_SCREEN_MODE '"Select a screen mode"' Amiga "XXX" 320 200 4
- ScreenMode = ADPRO_RESULT
- IF (RC ~= 0) THEN DO
- ADPRO_TO_FRONT
- OKAY1 "Could not get screen modes."
- CALL ErrorOut 10
- END
-
- PARSE VAR ScreenMode RenderLib ModeID Width Height Depth
-
- text = "Selected screen mode information:" || NL || NL||,
- "Render Library = " || RenderLib || NL ||,
- "Mode ID = " || ModeID || NL ||,
- "Width = " || Width || NL ||,
- "Height = " || Height || NL ||,
- "Depth = " || Depth
-
- OKAYN '"GetScreenModeID.adpro"' '"'text'"' '"Check another mode...|Cancel"'
- IF (RC = 0) THEN DO
- ADPRO_TO_FRONT
- OKAY1 "Process aborted."
- CALL ErrorOut 10
- END
-
- ELSE IF (RC = 1) THEN
- continue = TRUE
- END
-
- CALL ErrorOut 0
-
-
- ErrorOut:
- PARSE ARG ExitCode
-
- IF (EXISTS( TempDefaults )) THEN DO
- LOAD_DEFAULTS TempDefaults
- IF (RC ~= 0) THEN DO
- ADPRO_TO_FRONT
- OKAY1 "Error restoring settings."
- END
-
- ADDRESS COMMAND "Delete >NIL:" TempDefaults
- END
-
- EXIT ExitCode
-