release 6.2

This commit is contained in:
infinitefusion
2024-06-28 12:01:39 -04:00
parent 0b9e83f554
commit 3a488c9ba6
7249 changed files with 713866 additions and 136365 deletions

View File

@@ -5,6 +5,7 @@ class BushBitmap
@isTile = isTile
@isBitmap = @bitmap.is_a?(Bitmap)
@depth = depth
@manual_refresh=false
end
def dispose
@@ -63,9 +64,8 @@ class Sprite_Character < RPG::Sprite
def initialize(viewport, character = nil)
super(viewport)
@character = character
if darknessEffectOnCurrentMap()
if @character.is_a?(Game_Event)
if @character.is_a?(Game_Event)
$game_map.events[@character.id].erase if event_is_trainer(@character)
end
end
@@ -79,6 +79,11 @@ class Sprite_Character < RPG::Sprite
update
end
def setSurfingPokemon(pokemonSpecies)
@surfingPokemon = pokemonSpecies
@surfbase.setPokemon(pokemonSpecies) if @surfbase
end
def groundY
return @character.screen_y_ground
end
@@ -100,13 +105,57 @@ class Sprite_Character < RPG::Sprite
super
end
def updateBitmap
@manual_refresh=true
end
def pbLoadOutfitBitmap(outfitFileName)
# Construct the file path for the outfit bitmap based on the given value
#outfitFileName = sprintf("Graphics/Outfits/%s", value)
# Attempt to load the outfit bitmap
begin
outfitBitmap = RPG::Cache.load_bitmap("", outfitFileName)
return outfitBitmap
rescue
return nil
end
end
def generateClothedBitmap()
return
end
def applyDayNightTone()
if @character.is_a?(Game_Event) && @character.name[/regulartone/i]
self.tone.set(0, 0, 0, 0)
else
pbDayNightTint(self)
end
end
def updateCharacterBitmap
AnimatedBitmap.new('Graphics/Characters/' + @character_name, @character_hue)
end
def should_update?
return @tile_id != @character.tile_id ||
@character_name != @character.character_name ||
@character_hue != @character.character_hue ||
@oldbushdepth != @character.bush_depth ||
@manual_refresh
end
def refreshOutfit()
self.bitmap = getClothedPlayerSprite(true)
end
def update
return if @character.is_a?(Game_Event) && !@character.should_update?
super
if @tile_id != @character.tile_id ||
@character_name != @character.character_name ||
@character_hue != @character.character_hue ||
@oldbushdepth != @character.bush_depth
if should_update?
@manual_refresh=false
@tile_id = @character.tile_id
@character_name = @character.character_name
@character_hue = @character.character_hue
@@ -127,13 +176,14 @@ class Sprite_Character < RPG::Sprite
@character.sprite_size = [@cw, @ch]
else
@charbitmap.dispose if @charbitmap
@charbitmap = AnimatedBitmap.new(
'Graphics/Characters/' + @character_name, @character_hue)
RPG::Cache.retain('Graphics/Characters/', @character_name, @character_hue) if @character == $game_player
@charbitmapAnimated = true
@charbitmap = updateCharacterBitmap()
RPG::Cache.retain('Graphics/Characters/', @character_name, @character_hue) if @charbitmapAnimated = true
@bushbitmap.dispose if @bushbitmap
@bushbitmap = nil
@spriteoffset = @character_name[/offset/i]
#@spriteoffset = @character_name[/offset/i]
@spriteoffset = @character_name[/fish/i] || @character_name[/dive/i] || @character_name[/surf/i]
@cw = @charbitmap.width / 4
@ch = @charbitmap.height / 4
self.ox = @cw / 2
@@ -143,7 +193,11 @@ class Sprite_Character < RPG::Sprite
@charbitmap.update if @charbitmapAnimated
bushdepth = @character.bush_depth
if bushdepth == 0
self.bitmap = (@charbitmapAnimated) ? @charbitmap.bitmap : @charbitmap
if @character == $game_player
self.bitmap = getClothedPlayerSprite()#generateClothedBitmap()
else
self.bitmap = (@charbitmapAnimated) ? @charbitmap.bitmap : @charbitmap
end
else
@bushbitmap = BushBitmap.new(@charbitmap, (@tile_id >= 384), bushdepth) if !@bushbitmap
self.bitmap = @bushbitmap.bitmap
@@ -157,11 +211,7 @@ class Sprite_Character < RPG::Sprite
self.oy -= @character.bob_height
end
if self.visible
if @character.is_a?(Game_Event) && @character.name[/regulartone/i]
self.tone.set(0, 0, 0, 0)
else
pbDayNightTint(self)
end
applyDayNightTone()
end
self.x = @character.screen_x
self.y = @character.screen_y