;******************************************************************************
;            (C) Copyright 1992-1995, Radius, Inc. and Atari Corp.
; Secret and confidential                                   All rights reserved
;******************************************************************************
; This source code and any compilation or derivative thereof is the joint
; property of Radius, Inc. and Atari Corp.  This code is provided pursuant
; to a Software License Agreement and/or Software Development Contract.  This
; code is the proprietary information of Radius, Inc. and Atari Corp. and is
; confidential in nature.  Its use and dissemination by any party other than
; Atari Corp. are strictly limited by the confidential information provisions
; of the Agreement or Contract referenced above.
;******************************************************************************
; 100 12 Sep 95 JPE     Initial revision.
; 101 05 Oct 95 JPE     Font colors added. Alternate subtitle bit added.
;                       System configuration parameters added.
; 102 24 Oct 95 JPE     Added NODE attribute, removed SHOT attribute. Added
;                       MAX_FILMS definition. Added grey colors.
; 103 08 Nov 95 JPE     Added masks for inclusion/exclusion of UP, DOWN and
;                       PAUSE keys. Added volume control parameters. Added
;                       NEITHER option for subtitle/voiceover.
; 104 21 Nov 95 JPE     Cleaned up bit assignments in attributes flag.
; 105 10 Jan 96 JPE     Added code scan bit to joy semaphore. Removed ADAPT,
;                       COMPLEX, END_PATH, SEX, VIOLENCE and VIEWED bits from
;                       film attributes. Added rule definitions. Eliminated
;                       SNGL_LEAD, SUSPEND and PASS_ZERO hacks.
; 106 16 Feb 96 JPE     Eliminated END_PATH and NODE hacks.
;******************************************************************************

; Bit definitions in attributes flag.

bLEADIN     .equ    0
bLOOP       .equ    2
bLEADOUT    .equ    3
bSCENE      .equ    4
bSPECIAL    .equ    6
bCONTROL    .equ    7

; Binary representations of previous.

LEADIN      .equ    (1<<bLEADIN)
LOOP        .equ    (1<<bLOOP)
LEADOUT     .equ    (1<<bLEADOUT)
SCENE       .equ    (1<<bSCENE)         ; Film segment is a SCENE
SPECIAL     .equ    (1<<bSPECIAL)       ; Special film case
CONTROL     .equ    (1<<bCONTROL)       ; Control element

; Special film RULE definitions.

SKIP        .equ    1                   ; Skip on redundant path
HYPER       .equ    2                   ; Hypermode (run-run, think-think)

; Control element TYPE definitions.

BURN        .equ    1                   ; Match, burn, then default
COUNT       .equ    2                   ; Count, burn, then default
SWITCH      .equ    3                   ; Find best match
CENSOR      .equ    4                   ; Exercise parental control
RELAY       .equ    5                   ; Signal determines selection
CHANGE      .equ    6                   ; Change disks

MAX_CTRL    .equ    4                   ; Maximum unresolved controls

; Color masks for subtitles.

BLACK       .equ    $0000               ; 00000 00000 000000
RED         .equ    $f800               ; 11111 00000 000000
BLUE        .equ    $07c0               ; 00000 11111 000000
GREEN       .equ    $003f               ; 00000 00000 111111
MAGENTA     .equ    RED+BLUE            ; 11111 11111 000000
YELLOW      .equ    RED+GREEN           ; 11111 00000 111111
CYAN        .equ    BLUE+GREEN          ; 00000 11111 111111
GREY34      .equ    $c630               ; 11000 11000 110000
GREY78      .equ    $e738               ; 11100 11100 111000
WHITE       .equ    $ffff               ; 11111 11111 111111

; Bits in return code from GetAny().

bOPTION     .equ    1                   ; Option
bC          .equ    3                   ; C
bB          .equ    5                   ; B
bPAUSE      .equ    6                   ; Pause
bA          .equ    7                   ; A
bPOUND      .equ    8                   ; #
bNINE       .equ    9                   ; 9
bSIX        .equ    10                  ; 6
bTHREE      .equ    11                  ; 3
bZERO       .equ    12                  ; 0
bEIGHT      .equ    13                  ; 8
bFIVE       .equ    14                  ; 5
bTWO        .equ    15                  ; 6
bSTAR       .equ    16                  ; *
bSEVEN      .equ    17                  ; 7
bFOUR       .equ    18                  ; 4
bONE        .equ    19                  ; 1
bUP         .equ    20                  ; Up
bDOWN       .equ    21                  ; Down
bLEFT       .equ    22                  ; Left
bRIGHT      .equ    23                  ; Right

VOLUME      .equ    (1<<bUP)+(1<<bDOWN) ; UP or DOWN (Volume control keys)
EXCEPT      .equ    VOLUME+(1<<bPAUSE)  ; VOLUME or PAUSE

; Parameters used for volume control.

MAX_VOL     .equ    16                  ; 33 entries
MIN_VOL     .equ    -16                 ; -16 <= index <= 16

; Bits in joypad sample semaphore.

bNORMAL     .equ    0                   ; Normal keypress
bVOLUME     .equ    1                   ; Volume (UP/DOWN)
bSCAN       .equ    2                   ; Code scan (#/* & numbers)

;------------------------------------------------------------------------------
; The following constants are used for Boolean flags.

FALSE       .equ    0
TRUE        .equ    1

;------------------------------------------------------------------------------
; The following constants are used to set the 'cueOption' flag.

SUBTITLES   .equ    1
VOICEOVER   .equ    2
SUB_VOICE   .equ    3
NEITHER     .equ    4

;------------------------------------------------------------------------------
; The following constants are used to set the 'difficulty' flag.

EASY        .equ    1
MEDIUM      .equ    2
HARD        .equ    3

;------------------------------------------------------------------------------
; The following constants are used to set the 'jogMode' flag.

REVIEW      .equ    1                   ; Review entire path
JUMP        .equ    2                   ; Jump to last branch point

;------------------------------------------------------------------------------
; The following constants are used to set the value returned by the
; EndPath() and ConfigSys() routines.

NOTHING     .equ    0
RESTART     .equ    1
CONTINUE    .equ    2
PLAYBACK    .equ    3
QUIT        .equ    4

;------------------------------------------------------------------------------
; The following constant is used to reserve storage for the path record.

PATH_SIZE   .equ    50                  ; Maximum number of path decisions
