Example #1
0
def update():
    global X
    global Y
    global LAST_X
    global LAST_Y

    X = numbers.clip(X, X_MIN, X_MAX)
    Y = numbers.clip(Y, Y_MIN, Y_MAX)

    _zone = zones.ZONES[zones.ACTIVE_ZONE]

    display.set_surface_camera("tiles", X, Y)
    display.reset_surface_shaders("tiles")

    if world_action.FADE_VALUE < 255:
        display.apply_surface_shader(
            "tiles", zones.get_active_fader(), constants.MAP_VIEW_WIDTH, constants.MAP_VIEW_HEIGHT
        )

    for shader in _zone["shaders"]:
        display.apply_surface_shader("tiles", shader, constants.MAP_VIEW_WIDTH, constants.MAP_VIEW_HEIGHT)

    display.blit_surface_viewport("tiles", X, Y, constants.MAP_VIEW_WIDTH, constants.MAP_VIEW_HEIGHT)

    LAST_X = X
    LAST_Y = Y
Example #2
0
def _fade_out():
	global FADE_VALUE
	
	FADE_VALUE = numbers.clip(FADE_VALUE - FADE_STEP, 0, 255)
	
	_fader = zones.get_active_fader()
	_fader[0] = _fader[0].clip(0, 0)
	_fader[0] += FADE_VALUE / 255.0
	_fader[1] = _fader[1].clip(0, 0)
	_fader[1] += FADE_VALUE / 255.0
	_fader[2] = _fader[2].clip(0, 0)
	_fader[2] += FADE_VALUE / 255.0
Example #3
0
def _fade_out():
    global FADE_VALUE

    FADE_VALUE = numbers.clip(FADE_VALUE - FADE_STEP, 0, 255)

    _fader = zones.get_active_fader()
    _fader[0] = _fader[0].clip(0, 0)
    _fader[0] += FADE_VALUE / 255.0
    _fader[1] = _fader[1].clip(0, 0)
    _fader[1] += FADE_VALUE / 255.0
    _fader[2] = _fader[2].clip(0, 0)
    _fader[2] += FADE_VALUE / 255.0
Example #4
0
def update():
	global X
	global Y	
	global LAST_X
	global LAST_Y
	
	X = numbers.clip(X, X_MIN, X_MAX)
	Y = numbers.clip(Y, Y_MIN, Y_MAX)
	
	_zone = zones.ZONES[zones.ACTIVE_ZONE]
	
	display.set_surface_camera('tiles', X, Y)
	display.reset_surface_shaders('tiles')
	
	if world_action.FADE_VALUE < 255:
		display.apply_surface_shader('tiles', zones.get_active_fader(), constants.MAP_VIEW_WIDTH, constants.MAP_VIEW_HEIGHT)
	
	for shader in _zone['shaders']:
		display.apply_surface_shader('tiles', shader, constants.MAP_VIEW_WIDTH, constants.MAP_VIEW_HEIGHT)
	
	display.blit_surface_viewport('tiles', X, Y, constants.MAP_VIEW_WIDTH, constants.MAP_VIEW_HEIGHT)
	
	LAST_X = X
	LAST_Y = Y