10-03-2019, 04:48 AM
Wow... a sneak scripty preview of the NeoMode7 patch for Lycan!!!!
THE SCRIPT!!!!
Now, where does this GO? Basically, you need to post all 5 pages of the NeoMode7 system right under the Lycan ABS itself, and the patch goes right below that. Basically, like this!
But what about Lycan Enemy HP Bars???
Yep, just paste this right below the Lycan/NeoMode7 patch!
Currently, it only works with the basic system. Don't count on the Lycan Enemy HP Bars to work with smooth (or gradual) rotation. Instant rotation works, but ... well,... Hey, it works in general!
THE SCRIPT!!!!
The Lycan NeoMode7 Patch
#============================================================================
# Lycan ABS - Neo Mode7 Patch
#----------------------------------------------------------------------------
# Actually lets the Lycan ABS work with MGC's NeoMode7 system, including
# camera map rotation!!!
#
# Early beta version - Not compatible with Paperdoll system
#============================================================================
# - Number of directions for the player on mode 7 maps :
$player_directions = 4 # you can change this value !
#============================================================================
# ■ Sprite_Character
#----------------------------------------------------------------------------
# Calculate x-coordinate and y-coordinate for a neoM7 map
#============================================================================
class Sprite_Character < RPG::Sprite
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
# Refresh if graphic had changed from previos ID, file or hue
update_refresh_character
# Set visible situation
self.visible = (not @character.transparent)
# If graphic is character
update_character_frame
# Set sprite coordinates
update_character_coordinates
# Set opacity level, blend method, and bush depth
update_character_visibility
# Animation
update_character_animation
# Update Character Damage
update_actor if @character.is_a?(Game_Player)
update_enemy if @character.is_a?(Game_Event)
update_companion if @character.is_a?(Game_ABS_Companion)
# Update Character Fade and Page
update_fade
# Update Duplicates in Wrapped Map
update_duplicate
end
#--------------------------------------------------------------------------
# * Frame Update (when retrieving characterset graphics)
#--------------------------------------------------------------------------
def update_sprite_character
if $game_system.neoM7
if @character.is_a?(Game_Player) and FileTest.exist?("Graphics/Characters/" +
@character.character_name + "_m7.png")
self.bitmap = RPG::Cache.character(@character.character_name + "_m7",
@character.character_hue)
else
self.bitmap = RPG::Cache.character(@character.character_name,
@character.character_hue)
end
# Check for special Lycan Center Character in filename
chkname = @character.character_name.dup
lastval = chkname[chkname.size-1, 1]
@cw = bitmap.width / 4
@ch = bitmap.height / @character.directions
self.ox = @cw / 2
self.oy = (lastval == Lycan::SUFFIX_CENTER) ? (@ch/1.5) : @ch
# pivot correction (intersection between the map and this sprite)
self.oy -= 4
else
self.bitmap = RPG::Cache.character(@character.character_name,
@character.character_hue)
# Check for special Lycan Center Character in filename
chkname = @character.character_name.dup
lastval = chkname[chkname.size-1, 1]
@cw = bitmap.width / 4
@ch = bitmap.height / 4
self.ox = @cw / 2
self.oy = (lastval == Lycan::SUFFIX_CENTER) ? (@ch/1.5) : @ch
end
end
#--------------------------------------------------------------------------
# * Frame Update (when placing a graphic into position)
#--------------------------------------------------------------------------
def update_character_coordinates
if $game_system.neoM7
# If graphic is character
if @tile_id == 0
sx = @character.pattern * @cw
current_direction = (@character.direction - 2) / 2
if $scene.spriteset != nil and $scene.spriteset.tilemap.is_a?(Tilemap_neoM7)
directions_list = $dirs[@character.directions]
list_size = directions_list.size
# PREVENT Invalid Direction
if directions_list.index(current_direction).nil?
current_direction = 2
end
current_direction = directions_list[(directions_list.index(current_direction) +
(($scene.spriteset.tilemap.theta + (180 / list_size)) % 360) / (360 / list_size)) % list_size]
end
sy = current_direction * @ch
self.src_rect.set(sx, sy, @cw, @ch)
self.length = @cw
self.height = @ch
end
x_intermediate = @character.screen_x
y_intermediate = @character.screen_y - 4
if $game_system.neoM7_loop
diff_y = ($game_player.y - @character.y).to_i
offset_y = ($game_map.height << 5) * (diff_y >= 0 ?
(diff_y / ($game_map.height >> 1)) :
(diff_y / ($game_map.height >> 1)) + 1)
diff_x = ($game_player.x - @character.x).to_i
offset_x = ($game_map.width << 5) * (diff_x >= 0 ?
(diff_x / ($game_map.width >> 1)) :
(diff_x / ($game_map.width >> 1)) + 1)
neoM7_character(x_intermediate + offset_x, y_intermediate + offset_y)
else
neoM7_character(x_intermediate, y_intermediate)
end
if !on_screen_x(x) or !on_screen_y(y)
self.opacity = 0
return
end
neoM7_zoom(x, y)
self.z = 4 * y
self.y -= 32 * @character.height * zoom_y # height correction
else
# If graphic is character
if @tile_id == 0
# Set rectangular transfer
sx = @character.pattern * @cw
sy = (@character.direction - 2) / 2 * @ch
self.src_rect.set(sx, sy, @cw, @ch)
end
# Set sprite coordinates
self.x = @character.screen_x
self.y = @character.screen_y
self.z = @character.screen_z(@ch)
# Set opacity level, blend method, and bush depth
end
end
end
#============================================================================
# ■ Spriteset_Map
#----------------------------------------------------------------------------
# Modifications to call a neoM7 map
#============================================================================
class Spriteset_Map
#--------------------------------------------------------------------------
# * Attributes
#--------------------------------------------------------------------------
attr_accessor :tilemap # just to be able to access the tilemap
#--------------------------------------------------------------------------
# * Initialize Object
# Rewritten to call a map with neoM7
#--------------------------------------------------------------------------
def initialize
# Create arrays
@ranged_sprites = []
@dropped_sprites = []
# Erase map Wrap
$game_map.wrap = nil
# Make viewports
@viewport1 = Viewport.new(0, 0, 640, 480)
@viewport2 = Viewport.new(0, 0, 640, 480)
@viewport3 = Viewport.new(0, 0, 640, 480)
@viewport2.z = 200
@viewport3.z = 5000
if $game_system.neoM7
# Make neoM7 tilemap
@tilemap = Tilemap_neoM7.new(@viewport1, self)
# Make panorama plane
@panorama = Plane.new(@viewport1)
# sprites drawn at the horizon's level have a negative z, and with a z value
# of -100000 the panorama is still below
@panorama.z = ($game_system.neoM7 ? -100000 : -1000)
else
# Make tilemap
@tilemap = Tilemap.new(@viewport1)
@tilemap.tileset = RPG::Cache.tileset($game_map.tileset_name)
for i in 0..6
autotile_name = $game_map.autotile_names[i]
@tilemap.autotiles[i] = RPG::Cache.autotile(autotile_name)
end
@tilemap.map_data = $game_map.data
@tilemap.priorities = $game_map.priorities
# Make panorama plane
@panorama = Plane.new(@viewport1)
@panorama.z = -1000
end
# Make fog plane
@fog = Plane.new(@viewport1)
@fog.z = 3000
# Make character sprites
@character_sprites = []
for i in $game_map.events.keys.sort
sprite = Sprite_Character.new(@viewport1, $game_map.events[i])
@character_sprites.push(sprite)
end
@character_sprites.push(Sprite_Character.new(@viewport1, $game_player))
# Make weather
@weather = RPG::Weather.new(@viewport1)
# Make picture sprites
@picture_sprites = []
for i in 1..50
@picture_sprites.push(Sprite_Picture.new(@viewport2,
$game_screen.pictures[i]))
end
# Make timer sprite
@timer_sprite = Sprite_Timer.new
# Frame update
update
update if $game_system.neoM7_filter
# If the companions system is on
initialize_companion_draw
# Initially draw the sprites
initialize_sprite_draw($ABS.ranged, @ranged_sprites)
initialize_sprite_draw($ABS.dropped_items, @dropped_sprites)
end
#--------------------------------------------------------------------------
# * Dispose
#--------------------------------------------------------------------------
def dispose
# Dispose all range effect and treasure drop sprites
for range in @ranged_sprites ; range.dispose ; end
for drop in @dropped_sprites ; drop.dispose ; end
if @tilemap.tileset != nil
@tilemap.tileset.dispose
for i in 0..6
@tilemap.autotiles[i].dispose
end
end
@tilemap.dispose
@panorama.dispose
@fog.dispose
for sprite in @character_sprites
sprite.dispose
end
@weather.dispose
for sprite in @picture_sprites
sprite.dispose
end
@timer_sprite.dispose
@viewport1.dispose
@viewport2.dispose
@viewport3.dispose
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update
# Cycle through character sprites
for sprite in @character_sprites
# Skip nul sprites
next if sprite.nil?
# Skip out-of-range sprites
next unless in_range?(sprite)
# Dispose of companion sprite
update_companion_erasure(sprite)
end
# If panorama is different from current one
if @panorama_name != $game_map.panorama_name or
@panorama_hue != $game_map.panorama_hue
@panorama_name = $game_map.panorama_name
@panorama_hue = $game_map.panorama_hue
if @panorama.bitmap != nil
@panorama.bitmap.dispose
@panorama.bitmap = nil
end
if @panorama_name != ""
@panorama.bitmap = RPG::Cache.panorama(@panorama_name, @panorama_hue)
end
Graphics.frame_reset
end
# If fog is different than current fog
if @fog_name != $game_map.fog_name or @fog_hue != $game_map.fog_hue
@fog_name = $game_map.fog_name
@fog_hue = $game_map.fog_hue
if @fog.bitmap != nil
@fog.bitmap.dispose
@fog.bitmap = nil
end
if @fog_name != ""
@fog.bitmap = RPG::Cache.fog(@fog_name, @fog_hue)
end
Graphics.frame_reset
end
if $game_system.neoM7
# update animated tiles each 20 frames
if Graphics.frame_count % 20 == 0 and $game_system.neoM7_animated
@tilemap.update_animated
end
@tilemap.update
else
# Update tilemap
@tilemap.ox = $game_map.display_x / 4
@tilemap.oy = $game_map.display_y / 4
@tilemap.update
end
if $game_system.neoM7
# to have a fluent panorama scrolling
@panorama.ox = 6 * ((tilemap.theta * 4.0 / 3).to_i)
@panorama.oy = - $game_temp.neoM7_height_limit
else
@panorama.ox = $game_map.display_x / 8
@panorama.oy = $game_map.display_y / 8
end
# Update fog plane
@fog.zoom_x = $game_map.fog_zoom / 100.0
@fog.zoom_y = $game_map.fog_zoom / 100.0
@fog.opacity = $game_map.fog_opacity
@fog.blend_type = $game_map.fog_blend_type
@fog.ox = $game_map.display_x / 4 + $game_map.fog_ox
@fog.oy = $game_map.display_y / 4 + $game_map.fog_oy
@fog.tone = $game_map.fog_tone
# Update character sprites
for sprite in @character_sprites
sprite.update
end
# Update weather graphic
@weather.type = $game_screen.weather_type
@weather.max = $game_screen.weather_max
@weather.ox = $game_map.display_x / 4
@weather.oy = $game_map.display_y / 4
@weather.update
# Update picture sprites
for sprite in @picture_sprites
sprite.update
end
# Update timer sprite
@timer_sprite.update
# Set screen color tone and shake position
@viewport1.tone = $game_screen.tone
@viewport1.ox = $game_screen.shake
# Set screen flash color
@viewport3.color = $game_screen.flash_color
# Update viewports
@viewport1.update
@viewport3.update
# Erase sprites if stopped
update_sprite_erasure($ABS.ranged, @ranged_sprites)
update_sprite_erasure($ABS.dropped_items, @dropped_sprites)
# Redraw the sprites
update_sprite_draw($ABS.ranged, @ranged_sprites)
update_sprite_draw($ABS.dropped_items, @dropped_sprites)
end
end
# Lycan ABS - Neo Mode7 Patch
#----------------------------------------------------------------------------
# Actually lets the Lycan ABS work with MGC's NeoMode7 system, including
# camera map rotation!!!
#
# Early beta version - Not compatible with Paperdoll system
#============================================================================
# - Number of directions for the player on mode 7 maps :
$player_directions = 4 # you can change this value !
#============================================================================
# ■ Sprite_Character
#----------------------------------------------------------------------------
# Calculate x-coordinate and y-coordinate for a neoM7 map
#============================================================================
class Sprite_Character < RPG::Sprite
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
# Refresh if graphic had changed from previos ID, file or hue
update_refresh_character
# Set visible situation
self.visible = (not @character.transparent)
# If graphic is character
update_character_frame
# Set sprite coordinates
update_character_coordinates
# Set opacity level, blend method, and bush depth
update_character_visibility
# Animation
update_character_animation
# Update Character Damage
update_actor if @character.is_a?(Game_Player)
update_enemy if @character.is_a?(Game_Event)
update_companion if @character.is_a?(Game_ABS_Companion)
# Update Character Fade and Page
update_fade
# Update Duplicates in Wrapped Map
update_duplicate
end
#--------------------------------------------------------------------------
# * Frame Update (when retrieving characterset graphics)
#--------------------------------------------------------------------------
def update_sprite_character
if $game_system.neoM7
if @character.is_a?(Game_Player) and FileTest.exist?("Graphics/Characters/" +
@character.character_name + "_m7.png")
self.bitmap = RPG::Cache.character(@character.character_name + "_m7",
@character.character_hue)
else
self.bitmap = RPG::Cache.character(@character.character_name,
@character.character_hue)
end
# Check for special Lycan Center Character in filename
chkname = @character.character_name.dup
lastval = chkname[chkname.size-1, 1]
@cw = bitmap.width / 4
@ch = bitmap.height / @character.directions
self.ox = @cw / 2
self.oy = (lastval == Lycan::SUFFIX_CENTER) ? (@ch/1.5) : @ch
# pivot correction (intersection between the map and this sprite)
self.oy -= 4
else
self.bitmap = RPG::Cache.character(@character.character_name,
@character.character_hue)
# Check for special Lycan Center Character in filename
chkname = @character.character_name.dup
lastval = chkname[chkname.size-1, 1]
@cw = bitmap.width / 4
@ch = bitmap.height / 4
self.ox = @cw / 2
self.oy = (lastval == Lycan::SUFFIX_CENTER) ? (@ch/1.5) : @ch
end
end
#--------------------------------------------------------------------------
# * Frame Update (when placing a graphic into position)
#--------------------------------------------------------------------------
def update_character_coordinates
if $game_system.neoM7
# If graphic is character
if @tile_id == 0
sx = @character.pattern * @cw
current_direction = (@character.direction - 2) / 2
if $scene.spriteset != nil and $scene.spriteset.tilemap.is_a?(Tilemap_neoM7)
directions_list = $dirs[@character.directions]
list_size = directions_list.size
# PREVENT Invalid Direction
if directions_list.index(current_direction).nil?
current_direction = 2
end
current_direction = directions_list[(directions_list.index(current_direction) +
(($scene.spriteset.tilemap.theta + (180 / list_size)) % 360) / (360 / list_size)) % list_size]
end
sy = current_direction * @ch
self.src_rect.set(sx, sy, @cw, @ch)
self.length = @cw
self.height = @ch
end
x_intermediate = @character.screen_x
y_intermediate = @character.screen_y - 4
if $game_system.neoM7_loop
diff_y = ($game_player.y - @character.y).to_i
offset_y = ($game_map.height << 5) * (diff_y >= 0 ?
(diff_y / ($game_map.height >> 1)) :
(diff_y / ($game_map.height >> 1)) + 1)
diff_x = ($game_player.x - @character.x).to_i
offset_x = ($game_map.width << 5) * (diff_x >= 0 ?
(diff_x / ($game_map.width >> 1)) :
(diff_x / ($game_map.width >> 1)) + 1)
neoM7_character(x_intermediate + offset_x, y_intermediate + offset_y)
else
neoM7_character(x_intermediate, y_intermediate)
end
if !on_screen_x(x) or !on_screen_y(y)
self.opacity = 0
return
end
neoM7_zoom(x, y)
self.z = 4 * y
self.y -= 32 * @character.height * zoom_y # height correction
else
# If graphic is character
if @tile_id == 0
# Set rectangular transfer
sx = @character.pattern * @cw
sy = (@character.direction - 2) / 2 * @ch
self.src_rect.set(sx, sy, @cw, @ch)
end
# Set sprite coordinates
self.x = @character.screen_x
self.y = @character.screen_y
self.z = @character.screen_z(@ch)
# Set opacity level, blend method, and bush depth
end
end
end
#============================================================================
# ■ Spriteset_Map
#----------------------------------------------------------------------------
# Modifications to call a neoM7 map
#============================================================================
class Spriteset_Map
#--------------------------------------------------------------------------
# * Attributes
#--------------------------------------------------------------------------
attr_accessor :tilemap # just to be able to access the tilemap
#--------------------------------------------------------------------------
# * Initialize Object
# Rewritten to call a map with neoM7
#--------------------------------------------------------------------------
def initialize
# Create arrays
@ranged_sprites = []
@dropped_sprites = []
# Erase map Wrap
$game_map.wrap = nil
# Make viewports
@viewport1 = Viewport.new(0, 0, 640, 480)
@viewport2 = Viewport.new(0, 0, 640, 480)
@viewport3 = Viewport.new(0, 0, 640, 480)
@viewport2.z = 200
@viewport3.z = 5000
if $game_system.neoM7
# Make neoM7 tilemap
@tilemap = Tilemap_neoM7.new(@viewport1, self)
# Make panorama plane
@panorama = Plane.new(@viewport1)
# sprites drawn at the horizon's level have a negative z, and with a z value
# of -100000 the panorama is still below
@panorama.z = ($game_system.neoM7 ? -100000 : -1000)
else
# Make tilemap
@tilemap = Tilemap.new(@viewport1)
@tilemap.tileset = RPG::Cache.tileset($game_map.tileset_name)
for i in 0..6
autotile_name = $game_map.autotile_names[i]
@tilemap.autotiles[i] = RPG::Cache.autotile(autotile_name)
end
@tilemap.map_data = $game_map.data
@tilemap.priorities = $game_map.priorities
# Make panorama plane
@panorama = Plane.new(@viewport1)
@panorama.z = -1000
end
# Make fog plane
@fog = Plane.new(@viewport1)
@fog.z = 3000
# Make character sprites
@character_sprites = []
for i in $game_map.events.keys.sort
sprite = Sprite_Character.new(@viewport1, $game_map.events[i])
@character_sprites.push(sprite)
end
@character_sprites.push(Sprite_Character.new(@viewport1, $game_player))
# Make weather
@weather = RPG::Weather.new(@viewport1)
# Make picture sprites
@picture_sprites = []
for i in 1..50
@picture_sprites.push(Sprite_Picture.new(@viewport2,
$game_screen.pictures[i]))
end
# Make timer sprite
@timer_sprite = Sprite_Timer.new
# Frame update
update
update if $game_system.neoM7_filter
# If the companions system is on
initialize_companion_draw
# Initially draw the sprites
initialize_sprite_draw($ABS.ranged, @ranged_sprites)
initialize_sprite_draw($ABS.dropped_items, @dropped_sprites)
end
#--------------------------------------------------------------------------
# * Dispose
#--------------------------------------------------------------------------
def dispose
# Dispose all range effect and treasure drop sprites
for range in @ranged_sprites ; range.dispose ; end
for drop in @dropped_sprites ; drop.dispose ; end
if @tilemap.tileset != nil
@tilemap.tileset.dispose
for i in 0..6
@tilemap.autotiles[i].dispose
end
end
@tilemap.dispose
@panorama.dispose
@fog.dispose
for sprite in @character_sprites
sprite.dispose
end
@weather.dispose
for sprite in @picture_sprites
sprite.dispose
end
@timer_sprite.dispose
@viewport1.dispose
@viewport2.dispose
@viewport3.dispose
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update
# Cycle through character sprites
for sprite in @character_sprites
# Skip nul sprites
next if sprite.nil?
# Skip out-of-range sprites
next unless in_range?(sprite)
# Dispose of companion sprite
update_companion_erasure(sprite)
end
# If panorama is different from current one
if @panorama_name != $game_map.panorama_name or
@panorama_hue != $game_map.panorama_hue
@panorama_name = $game_map.panorama_name
@panorama_hue = $game_map.panorama_hue
if @panorama.bitmap != nil
@panorama.bitmap.dispose
@panorama.bitmap = nil
end
if @panorama_name != ""
@panorama.bitmap = RPG::Cache.panorama(@panorama_name, @panorama_hue)
end
Graphics.frame_reset
end
# If fog is different than current fog
if @fog_name != $game_map.fog_name or @fog_hue != $game_map.fog_hue
@fog_name = $game_map.fog_name
@fog_hue = $game_map.fog_hue
if @fog.bitmap != nil
@fog.bitmap.dispose
@fog.bitmap = nil
end
if @fog_name != ""
@fog.bitmap = RPG::Cache.fog(@fog_name, @fog_hue)
end
Graphics.frame_reset
end
if $game_system.neoM7
# update animated tiles each 20 frames
if Graphics.frame_count % 20 == 0 and $game_system.neoM7_animated
@tilemap.update_animated
end
@tilemap.update
else
# Update tilemap
@tilemap.ox = $game_map.display_x / 4
@tilemap.oy = $game_map.display_y / 4
@tilemap.update
end
if $game_system.neoM7
# to have a fluent panorama scrolling
@panorama.ox = 6 * ((tilemap.theta * 4.0 / 3).to_i)
@panorama.oy = - $game_temp.neoM7_height_limit
else
@panorama.ox = $game_map.display_x / 8
@panorama.oy = $game_map.display_y / 8
end
# Update fog plane
@fog.zoom_x = $game_map.fog_zoom / 100.0
@fog.zoom_y = $game_map.fog_zoom / 100.0
@fog.opacity = $game_map.fog_opacity
@fog.blend_type = $game_map.fog_blend_type
@fog.ox = $game_map.display_x / 4 + $game_map.fog_ox
@fog.oy = $game_map.display_y / 4 + $game_map.fog_oy
@fog.tone = $game_map.fog_tone
# Update character sprites
for sprite in @character_sprites
sprite.update
end
# Update weather graphic
@weather.type = $game_screen.weather_type
@weather.max = $game_screen.weather_max
@weather.ox = $game_map.display_x / 4
@weather.oy = $game_map.display_y / 4
@weather.update
# Update picture sprites
for sprite in @picture_sprites
sprite.update
end
# Update timer sprite
@timer_sprite.update
# Set screen color tone and shake position
@viewport1.tone = $game_screen.tone
@viewport1.ox = $game_screen.shake
# Set screen flash color
@viewport3.color = $game_screen.flash_color
# Update viewports
@viewport1.update
@viewport3.update
# Erase sprites if stopped
update_sprite_erasure($ABS.ranged, @ranged_sprites)
update_sprite_erasure($ABS.dropped_items, @dropped_sprites)
# Redraw the sprites
update_sprite_draw($ABS.ranged, @ranged_sprites)
update_sprite_draw($ABS.dropped_items, @dropped_sprites)
end
end
Now, where does this GO? Basically, you need to post all 5 pages of the NeoMode7 system right under the Lycan ABS itself, and the patch goes right below that. Basically, like this!
Code:
9 - Window Code
10 - Scene Code
Neo Mode 7 Part 1
Neo Mode 7 Part 2
Neo Mode 7 Part 3
Neo Mode 7 Part 4
Neo Mode 7 Part 5
LYCAN/NeoMode7 Patch
But what about Lycan Enemy HP Bars???
Enemy HP NeoMode7 Patch
Code:
#==============================================================================
# ** Enemy_Bars
#------------------------------------------------------------------------------
# This sprite is used to display the ABS Enemy HP Bars. They automatically
# change based on the ABS Enemy's health conditions.
#==============================================================================
class Enemy_Bars < Sprite
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
event = $game_map.events[@enemy.event_id]
x_intermediate = event.screen_x-10
y_intermediate = event.screen_y - 4
neoM7_character(x_intermediate, y_intermediate)
#HP Bar Check
return if @old_hp == @enemy.hp
self.bitmap.clear
@old_hp = @enemy.hp
#Show the bar
draw_gradient_bar(0,0,@enemy.hp,@enemy.maxhp, HP_BAR)
end
#--------------------------------------------------------------------------
# * Refresh SP
#--------------------------------------------------------------------------
def refresh_sp
event = $game_map.events[@enemy.event_id]
x_intermediate = event.screen_x-10
y_intermediate = event.screen_y - 4
neoM7_character(x_intermediate, y_intermediate)
#Show the bar
draw_gradient_bar(0, HP_BAR_HEIGHT, @enemy.sp, @enemy.maxsp, SP_BAR)
end
#--------------------------------------------------------------------------
# calculate x and y coordinates in mode 7 for a character sprite
#--------------------------------------------------------------------------
def neoM7_character(x_screen, y_screen)
y_init = $game_temp.zoom_sprites * (y_screen - $game_temp.pivot)
x_init = $game_temp.zoom_sprites * (x_screen - 320)
y_intermediate = (((y_init * $game_temp.cos_theta -
x_init * $game_temp.sin_theta).to_i)>>12)
x_intermediate = (((x_init * $game_temp.cos_theta +
y_init * $game_temp.sin_theta).to_i)>>12)
self.y = $game_temp.pivot + ($game_temp.distance_h *
y_intermediate * $game_temp.cos_alpha) /
((($game_temp.distance_h) << 12) - y_intermediate *
$game_temp.sin_alpha)
self.x = (320 + ($game_temp.slope_value * y +
$game_temp.corrective_value) * x_intermediate)
end
end
Yep, just paste this right below the Lycan/NeoMode7 patch!
Currently, it only works with the basic system. Don't count on the Lycan Enemy HP Bars to work with smooth (or gradual) rotation. Instant rotation works, but ... well,... Hey, it works in general!
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links