|
|
@ -1,15 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SCREEN_HEIGHT = 600
|
|
|
|
SCREEN_HEIGHT = 600
|
|
|
|
SCREEN_WIDTH = 800
|
|
|
|
SCREEN_WIDTH = 800
|
|
|
|
|
|
|
|
|
|
|
|
SCREEN_SIZE = (SCREEN_WIDTH,SCREEN_HEIGHT)
|
|
|
|
SCREEN_SIZE = (SCREEN_WIDTH,SCREEN_HEIGHT)
|
|
|
|
|
|
|
|
|
|
|
|
ORIGINAL_CAPTION = "Super Mario Bros 1-1"
|
|
|
|
ORIGINAL_CAPTION = "Super Mario Bros 1-1"
|
|
|
|
|
|
|
|
|
|
|
|
## COLORS ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# R G B
|
|
|
|
|
|
|
|
GRAY = (100, 100, 100)
|
|
|
|
GRAY = (100, 100, 100)
|
|
|
|
NAVYBLUE = ( 60, 60, 100)
|
|
|
|
NAVYBLUE = ( 60, 60, 100)
|
|
|
|
WHITE = (255, 255, 255)
|
|
|
|
WHITE = (255, 255, 255)
|
|
|
@ -26,31 +19,22 @@ BLACK = ( 0, 0, 0)
|
|
|
|
NEAR_BLACK = ( 19, 15, 48)
|
|
|
|
NEAR_BLACK = ( 19, 15, 48)
|
|
|
|
COMBLUE = (233, 232, 255)
|
|
|
|
COMBLUE = (233, 232, 255)
|
|
|
|
GOLD = (255, 215, 0)
|
|
|
|
GOLD = (255, 215, 0)
|
|
|
|
|
|
|
|
|
|
|
|
BGCOLOR = WHITE
|
|
|
|
BGCOLOR = WHITE
|
|
|
|
|
|
|
|
|
|
|
|
SIZE_MULTIPLIER = 2.5
|
|
|
|
SIZE_MULTIPLIER = 2.5
|
|
|
|
BRICK_SIZE_MULTIPLIER = 2.69
|
|
|
|
BRICK_SIZE_MULTIPLIER = 2.69
|
|
|
|
BACKGROUND_MULTIPLER = 2.679
|
|
|
|
BACKGROUND_MULTIPLER = 2.679
|
|
|
|
GROUND_HEIGHT = SCREEN_HEIGHT - 62
|
|
|
|
GROUND_HEIGHT = SCREEN_HEIGHT - 62
|
|
|
|
|
|
|
|
|
|
|
|
#MARIO FORCES
|
|
|
|
|
|
|
|
WALK_ACCEL = .15
|
|
|
|
WALK_ACCEL = .15
|
|
|
|
RUN_ACCEL = 20
|
|
|
|
RUN_ACCEL = 20
|
|
|
|
SMALL_TURNAROUND = .35
|
|
|
|
SMALL_TURNAROUND = .35
|
|
|
|
|
|
|
|
|
|
|
|
GRAVITY = 1.01
|
|
|
|
GRAVITY = 1.01
|
|
|
|
JUMP_GRAVITY = .31
|
|
|
|
JUMP_GRAVITY = .31
|
|
|
|
JUMP_VEL = -10
|
|
|
|
JUMP_VEL = -10
|
|
|
|
FAST_JUMP_VEL = -12.5
|
|
|
|
FAST_JUMP_VEL = -12.5
|
|
|
|
MAX_Y_VEL = 11
|
|
|
|
MAX_Y_VEL = 11
|
|
|
|
|
|
|
|
|
|
|
|
MAX_RUN_SPEED = 800
|
|
|
|
MAX_RUN_SPEED = 800
|
|
|
|
MAX_WALK_SPEED = 6
|
|
|
|
MAX_WALK_SPEED = 6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Mario States
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
STAND = 'standing'
|
|
|
|
STAND = 'standing'
|
|
|
|
WALK = 'walk'
|
|
|
|
WALK = 'walk'
|
|
|
|
JUMP = 'jump'
|
|
|
|
JUMP = 'jump'
|
|
|
@ -61,21 +45,17 @@ BIG_TO_SMALL = 'big to small'
|
|
|
|
FLAGPOLE = 'flag pole'
|
|
|
|
FLAGPOLE = 'flag pole'
|
|
|
|
WALKING_TO_CASTLE = 'walking to castle'
|
|
|
|
WALKING_TO_CASTLE = 'walking to castle'
|
|
|
|
END_OF_LEVEL_FALL = 'end of level fall'
|
|
|
|
END_OF_LEVEL_FALL = 'end of level fall'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#GOOMBA Stuff
|
|
|
|
#GOOMBA Stuff
|
|
|
|
|
|
|
|
|
|
|
|
LEFT = 'left'
|
|
|
|
LEFT = 'left'
|
|
|
|
RIGHT = 'right'
|
|
|
|
RIGHT = 'right'
|
|
|
|
JUMPED_ON = 'jumped on'
|
|
|
|
JUMPED_ON = 'jumped on'
|
|
|
|
DEATH_JUMP = 'death jump'
|
|
|
|
DEATH_JUMP = 'death jump'
|
|
|
|
|
|
|
|
|
|
|
|
#KOOPA STUFF
|
|
|
|
#KOOPA STUFF
|
|
|
|
|
|
|
|
|
|
|
|
SHELL_SLIDE = 'shell slide'
|
|
|
|
SHELL_SLIDE = 'shell slide'
|
|
|
|
|
|
|
|
|
|
|
|
#BRICK STATES
|
|
|
|
#BRICK STATES
|
|
|
|
|
|
|
|
|
|
|
|
RESTING = 'resting'
|
|
|
|
RESTING = 'resting'
|
|
|
|
BUMPED = 'bumped'
|
|
|
|
BUMPED = 'bumped'
|
|
|
|
|
|
|
|
|
|
|
@ -83,42 +63,28 @@ BUMPED = 'bumped'
|
|
|
|
OPENED = 'opened'
|
|
|
|
OPENED = 'opened'
|
|
|
|
|
|
|
|
|
|
|
|
#MUSHROOM STATES
|
|
|
|
#MUSHROOM STATES
|
|
|
|
|
|
|
|
|
|
|
|
REVEAL = 'reveal'
|
|
|
|
REVEAL = 'reveal'
|
|
|
|
SLIDE = 'slide'
|
|
|
|
SLIDE = 'slide'
|
|
|
|
|
|
|
|
|
|
|
|
#COIN STATES
|
|
|
|
#COIN STATES
|
|
|
|
|
|
|
|
|
|
|
|
SPIN = 'spin'
|
|
|
|
SPIN = 'spin'
|
|
|
|
|
|
|
|
|
|
|
|
#STAR STATES
|
|
|
|
#STAR STATES
|
|
|
|
|
|
|
|
|
|
|
|
BOUNCE = 'bounce'
|
|
|
|
BOUNCE = 'bounce'
|
|
|
|
|
|
|
|
|
|
|
|
#FIRE STATES
|
|
|
|
#FIRE STATES
|
|
|
|
|
|
|
|
|
|
|
|
FLYING = 'flying'
|
|
|
|
FLYING = 'flying'
|
|
|
|
BOUNCING = 'bouncing'
|
|
|
|
BOUNCING = 'bouncing'
|
|
|
|
EXPLODING = 'exploding'
|
|
|
|
EXPLODING = 'exploding'
|
|
|
|
|
|
|
|
|
|
|
|
#Brick and coin box contents
|
|
|
|
#Brick and coin box contents
|
|
|
|
|
|
|
|
|
|
|
|
MUSHROOM = 'mushroom'
|
|
|
|
MUSHROOM = 'mushroom'
|
|
|
|
STAR = 'star'
|
|
|
|
STAR = 'star'
|
|
|
|
FIREFLOWER = 'fireflower'
|
|
|
|
FIREFLOWER = 'fireflower'
|
|
|
|
SIXCOINS = '6coins'
|
|
|
|
SIXCOINS = '6coins'
|
|
|
|
COIN = 'coin'
|
|
|
|
COIN = 'coin'
|
|
|
|
LIFE_MUSHROOM = '1up_mushroom'
|
|
|
|
LIFE_MUSHROOM = '1up_mushroom'
|
|
|
|
|
|
|
|
|
|
|
|
FIREBALL = 'fireball'
|
|
|
|
FIREBALL = 'fireball'
|
|
|
|
|
|
|
|
|
|
|
|
#LIST of ENEMIES
|
|
|
|
#LIST of ENEMIES
|
|
|
|
|
|
|
|
|
|
|
|
GOOMBA = 'goomba'
|
|
|
|
GOOMBA = 'goomba'
|
|
|
|
KOOPA = 'koopa'
|
|
|
|
KOOPA = 'koopa'
|
|
|
|
|
|
|
|
|
|
|
|
#LEVEL STATES
|
|
|
|
#LEVEL STATES
|
|
|
|
|
|
|
|
|
|
|
|
FROZEN = 'frozen'
|
|
|
|
FROZEN = 'frozen'
|
|
|
|
NOT_FROZEN = 'not frozen'
|
|
|
|
NOT_FROZEN = 'not frozen'
|
|
|
|
IN_CASTLE = 'in castle'
|
|
|
|
IN_CASTLE = 'in castle'
|
|
|
|