Finishing footsplashes for the water room.
With these scripts the map properly loops and the footsplashes do as well. Footsplashes were also made bigger.
This commit is contained in:
parent
2e73c99b8a
commit
d403608189
|
|
@ -31,6 +31,19 @@ module Script
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.fix_footsplashes(xDelta, yDelta)
|
||||||
|
$scene.fix_footsplashes(xDelta, yDelta)
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.move_player_relative(x, y)
|
||||||
|
$game_player.x += x
|
||||||
|
$game_player.y += y
|
||||||
|
$game_player.real_x += x * 4 * 32
|
||||||
|
$game_player.real_y += y * 4 * 32
|
||||||
|
$game_map.display_x += x * 4 * 32
|
||||||
|
$game_map.display_y += y * 4 * 32
|
||||||
|
end
|
||||||
|
|
||||||
def self.eve_x(name)
|
def self.eve_x(name)
|
||||||
for event in $game_map.events.values
|
for event in $game_map.events.values
|
||||||
if event.name == name
|
if event.name == name
|
||||||
|
|
|
||||||
|
|
@ -25,4 +25,11 @@ class Sprite_Footprint < Sprite
|
||||||
dispose
|
dispose
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def correctX(xDelta)
|
||||||
|
@real_x += xDelta*4*32
|
||||||
|
end
|
||||||
|
def correctY(yDelta)
|
||||||
|
@real_y += yDelta*4*32
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -2,17 +2,28 @@ class Sprite_Footsplash < Sprite
|
||||||
def initialize(viewport, direction, x, y)
|
def initialize(viewport, direction, x, y)
|
||||||
|
|
||||||
super(viewport)
|
super(viewport)
|
||||||
y = y + 1
|
y = y + 2
|
||||||
@direction = direction
|
@direction = direction
|
||||||
@real_x = x * 4 * 32
|
@real_x = x * 4 * 32
|
||||||
@real_y = y * 4 * 32
|
@real_y = y * 4 * 32
|
||||||
|
|
||||||
self.zoom_x = 1
|
case direction
|
||||||
self.zoom_y = 1
|
when 2
|
||||||
self.ox = 48
|
@real_y -= 32
|
||||||
self.oy = 96
|
when 4
|
||||||
|
@real_x += 32
|
||||||
|
when 6
|
||||||
|
@real_x -= 32
|
||||||
|
when 8
|
||||||
|
@real_y += 32
|
||||||
|
end
|
||||||
|
|
||||||
|
self.zoom_x = 2
|
||||||
|
self.zoom_y = 2
|
||||||
|
self.ox = 40
|
||||||
|
self.oy = 80
|
||||||
self.bitmap = RPG::Cache.misc('foot_splash')
|
self.bitmap = RPG::Cache.misc('foot_splash')
|
||||||
self.src_rect.set(0, 0, 96, 96)
|
self.src_rect.set(0, 0, 80, 80)
|
||||||
update
|
update
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -23,12 +34,19 @@ class Sprite_Footsplash < Sprite
|
||||||
self.y = (@real_y - $game_map.display_y + 3) / 4 + 32
|
self.y = (@real_y - $game_map.display_y + 3) / 4 + 32
|
||||||
|
|
||||||
self.opacity -= 6
|
self.opacity -= 6
|
||||||
frameIndex = 12 - (self.opacity / 21)
|
frameIndex = 20 - (self.opacity / 13)
|
||||||
frameX = frameIndex % 4
|
frameX = frameIndex % 4
|
||||||
frameY = frameIndex / 4
|
frameY = frameIndex / 4
|
||||||
self.src_rect.set(96*frameX, 96*frameY, 96, 96)
|
self.src_rect.set(80*frameX, 80*frameY, 80, 80)
|
||||||
if self.opacity == 0
|
if self.opacity == 0
|
||||||
dispose
|
dispose
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def correctX(xDelta)
|
||||||
|
@real_x += xDelta*4*32
|
||||||
|
end
|
||||||
|
def correctY(yDelta)
|
||||||
|
@real_y += yDelta*4*32
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -354,4 +354,10 @@ class Spriteset_Map
|
||||||
def new_footsplash(direction, x, y)
|
def new_footsplash(direction, x, y)
|
||||||
@footprint_sprites << Sprite_Footsplash.new(@viewport, direction, x, y)
|
@footprint_sprites << Sprite_Footsplash.new(@viewport, direction, x, y)
|
||||||
end
|
end
|
||||||
|
def fix_footsplashes(x, y)
|
||||||
|
for footprint in @footprint_sprites
|
||||||
|
footprint.correctX(x)
|
||||||
|
footprint.correctY(y)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue