;------------------------------------------------------------------------
                TITLE     Homework assignment #3 - Final Project.
; Team Members A. Bukharovich and D. Urusov
;------------------------------------------------------------------------
EXTRN   GetReady:Near
EXTRN   Game:Near
EXTRN   GameOver:Near
EXTRN   MeetUser:Near

PUBLIC  CR,LF
PUBLIC  BLUE,GREEN,CYAN,RED,PURPLE,BROWN,WHITE,GRAY,LIGHT_BLUE
PUBLIC  LIGHT_GREEN, LIGHT_CYAN, LIGHT_RED, LIGHT_MAGENTA, YELLOW, INT_WHITE
PUBLIC  n_buildings, buildings, buildings_p
PUBLIC  score, buildings_hit
PUBLIC  end_game_code

        .MODEL SMALL
        .STACK 100h

INCLUDE MY_MACRO.LIB            ; File with common used macros
INCLUDE GRAPHS.LIB              ; Basic graphic routines
INCLUDE IMAGES.LIB              ; Drawing/hiding images

        .DATA
;-------------------------DATA SEGMENT----------------------------------
    CR      EQU     13              ; Carriage return
    LF      EQU     10              ; End of line

    BLUE                DB     1     ; 
    GREEN               DB     2     ;
    CYAN                DB     3     ;  colors
    RED                 DB     4     ;    we will
    PURPLE              DB     5     ;         use
    BROWN               DB     6     ;
    WHITE               DB     7     ;
    GRAY                DB     8     ;
    LIGHT_BLUE          DB     9     ; Will be used as a background color
    LIGHT_GREEN         DB     10    ;
    LIGHT_CYAN          DB     11    ;
    LIGHT_RED           DB     12    ;
    LIGHT_MAGENTA       DB     13    ;
    YELLOW              DB     14    ;
    INT_WHITE           DB     15    ;

    buildings    DW      10  DUP (0)          ; X - coordinates of buildings
    buildings_p  DW      10  DUP (1)          ; Presence of building bits

    buildings_hit       DB      0             ; Number of buildings hit
    n_buildings         DB      0             ; Total number of buildings
    score               DW      0             ; score for bombs and planes 
    end_game_code       DB      0              ; How the game ended.     
;-------------------------CODE SEGMENT----------------------------------
        .CODE
MAIN    PROC

        mov     ax,@DATA        ;Initialize Data Segment
        mov     ds,ax
Call meetuser           ; Getting data frm user.
Call GetReady           ; Setting all objects on the screen
Call Game               ; The game itself.
Call GameOver           ; Showing scores, restoring screen mode etc.
        End_Prog
MAIN    ENDP                         ; End of MAIN procedure
        END MAIN                     ; End of code segment
