Cleaned up evolution method definitions, rewrote the "Fill Bag" Debug feature to make it much faster, removed all instances of changing the game window's title

This commit is contained in:
Maruno17
2021-07-22 22:46:43 +01:00
parent d21d3cb1fd
commit cb0220b751
15 changed files with 89 additions and 98 deletions

View File

@@ -9,21 +9,21 @@ class ClippableSprite < Sprite_Character
super
@_src_rect = self.src_rect
tmright = @tilemap.map_data.xsize*Game_Map::TILE_WIDTH-@tilemap.ox
echoln("x=#{self.x},ox=#{self.ox},tmright=#{tmright},tmox=#{@tilemap.ox}")
echoln "x=#{self.x},ox=#{self.ox},tmright=#{tmright},tmox=#{@tilemap.ox}"
if @tilemap.ox-self.ox<-self.x
# clipped on left
diff = -self.x-@tilemap.ox+self.ox
self.src_rect = Rect.new(@_src_rect.x+diff,@_src_rect.y,
@_src_rect.width-diff,@_src_rect.height)
echoln("clipped out left: #{diff} #{@tilemap.ox-self.ox} #{self.x}")
echoln "clipped out left: #{diff} #{@tilemap.ox-self.ox} #{self.x}"
elsif tmright-self.ox<self.x
# clipped on right
diff = self.x-tmright+self.ox
self.src_rect = Rect.new(@_src_rect.x,@_src_rect.y,
@_src_rect.width-diff,@_src_rect.height)
echoln("clipped out right: #{diff} #{tmright+self.ox} #{self.x}")
echoln "clipped out right: #{diff} #{tmright+self.ox} #{self.x}"
else
echoln("-not- clipped out left: #{diff} #{@tilemap.ox-self.ox} #{self.x}")
echoln "-not- clipped out left: #{diff} #{@tilemap.ox-self.ox} #{self.x}"
end
end
end