module DIM module HUD X = 0 Y = 0 WIDTH = 240 HEIGHT = 64 FONT = ["Arial Narrow", "Impact"] FONT_SIZE = 16 FONT_BOLD = false FONT_ITAL = false Opacity = 0 endend class Window_HUD < Window_Base include DIM::HUD def initialize() super( X, Y, WIDTH, HEIGHT) self.contents = Bitmap.new(width-32,height-32) self.back_opacity = 0 @hud_sprite = Sprite.new() @status_bar_san_bg = Sprite.new() @status_bar_san_fg = Sprite.new() @mental_status = Sprite.new() @danger = Sprite.new() @saferoom = Sprite.new() @siren = Sprite.new() @time_rem = Sprite.new() @status = Sprite.new() @current_val = -1 refresh end def refresh self.contents.clear self.opacity = Opacity #p "Refreshing" @hud_sprite.bitmap = Cache.picture("status_bar") @hud_sprite.z = 300 @status_bar_san_bg.bitmap = Cache.picture("status_bar_san_bg") @status_bar_san_bg.x = 76 @status_bar_san_bg.y = 27 @status_bar_san_bg.z = 301 @status_bar_san_fg.bitmap = Cache.picture("status_bar_san_fg") @status_bar_san_fg.x = 76 @status_bar_san_fg.y = 27 @status_bar_san_fg.z = 302 @mental_status.bitmap = Cache.picture("mental_status") @mental_status.x = 56 @mental_status.y = 4 @mental_status.z = 300 if @current_val != -1 @status.bitmap.clear() #p "Status bitmap cleared" end if @current_val != $game_variables[94] p "New Status" case $game_variables[94] when 50 .. 60 @status.bitmap = Cache.picture("status_insane") p "::STATUS ( Insane )" when 40 .. 49 @status.bitmap = Cache.picture("status_losingit") p "::STATUS ( Losing It )" when 30 .. 39 @status.bitmap = Cache.picture("status_panicking") p "::STATUS ( Panicking )" when 20 .. 29 @status.bitmap = Cache.picture("status_frightened") p "::STATUS ( Frightened )" when 10 .. 19 @status.bitmap = Cache.picture("status_onedge") p "::STATUS ( On Edge )" when 1 .. 9 @status.bitmap = Cache.picture("status_suspicious") p "::STATUS ( Suspicious )" when 0 @status.bitmap = Cache.picture("status_collected") p "::STATUS ( Collected )" else p "!!ERROR!! Invalid status" end end @current_val = $game_variables[94] @status.x = 68 @status.y = 14 @status.z = 400 if $game_switches[7] || $game_switches[14] || $game_switches[90] || $game_switches[91] @danger.bitmap = Cache.picture("danger") else @danger.bitmap = Cache.picture("led_off") end @danger.x = 215 @danger.y = 6 @danger.z = 300 if $game_switches[89] @saferoom.bitmap = Cache.picture("saferoom") else @saferoom.bitmap = Cache.picture("led_off") end @saferoom.x = 21 @saferoom.y = 11 @saferoom.z = 300 if $game_switches[91] || $game_switches[97] || $game_switches[98] || $game_switches[99] @siren.bitmap = Cache.picture("siren") else @siren.bitmap = Cache.picture("led_off") end @siren.x = 5 @siren.y = 1 @siren.z = 300 @time_rem.bitmap = Cache.picture("time_remaining") @time_rem.x = 168 @time_rem.y = 3 @time_rem.z = 300 end def update refresh super end def terminate super() endend class Scene_Map < Scene_Base alias DIMHUD_start start def start DIMHUD_start() @hud = Window_HUD.new end alias DIMHUD_update update def update DIMHUD_update() if $game_switches[82] == 1 @hud.update end endend