Menu

Connexion



Retenir ?

Mot de passe oublié ?
Eclipso logo
Merry Christmas !
07/08/2020 06:44:29

Merci du partage + des pouains - RitoJS

Rpg maker vx ace : Barre pour ennemis Help !

RitoJS

6307
RitoJS
  • Messages : 6307

Rpg maker vx ace : Barre pour ennemis Help !


sam. 25 mai 2013 - 14h05

Fais ce que tu veux.





Merci à Maki et KuroFidy pour ces cadeaux:

Spoiler



Brandobscure

Elite
Brandobscure
  • Messages : 652

Rpg maker vx ace : Barre pour ennemis Help !


sam. 25 mai 2013 - 14h53

Non, de toute façon sa marche pas ...
Je met le script et les images, mais sa reste toujours le HUD de Yami.



Abonne toi et écoute mes musiques que j'ai composé moi-même par ici :
https://soundcloud.com/brandobscure
Ou même t'abonner si tu aime.
Et tu a intérêt sinon je te donne un coup de fouet.


_____________________________________________________
Je soutien :

Spoiler



RitoJS

6307
RitoJS
  • Messages : 6307

Rpg maker vx ace : Barre pour ennemis Help !


sam. 25 mai 2013 - 14h54

Combien de fois je dois te dire de retirer le script de Yanfly avant. x)
Ou sinon tu prends le patch pour.





Merci à Maki et KuroFidy pour ces cadeaux:

Spoiler



Brandobscure

Elite
Brandobscure
  • Messages : 652

Rpg maker vx ace : Barre pour ennemis Help !


sam. 25 mai 2013 - 15h06

C'est ce que je fais, mais sa me dit ça :



Abonne toi et écoute mes musiques que j'ai composé moi-même par ici :
https://soundcloud.com/brandobscure
Ou même t'abonner si tu aime.
Et tu a intérêt sinon je te donne un coup de fouet.


_____________________________________________________
Je soutien :

Spoiler



RitoJS

6307
RitoJS
  • Messages : 6307

Rpg maker vx ace : Barre pour ennemis Help !


sam. 25 mai 2013 - 15h22

Citation de "RitoJS" :

Ou sinon tu prends le patch pour.





Merci à Maki et KuroFidy pour ces cadeaux:

Spoiler



Brandobscure

Elite
Brandobscure
  • Messages : 652

Rpg maker vx ace : Barre pour ennemis Help !


sam. 25 mai 2013 - 15h26

Même érreur.



Abonne toi et écoute mes musiques que j'ai composé moi-même par ici :
https://soundcloud.com/brandobscure
Ou même t'abonner si tu aime.
Et tu a intérêt sinon je te donne un coup de fouet.


_____________________________________________________
Je soutien :

Spoiler



RitoJS

6307
RitoJS
  • Messages : 6307

Rpg maker vx ace : Barre pour ennemis Help !


sam. 25 mai 2013 - 15h31

Brand'....Le script qu'il faut que tu retires, c'est le YEA- Battle Engine. x)





Merci à Maki et KuroFidy pour ces cadeaux:

Spoiler



Brandobscure

Elite
Brandobscure
  • Messages : 652

Rpg maker vx ace : Barre pour ennemis Help !


sam. 25 mai 2013 - 15h36

Ah, mais les combat sont bizarre sans ce script. ^^



Abonne toi et écoute mes musiques que j'ai composé moi-même par ici :
https://soundcloud.com/brandobscure
Ou même t'abonner si tu aime.
Et tu a intérêt sinon je te donne un coup de fouet.


_____________________________________________________
Je soutien :

Spoiler



RitoJS

6307
RitoJS
  • Messages : 6307

Rpg maker vx ace : Barre pour ennemis Help !


sam. 25 mai 2013 - 15h44

Non, ils sont normal. Faut juste rajouter d'autre pop-up.





Merci à Maki et KuroFidy pour ces cadeaux:

Spoiler



Brandobscure

Elite
Brandobscure
  • Messages : 652

Rpg maker vx ace : Barre pour ennemis Help !


sam. 25 mai 2013 - 16h15

Ah ok, merci.



Abonne toi et écoute mes musiques que j'ai composé moi-même par ici :
https://soundcloud.com/brandobscure
Ou même t'abonner si tu aime.
Et tu a intérêt sinon je te donne un coup de fouet.


_____________________________________________________
Je soutien :

Spoiler



johnseed

Débutôt
johnseed
  • Messages : 16

Rpg maker vx ace : Barre pour ennemis Help !


sam. 18 janv. 2014 - 10h49

bonjour super le graphique de ton jeu ^^

je recherche le menu de commande ring comme sur ton screen tu la eu ou stp ^^

merci

Zouzaka

Elite
Zouzaka
  • Messages : 616

Rpg maker vx ace : Barre pour ennemis Help !


sam. 18 janv. 2014 - 11h27

J'ai peur de le dire et que bibi ou autre admin rapplique et me dit c'est pas ton boulot ... mais je vais le dire quand même :
=> Je vous prie de vous présenter : ICI
=> Et aussi d’éviter de remonter de vieux sujets (Lire le règlement du forum)

RitoJS

6307
RitoJS
  • Messages : 6307

Rpg maker vx ace : Barre pour ennemis Help !


sam. 18 janv. 2014 - 17h03

Le présentation est recommandé mais pas obligatoire.
Les scripts:
[code]=begin ************************************************************************
Ÿ ‰æ‘œƒRƒ}ƒ“ƒhƒXƒNƒŠƒvƒg (ƒx[ƒXƒXƒNƒŠƒvƒg) Ver.1.81
---------------------------------------------------------------------------
‰æ‘œƒRƒ}ƒ“ƒh‚̃x[ƒXƒXƒNƒŠƒvƒg‚Å‚·B‰ñ“]ƒAƒCƒRƒ“ƒRƒ}ƒ“ƒh‚ªŽg‚¦‚Ü‚·B
=end # ************************************************************************
#-information------------------------------------------------------------------
$ziifee ||= {}
$ziifee[:SpriteCommand] = true
#------------------------------------------------------------------------------
#-memo-------------------------------------------------------------------------
# [•K—v‰æ‘œ] ˆÈ‰º‚̉摜‚ð Graphics/System ‚ɃCƒ“ƒ|[ƒg‚µ‚Ä‚­‚¾‚³‚¢B
# ‰ñ“]ƒRƒ}ƒ“ƒh—pƒJ[ƒ\ƒ‹‰æ‘œ ( ƒtƒ@ƒCƒ‹–¼ : RollIconCursor )
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# ‚±‚̃XƒNƒŠƒvƒg‚͉”\‚ÈŒÀ‚è‘fÞ‚Ì’†‚Åã•”‚É“±“ü‚µ‚Ä‚­‚¾‚³‚¢B
# ‰ñ“]ƒAƒCƒRƒ“ƒRƒ}ƒ“ƒh‘I‘ð‚ðs‚¢‚½‚¢ƒNƒ‰ƒX‚Ɉȉº‚ð‹Lq‚µ‚Ü‚·B
# include ZiifSpriteCommand_RollIcon # ‰ñ“]ƒAƒCƒRƒ“ƒRƒ}ƒ“ƒh‘I‘ð
#------------------------------------------------------------------------------
#==============================================================================
# ¡ ZiifManager
#==============================================================================
module ZiifManager
#--------------------------------------------------------------------------
# ¥ ’è” (ƒAƒCƒRƒ“”Ô†)
#-memo---------------------------------------------------------------------
# ‰ñ“]ƒRƒ}ƒ“ƒhã‚É•\Ž¦‚·‚éƒAƒCƒRƒ“‚Í‚±‚±‚Åݒ肵‚Ü‚·B
# ˆÈ‰º‚Ì’è‹`‚Ì symbol ‚ª‚±‚±‚ÅÝ’è‚·‚éƒVƒ“ƒ{ƒ‹‚É‚È‚è‚Ü‚·B
# add_command(name, symbol, enabled, ext) # ƒRƒ}ƒ“ƒh‚̒ljÁ
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# IconSet[ƒVƒ“ƒ{ƒ‹] = Hash.new(ƒAƒCƒRƒ“”Ô†)
# IconSet[:skill][ƒXƒLƒ‹ƒ^ƒCƒv”Ô†] = ƒAƒCƒRƒ“”Ô† # ƒXƒLƒ‹ƒ^ƒCƒv
#--------------------------------------------------------------------------
IconSet ||= Hash.new(Hash.new(16)) # ƒfƒtƒHƒ‹ƒg
IconSet[:fight] = Hash.new(147) # 키 (ƒoƒgƒ‹)
IconSet[:escape] = Hash.new(467) # “¦‚°‚é (ƒoƒgƒ‹)
IconSet[:attack] = Hash.new(175) # UŒ‚ (ƒoƒgƒ‹)
IconSet[:guard] = Hash.new(6720) # –hŒä (ƒoƒgƒ‹)
IconSet[:item] = Hash.new(3868) # ƒAƒCƒeƒ€
IconSet[:skill] = Hash.new(112) # ƒXƒLƒ‹
IconSet[:skill][1] = 3758 # ƒXƒLƒ‹ƒ^ƒCƒv ID:01
IconSet[:skill][2] = 3812 # ƒXƒLƒ‹ƒ^ƒCƒv ID:02
IconSet[:equip] = Hash.new(3812) # ‘•”õ
IconSet[:weapon] = Hash.new(147) # •Ší
IconSet[:armor] = Hash.new(506) # –h‹ï
IconSet[:key_item] = Hash.new(243) # ƒL[ƒAƒCƒeƒ€
IconSet[:optimize] = Hash.new(437) # Å‹­‘•”õ
IconSet[:clear] = Hash.new(143) # ŠO‚·
IconSet[:status] = Hash.new(121) # ƒXƒe[ƒ^ƒX
IconSet[:formation] = Hash.new(183) # •À‚Ñ‘Ö‚¦
IconSet[:save] = Hash.new(224) # ƒZ[ƒu
IconSet[:buy] = Hash.new(270) # w“ü
IconSet[:sell] = Hash.new(262) # ”„‹p
IconSet[:cancel] = Hash.new(12) # ƒLƒƒƒ“ƒZƒ‹
IconSet[:new_game] = Hash.new(234) # ƒjƒ…[ƒQ[ƒ€
IconSet[:continue] = Hash.new(224) # ƒRƒ“ƒeƒBƒjƒ…[
IconSet[:game_end] = Hash.new(257) # ƒQ[ƒ€I—¹
IconSet[:to_title] = Hash.new(257) # ƒ^ƒCƒgƒ‹‚Ö
IconSet[:shutdown] = Hash.new(143) # ƒVƒƒƒbƒgƒ_ƒEƒ“
#--------------------------------------------------------------------------
# œ ƒRƒ}ƒ“ƒhƒAƒCƒRƒ“”Ô†‚̎擾
# command : ƒEƒBƒ“ƒhƒE‚̃Rƒ}ƒ“ƒh
#--------------------------------------------------------------------------
def self.command_icon_index(command)
IconSet[command[:symbol]][command[:ext]]
end
end
#==============================================================================
# ¡ Game_System
#==============================================================================
class Game_System
#--------------------------------------------------------------------------
# œ ŒöŠJƒCƒ“ƒXƒ^ƒ“ƒX•Ï” (ƒIƒvƒVƒ‡ƒ“Šg’£—p)
#--------------------------------------------------------------------------
attr_writer :ziifop_reverse_roll # ‹t‰ñ“] ( true / false )
attr_writer :ziifop_roll_input_type # ‰ñ“]Žž ƒL[“ü—̓^ƒCƒv (0`2)
attr_writer :ziifop_roll_speed # ‰ñ“]Žž ‘¬“x (0`4)
#--------------------------------------------------------------------------
# ¥ ‹t‰ñ“]‚̎擾
#--------------------------------------------------------------------------
def ziifop_reverse_roll
return false
end
#--------------------------------------------------------------------------
# ¥ ‰ñ“]ƒL[“ü—̓^ƒCƒv‚̎擾 (0:ƒvƒŒƒX, 1:ƒgƒŠƒK[, 2:ƒŠƒs[ƒg)
#--------------------------------------------------------------------------
def ziifop_roll_input_type
return 0
end
#--------------------------------------------------------------------------
# ¥ ‰ñ“]‘¬“x‚̎擾 (0:’x‚¢ ` 4:‘¬‚¢)
#--------------------------------------------------------------------------
def ziifop_roll_speed
return 1
end
end
#******************************************************************************
# ¥ ‰æ‘œƒRƒ}ƒ“ƒhŠî–{•”
#******************************************************************************
#==============================================================================
# ¡ Sprite_ZiifCommandSprite
#------------------------------------------------------------------------------
# @ƒRƒ}ƒ“ƒh‰æ‘œE”wŒiEƒJ[ƒ\ƒ‹•\Ž¦—pƒXƒvƒ‰ƒCƒg‚̃X[ƒp[ƒNƒ‰ƒX‚Å‚·B
#==============================================================================
class Sprite_ZiifCommandSprite < Sprite
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize(command_set)
super(command_set.viewport)
@command_set = command_set
init_basic_values
create_bitmap
update
end
#--------------------------------------------------------------------------
# œ Šî–{•Ï”‚̉Šú‰»
#--------------------------------------------------------------------------
def init_basic_values
end
#--------------------------------------------------------------------------
# œ ƒrƒbƒgƒ}ƒbƒv‚Ìì¬
#--------------------------------------------------------------------------
def create_bitmap
end
#--------------------------------------------------------------------------
# œ “à—e‚Ìì¬
#--------------------------------------------------------------------------
def create_contents
end
#--------------------------------------------------------------------------
# œ “à—e‚Ìíœ
#--------------------------------------------------------------------------
def clear_contents
end
#--------------------------------------------------------------------------
# œ ƒXƒvƒ‰ƒCƒgƒRƒ}ƒ“ƒh‚̎擾
#--------------------------------------------------------------------------
def command_set
return @command_set
end
#--------------------------------------------------------------------------
# œ ˆÊ’u‚̎擾
#--------------------------------------------------------------------------
def index
return command_set.sprite_index(self)
end
#--------------------------------------------------------------------------
# œ ƒRƒ}ƒ“ƒh‚̃rƒ…[ƒ|[ƒg‚̎擾
#--------------------------------------------------------------------------
def command_set_viewport
return command_set.viewport
end
#--------------------------------------------------------------------------
# œ ƒRƒ}ƒ“ƒh‚̉Ž‹ó‘Ԃ̎擾
#--------------------------------------------------------------------------
def command_set_visible
return command_set.visible && !command_set.close?
end
#--------------------------------------------------------------------------
# œ ƒRƒ}ƒ“ƒh‚Ì“§–¾“x‚̎擾
#--------------------------------------------------------------------------
def command_set_opacity
return command_set.contents_opacity
end
#--------------------------------------------------------------------------
# œ ˆÊ’uî•ñ‚ÌXV
#--------------------------------------------------------------------------
def update_position
self.viewport = command_set_viewport
self.visible = command_set_visible
self.opacity = command_set_opacity
end
end
#==============================================================================
# ¡ ZiifSpriteCommand
#------------------------------------------------------------------------------
# @‰æ‘œƒRƒ}ƒ“ƒh‘I‘ð‚ðs‚¤‚½‚߂̃‚ƒWƒ…[ƒ‹‚Å‚·BMix-In‚É‚æ‚èŽg—p‚µ‚Ü‚·B
#==============================================================================
module ZiifSpriteCommand
#--------------------------------------------------------------------------
# œ ŒöŠJƒCƒ“ƒXƒ^ƒ“ƒX•Ï”
#--------------------------------------------------------------------------
attr_reader :windowskin # ƒEƒBƒ“ƒhƒEƒXƒLƒ“
attr_reader :viewport # ƒrƒ…[ƒ|[ƒg
attr_reader :active # ‘I‘ðó‘Ô
attr_reader :visible # ‰ÂŽ‹ó‘Ô
attr_reader :x # XÀ•W
attr_reader :y # YÀ•W
attr_reader :width # •
attr_reader :height # ‚‚³
attr_reader :z # ZÀ•W
attr_reader :ox # “]‘—Œ³Œ´“_ XÀ•W
attr_reader :oy # “]‘—Œ³Œ´“_ YÀ•W
attr_reader :padding # —]”’‚Ì‘å‚«‚³
attr_reader :padding_bottom # ‰ºü—]”’‚Ì‘å‚«‚³
attr_reader :opacity # •s“§–¾“x
attr_reader :back_opacity # ”wŒi‚Ì•s“§–¾“x
attr_reader :contents_opacity # ƒRƒ}ƒ“ƒh‚Ì•s“§–¾“x
attr_reader :openness # ƒI[ƒvƒ““x
attr_reader :tone # ”wŒi‚ÌF’²
attr_reader :index # ƒJ[ƒ\ƒ‹ˆÊ’u
attr_reader :help_window # ƒwƒ‹ƒvƒEƒBƒ“ƒhƒE
attr_accessor :cursor_fix # ƒJ[ƒ\ƒ‹ŒÅ’èƒtƒ‰ƒO
attr_accessor :cursor_all # ƒJ[ƒ\ƒ‹‘S‘I‘ðƒtƒ‰ƒO
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize(*args)
init_basic_values(*args)
init_sprite_command
update_tone
refresh
select(0)
activate
end
#--------------------------------------------------------------------------
# œ Šî–{•Ï”‚̉Šú‰»
#--------------------------------------------------------------------------
def init_basic_values(x, y, width = window_width, height = window_height)
@windowskin = Cache.system("Window"
@viewport = nil
@active = true
@visible = true
@x = x
@y = y
@width = width
@height = height
@z = 100
@ox = 0
@oy = 0
@padding = 12
@padding_bottom = 12
@opacity = 255
@back_opacity = 255
@contents_opacity = 255
@openness = 255
@tone = Tone.new
@index = -1
@handler = {}
@cursor_fix = false
@cursor_all = false
@opening = false
@closing = false
end
#--------------------------------------------------------------------------
# œ ƒXƒvƒ‰ƒCƒgƒRƒ}ƒ“ƒh•Ï”‚̉Šú‰»
#--------------------------------------------------------------------------
def init_sprite_command
@command_sprites = []
@object_sprites = {}
create_dummy_bitmap
end
#--------------------------------------------------------------------------
# œ ‰ð•ú
#--------------------------------------------------------------------------
def dispose
dispose_dummy_bitmap
dispose_object_sprites
dispose_command_sprites
end
#--------------------------------------------------------------------------
# œ ƒEƒBƒ“ƒhƒE•‚̎擾
#--------------------------------------------------------------------------
def window_width
return 96
end
#--------------------------------------------------------------------------
# œ ƒEƒBƒ“ƒhƒE‚‚³‚̎擾
#--------------------------------------------------------------------------
def window_height
return 88
end
#--------------------------------------------------------------------------
# œ €–Ú”‚̎擾
#--------------------------------------------------------------------------
def item_max
@list.size
end
#--------------------------------------------------------------------------
# œ ƒRƒ}ƒ“ƒhƒŠƒXƒg‚̃NƒŠƒA
#--------------------------------------------------------------------------
def clear_command_list
@list = []
end
#--------------------------------------------------------------------------
# œ ƒRƒ}ƒ“ƒhƒŠƒXƒg‚Ìì¬
#--------------------------------------------------------------------------
def make_command_list
end
#--------------------------------------------------------------------------
# œ ƒRƒ}ƒ“ƒh‚̒ljÁ
# name : ƒRƒ}ƒ“ƒh–¼
# symbol : ‘Ήž‚·‚éƒVƒ“ƒ{ƒ‹
# enabled : —LŒøó‘Ôƒtƒ‰ƒO
# ext : ”CˆÓ‚ÌŠg’£ƒf[ƒ^
#--------------------------------------------------------------------------
def add_command(name, symbol, enabled = true, ext = nil)
@list.push({:name=>name, :symbol=>symbol, :enabled=>enabled, :ext=>ext})
end
#--------------------------------------------------------------------------
# œ ƒRƒ}ƒ“ƒh–¼‚̎擾
#--------------------------------------------------------------------------
def command(index)
@list[index]
end
#--------------------------------------------------------------------------
# œ ƒRƒ}ƒ“ƒh–¼‚̎擾
#--------------------------------------------------------------------------
def command_name(index)
@list[index][:name]
end
#--------------------------------------------------------------------------
# œ ƒRƒ}ƒ“ƒh‚Ì—LŒøó‘Ô‚ðŽæ“¾
#--------------------------------------------------------------------------
def command_enabled?(index)
@list[index][:enabled]
end
#--------------------------------------------------------------------------
# œ ƒRƒ}ƒ“ƒhƒVƒ“ƒ{ƒ‹‚̎擾
#--------------------------------------------------------------------------
def command_symbol(index)
@list[index][:symbol]
end
#--------------------------------------------------------------------------
# œ ƒRƒ}ƒ“ƒh‚ÌŠg’£ƒf[ƒ^‚̎擾
#--------------------------------------------------------------------------
def command_ext(index)
@list[index][:ext]
end
#--------------------------------------------------------------------------
# œ ‘I‘ð€–ڂ̃Rƒ}ƒ“ƒhƒf[ƒ^‚ðŽæ“¾
#--------------------------------------------------------------------------
def current_data
index >= 0 ? @list[index] : nil
end
#--------------------------------------------------------------------------
# œ ‘I‘ð€–ڂ̃Rƒ}ƒ“ƒh–¼‚ðŽæ“¾
#--------------------------------------------------------------------------
def current_item_name
current_data ? current_data[:name] : ""
end
#--------------------------------------------------------------------------
# œ ‘I‘ð€–Ú‚Ì—LŒøó‘Ô‚ðŽæ“¾
#--------------------------------------------------------------------------
def current_item_enabled?
current_data ? current_data[:enabled] : false
end
#--------------------------------------------------------------------------
# œ ‘I‘ð€–ڂ̃Vƒ“ƒ{ƒ‹‚ðŽæ“¾
#--------------------------------------------------------------------------
def current_symbol
current_data ? current_data[:symbol] : nil
end
#--------------------------------------------------------------------------
# œ ‘I‘ð€–Ú‚ÌŠg’£ƒf[ƒ^‚ðŽæ“¾
#--------------------------------------------------------------------------
def current_ext
current_data ? current_data[:ext] : nil
end
#--------------------------------------------------------------------------
# œ Žw’肳‚ꂽƒVƒ“ƒ{ƒ‹‚ðŽ‚ƒRƒ}ƒ“ƒh‚ɃJ[ƒ\ƒ‹‚ðˆÚ“®
#--------------------------------------------------------------------------
def select_symbol(symbol)
@list.each_index {|i| select(i) if @list[i][:symbol] == symbol }
end
#--------------------------------------------------------------------------
# œ Žw’肳‚ꂽŠg’£ƒf[ƒ^‚ðŽ‚ƒRƒ}ƒ“ƒh‚ɃJ[ƒ\ƒ‹‚ðˆÚ“®
#--------------------------------------------------------------------------
def select_ext(ext)
@list.each_index {|i| select(i) if @list[i][:ext] == ext }
end
#--------------------------------------------------------------------------
# œ ƒXƒvƒ‰ƒCƒgƒRƒ}ƒ“ƒhƒNƒ‰ƒX‚̎擾
#--------------------------------------------------------------------------
def sprite_command_class
return Sprite_ZiifCommandSprite
end
#--------------------------------------------------------------------------
# œ ƒRƒ}ƒ“ƒh”wŒiƒNƒ‰ƒX‚̎擾
#--------------------------------------------------------------------------
def sprite_background_class
return Sprite_ZiifCommandSprite
end
#--------------------------------------------------------------------------
# œ ƒRƒ}ƒ“ƒhƒJ[ƒ\ƒ‹ƒNƒ‰ƒX‚̎擾
#--------------------------------------------------------------------------
def sprite_cursor_class
return Sprite_ZiifCommandSprite
end
#--------------------------------------------------------------------------
# œ ƒRƒ}ƒ“ƒhƒXƒvƒ‰ƒCƒg‚̈ʒu‚ðŽæ“¾
#--------------------------------------------------------------------------
def sprite_index(sprite)
@command_sprites.index(sprite)
end
#--------------------------------------------------------------------------
# œ ƒRƒ}ƒ“ƒhƒXƒvƒ‰ƒCƒg‚Ìì¬
#--------------------------------------------------------------------------
def make_command_sprites
item_max.times {|i| @command_sprites[i] = sprite_command_class.new(self) }
end
#--------------------------------------------------------------------------
# œ ƒRƒ}ƒ“ƒhƒXƒvƒ‰ƒCƒg‚̉ð•ú
#--------------------------------------------------------------------------
def dispose_command_sprites
@command_sprites.each {|sprite| sprite.dispose }
@command_sprites.clear
end
#--------------------------------------------------------------------------
# œ ƒRƒ}ƒ“ƒhƒXƒvƒ‰ƒCƒg‚ÌXV
#--------------------------------------------------------------------------
def update_command_sprites
@command_sprites.each {|sprite| sprite.update }
end
#--------------------------------------------------------------------------
# œ ƒRƒ}ƒ“ƒhƒXƒvƒ‰ƒCƒg‚̈ʒuî•ñ‚ðXV
#--------------------------------------------------------------------------
def update_command_sprites_position
@command_sprites.each {|sprite| sprite.update_position }
end
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒgƒXƒvƒ‰ƒCƒg‚Ìì¬
#--------------------------------------------------------------------------
def make_object_sprites
@object_sprites[:background] = sprite_background_class.new(self)
@object_sprites[:cursor] = sprite_cursor_class.new(self)
end
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒgƒXƒvƒ‰ƒCƒg‚̉ð•ú
#--------------------------------------------------------------------------
def dispose_object_sprites
@object_sprites.each_value {|sprite| sprite.dispose }
@object_sprites.clear
end
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒgƒXƒvƒ‰ƒCƒg‚ÌXV
#--------------------------------------------------------------------------
def update_object_sprites
@object_sprites.each_value {|sprite| sprite.update }
end
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒgƒXƒvƒ‰ƒCƒg‚̈ʒuî•ñ‚ðXV
#--------------------------------------------------------------------------
def update_object_sprites_position
@object_sprites.each_value {|sprite| sprite.update_position }
end
#--------------------------------------------------------------------------
# œ ƒRƒ}ƒ“ƒh“à—e‚Ìì¬
#--------------------------------------------------------------------------
def create_contents
dispose_object_sprites
dispose_command_sprites
make_command_sprites
make_object_sprites
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV
#--------------------------------------------------------------------------
def update
update_tone
update_open if @opening
update_close if @closing
update_move
update_command_sprites
update_object_sprites
process_cursor_move
process_handling
end
#--------------------------------------------------------------------------
# œ ˆÊ’uî•ñ‚ÌXV
#--------------------------------------------------------------------------
def update_position
update_command_sprites_position
update_object_sprites_position
end
#--------------------------------------------------------------------------
# œ XÀ•W‚Ì•ÏX
#--------------------------------------------------------------------------
def x=(x)
@x = x
update_position
end
#--------------------------------------------------------------------------
# œ YÀ•W‚Ì•ÏX
#--------------------------------------------------------------------------
def y=(y)
@y = y
update_position
end
#--------------------------------------------------------------------------
# œ •‚Ì•ÏX
#--------------------------------------------------------------------------
def width=(width)
@width = width
update_position
end
#--------------------------------------------------------------------------
# œ ‚‚³‚Ì•ÏX
#--------------------------------------------------------------------------
def height=(height)
@height = height
update_position
end
#--------------------------------------------------------------------------
# œ ZÀ•W‚Ì•ÏX
#--------------------------------------------------------------------------
def z=(z)
@z = z
update_position
end
#--------------------------------------------------------------------------
# œ XÀ•WAYÀ•WA•A‚‚³‚ð‚Ü‚Æ‚ß‚Ä•ÏX
#--------------------------------------------------------------------------
def move(x, y, width, height)
@x = x
@y = y
@width = width
@height = height
update_position
end
#--------------------------------------------------------------------------
# œ “]‘—Œ³Œ´“_ XÀ•W‚Ì•ÏX
#--------------------------------------------------------------------------
def ox=(ox)
@ox = ox
update_position
end
#--------------------------------------------------------------------------
# œ “]‘—Œ³Œ´“_ YÀ•W‚Ì•ÏX
#--------------------------------------------------------------------------
def oy=(oy)
@oy = oy
update_position
end
#--------------------------------------------------------------------------
# œ —]”’‚Ì‘å‚«‚³‚Ì•ÏX
#--------------------------------------------------------------------------
def padding=(padding)
@padding = padding
@padding_bottom = padding_bottom
update_position
end
#--------------------------------------------------------------------------
# œ ‰ºü—]”’‚Ì‘å‚«‚³‚Ì•ÏX
#--------------------------------------------------------------------------
def padding_bottom=(padding_bottom)
@padding_bottom = padding_bottom
update_position
end
#--------------------------------------------------------------------------
# œ ƒEƒBƒ“ƒhƒEƒXƒLƒ“‚Ì•ÏX
#--------------------------------------------------------------------------
def windowskin=(windowskin)
@windowskin = windowskin
update_position
end
#--------------------------------------------------------------------------
# œ ƒrƒ…[ƒ|[ƒg‚Ì•ÏX
#--------------------------------------------------------------------------
def viewport=(viewport)
@viewport = viewport
update_position
end
#--------------------------------------------------------------------------
# œ ‰ÂŽ‹ó‘Ô‚Ì•ÏX
#--------------------------------------------------------------------------
def visible=(visible)
@visible = visible
update_position
end
#--------------------------------------------------------------------------
# œ •\Ž¦
#--------------------------------------------------------------------------
def show
self.visible = true
self
end
#--------------------------------------------------------------------------
# œ ”ñ•\Ž¦
#--------------------------------------------------------------------------
def hide
self.visible = false
self
end
#--------------------------------------------------------------------------
# œ ƒAƒNƒeƒBƒuó‘Ô‚Ì•ÏX
#--------------------------------------------------------------------------
def active=(active)
@active = active
update_cursor
call_update_help
end
#--------------------------------------------------------------------------
# œ ƒAƒNƒeƒBƒu‰»
#--------------------------------------------------------------------------
def activate
self.active = true
self
end
#--------------------------------------------------------------------------
# œ ”ñƒAƒNƒeƒBƒu‰»
#--------------------------------------------------------------------------
def deactivate
self.active = false
self
end
#--------------------------------------------------------------------------
# œ •s“§–¾“x‚Ì•ÏX
#--------------------------------------------------------------------------
def opacity=(opacity)
@opacity = [[opacity, 255].min, 0].max
update_position
end
#--------------------------------------------------------------------------
# œ ”wŒi‚Ì•s“§–¾“x‚Ì•ÏX
#--------------------------------------------------------------------------
def back_opacity=(opacity)
@back_opacity = [[opacity, 255].min, 0].max
update_position
end
#--------------------------------------------------------------------------
# œ “à—e‚Ì•s“§–¾“x‚Ì•ÏX
#--------------------------------------------------------------------------
def contents_opacity=(opacity)
@contents_opacity = [[opacity, 255].min, 0].max
update_position
end
#--------------------------------------------------------------------------
# œ ƒI[ƒvƒ““x‚Ì•ÏX
#--------------------------------------------------------------------------
def openness=(openness)
@openness = [[openness, 255].min, 0].max
update_position
end
#--------------------------------------------------------------------------
# œ Š®‘S‚ÉŠJ‚¢‚½ó‘Ô‚©‚Ç‚¤‚©H
#--------------------------------------------------------------------------
def open?
(@openness == 255)
end
#--------------------------------------------------------------------------
# œ Š®‘S‚ɕ‚¶‚½ó‘Ô‚©‚Ç‚¤‚©H
#--------------------------------------------------------------------------
def close?
(@openness == 0)
end
#--------------------------------------------------------------------------
# œ ŠJ‚­ˆ—’l‚̎擾
#--------------------------------------------------------------------------
def opening_value
return 48
end
#--------------------------------------------------------------------------
# œ •Â‚¶‚鈗’l‚̎擾
#--------------------------------------------------------------------------
def closing_value
return 48
end
#--------------------------------------------------------------------------
# œ ŠJ‚­ˆ—‚ÌXV
#--------------------------------------------------------------------------
def update_open
self.openness += opening_value
@opening = false if open?
end
#--------------------------------------------------------------------------
# œ •Â‚¶‚鈗‚ÌXV
#--------------------------------------------------------------------------
def update_close
self.openness -= closing_value
@closing = false if close?
end
#--------------------------------------------------------------------------
# œ ŠJ‚­
#--------------------------------------------------------------------------
def open
@opening = true unless open?
@closing = false
self
end
#--------------------------------------------------------------------------
# œ •Â‚¶‚é
#--------------------------------------------------------------------------
def close
@closing = true unless close?
@opening = false
self
end
#--------------------------------------------------------------------------
# œ F’²‚ÌXV
#--------------------------------------------------------------------------
def update_tone
end
#--------------------------------------------------------------------------
# œ ˆÚ“®’†‚©‚Ç‚¤‚©H
#--------------------------------------------------------------------------
def move?
return false
end
#--------------------------------------------------------------------------
# œ ’âŽ~’†‚©‚Ç‚¤‚©H
#--------------------------------------------------------------------------
def stop?
return true
end
#--------------------------------------------------------------------------
# œ ˆÊ’uˆÚ“®‚ÌXV
#--------------------------------------------------------------------------
def update_move
end
#--------------------------------------------------------------------------
# œ ƒJ[ƒ\ƒ‹ˆÊ’u‚ÌÝ’è
#--------------------------------------------------------------------------
def index=(index)
@index = index
update_cursor
call_update_help
end
#--------------------------------------------------------------------------
# œ €–Ú‚Ì‘I‘ð
#--------------------------------------------------------------------------
def select(index)
self.index = index if index
end
#--------------------------------------------------------------------------
# œ €–Ú‚Ì‘I‘ð‰ðœ
#--------------------------------------------------------------------------
def unselect
self.index = -1
end
#--------------------------------------------------------------------------
# œ “®ì‚ɑΉž‚·‚éƒnƒ“ƒhƒ‰‚ÌÝ’è
# method : ƒnƒ“ƒhƒ‰‚Æ‚µ‚ÄÝ’è‚·‚郃\ƒbƒh (Method ƒIƒuƒWƒFƒNƒg)
#--------------------------------------------------------------------------
def set_handler(symbol, method)
@handler[symbol] = method
end
#--------------------------------------------------------------------------
# œ ƒnƒ“ƒhƒ‰‚Ì‘¶ÝŠm”F
#--------------------------------------------------------------------------
def handle?(symbol)
@handler.include?(symbol)
end
#--------------------------------------------------------------------------
# œ ƒnƒ“ƒhƒ‰‚̌ĂÑo‚µ
#--------------------------------------------------------------------------
def call_handler(symbol)
@handler[symbol].call if handle?(symbol)
end
#--------------------------------------------------------------------------
# œ ƒJ[ƒ\ƒ‹‚̈ړ®‰Â”\”»’è
#--------------------------------------------------------------------------
def cursor_movable?
stop? && active && open? && !@cursor_fix && !@cursor_all && item_max > 0
end
#--------------------------------------------------------------------------
# œ ‰ºƒL[‚ª‰Ÿ‚³‚ê‚Ä‚¢‚é‚©‚Ç‚¤‚©H
#--------------------------------------------------------------------------
def input_down?
Input.repeat?(:DOWN)
end
#--------------------------------------------------------------------------
# œ ãƒL[‚ª‰Ÿ‚³‚ê‚Ä‚¢‚é‚©‚Ç‚¤‚©H
#--------------------------------------------------------------------------
def input_up?
Input.repeat?(:UP)
end
#--------------------------------------------------------------------------
# œ ‰EƒL[‚ª‰Ÿ‚³‚ê‚Ä‚¢‚é‚©‚Ç‚¤‚©H
#--------------------------------------------------------------------------
def input_right?
Input.repeat?(:RIGHT)
end
#--------------------------------------------------------------------------
# œ ¶ƒL[‚ª‰Ÿ‚³‚ê‚Ä‚¢‚é‚©‚Ç‚¤‚©H
#--------------------------------------------------------------------------
def input_left?
Input.repeat?(:LEFT)
end
#--------------------------------------------------------------------------
# œ ƒJ[ƒ\ƒ‹‚ð‰º‚ÉˆÚ“®
#--------------------------------------------------------------------------
def cursor_down(wrap = false)
end
#--------------------------------------------------------------------------
# œ ƒJ[ƒ\ƒ‹‚ðã‚Ɉړ®
#--------------------------------------------------------------------------
def cursor_up(wrap = false)
end
#--------------------------------------------------------------------------
# œ ƒJ[ƒ\ƒ‹‚ð‰E‚Ɉړ®
#--------------------------------------------------------------------------
def cursor_right(wrap = false)
end
#--------------------------------------------------------------------------
# œ ƒJ[ƒ\ƒ‹‚ð¶‚Ɉړ®
#--------------------------------------------------------------------------
def cursor_left(wrap = false)
end
#--------------------------------------------------------------------------
# œ ƒJ[ƒ\ƒ‹‚̈ړ®‘Oˆ—
#--------------------------------------------------------------------------
def process_before_cursor_move
@cursor_sound_value = @index
end
#--------------------------------------------------------------------------
# œ ƒJ[ƒ\ƒ‹‚̈ړ®Œãˆ—
#--------------------------------------------------------------------------
def process_after_cursor_move
Sound.play_cursor if @index != @cursor_sound_value
end
#--------------------------------------------------------------------------
# œ ƒJ[ƒ\ƒ‹‚̈ړ®ˆ—
#--------------------------------------------------------------------------
def process_cursor_move
return unless cursor_movable?
process_before_cursor_move
cursor_down (Input.trigger?(:DOWN)) if input_down?
cursor_up (Input.trigger?(:UP)) if input_up?
cursor_right(Input.trigger?(:RIGHT)) if input_right?
cursor_left (Input.trigger?(:LEFT)) if input_left?
process_after_cursor_move
end
#--------------------------------------------------------------------------
# œ Œˆ’è‚âƒLƒƒƒ“ƒZƒ‹‚Ȃǂ̃nƒ“ƒhƒŠƒ“ƒOˆ—
#--------------------------------------------------------------------------
def process_handling
return unless open? && active && stop?
return process_ok if ok_enabled? && Input.trigger?(:C)
return process_cancel if cancel_enabled? && Input.trigger?(:B)
return process_pagedown if handle?(:pagedown) && Input.trigger?(:R)
return process_pageup if handle?(:pageup) && Input.trigger?(:L)
end
#--------------------------------------------------------------------------
# œ Œˆ’舗‚Ì—LŒøó‘Ô‚ðŽæ“¾
#--------------------------------------------------------------------------
def ok_enabled?
return true
end
#--------------------------------------------------------------------------
# œ ƒLƒƒƒ“ƒZƒ‹ˆ—‚Ì—LŒøó‘Ô‚ðŽæ“¾
#--------------------------------------------------------------------------
def cancel_enabled?
handle?(:cancel)
end
#--------------------------------------------------------------------------
# œ Œˆ’èƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽ‚Æ‚«‚̈—
#--------------------------------------------------------------------------
def process_ok
if current_item_enabled?
Sound.play_ok
Input.update
deactivate
call_ok_handler
else
Sound.play_buzzer
end
end
#--------------------------------------------------------------------------
# œ Œˆ’èƒnƒ“ƒhƒ‰‚̌ĂÑo‚µ
#--------------------------------------------------------------------------
def call_ok_handler
if handle?(current_symbol)
call_handler(current_symbol)
elsif handle?(:ok)
call_ok_handler_default
else
activate
end
end
#--------------------------------------------------------------------------
# œ Œˆ’èƒnƒ“ƒhƒ‰‚̌ĂÑo‚µ (ƒfƒtƒHƒ‹ƒg)
#--------------------------------------------------------------------------
def call_ok_handler_default
call_handler(:ok)
end
#--------------------------------------------------------------------------
# œ ƒLƒƒƒ“ƒZƒ‹ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽ‚Æ‚«‚̈—
#--------------------------------------------------------------------------
def process_cancel
Sound.play_cancel
Input.update
deactivate
call_cancel_handler
end
#--------------------------------------------------------------------------
# œ ƒLƒƒƒ“ƒZƒ‹ƒnƒ“ƒhƒ‰‚̌ĂÑo‚µ
#--------------------------------------------------------------------------
def call_cancel_handler
call_handler(:cancel)
end
#--------------------------------------------------------------------------
# œ L ƒ{ƒ^ƒ“iPageUpj‚ª‰Ÿ‚³‚ꂽ‚Æ‚«‚̈—
#--------------------------------------------------------------------------
def process_pageup
Sound.play_cursor
Input.update
deactivate
call_handler(:pageup)
end
#--------------------------------------------------------------------------
# œ R ƒ{ƒ^ƒ“iPageDownj‚ª‰Ÿ‚³‚ꂽ‚Æ‚«‚̈—
#--------------------------------------------------------------------------
def process_pagedown
Sound.play_cursor
Input.update
deactivate
call_handler(:pagedown)
end
#--------------------------------------------------------------------------
# œ ƒJ[ƒ\ƒ‹‚ÌXV
#--------------------------------------------------------------------------
def update_cursor
update_position
end
#--------------------------------------------------------------------------
# œ ƒwƒ‹ƒvƒEƒBƒ“ƒhƒE‚ÌÝ’è
#--------------------------------------------------------------------------
def help_window=(help_window)
@help_window = help_window
call_update_help
end
#--------------------------------------------------------------------------
# œ ƒwƒ‹ƒvƒEƒBƒ“ƒhƒEXVƒƒ\ƒbƒh‚̌ĂÑo‚µ
#--------------------------------------------------------------------------
def call_update_help
update_help if active && @help_window
end
#--------------------------------------------------------------------------
# œ ƒwƒ‹ƒvƒEƒBƒ“ƒhƒE‚ÌXV
#--------------------------------------------------------------------------
def update_help
@help_window.clear
end
#--------------------------------------------------------------------------
# œ ‘S€–Ú‚Ì•`‰æ
#--------------------------------------------------------------------------
def draw_all_items
item_max.times {|i| draw_item(i) }
end
#--------------------------------------------------------------------------
# œ €–Ú‚Ì•`‰æ
#--------------------------------------------------------------------------
def draw_item(index)
@command_sprites[index].create_contents
end
#--------------------------------------------------------------------------
# œ €–Ú‚ÌÁ‹Ž
#--------------------------------------------------------------------------
def clear_item(index)
@command_sprites[index].clear_contents
end
#--------------------------------------------------------------------------
# œ €–Ú‚ÌÄ•`‰æ
#--------------------------------------------------------------------------
def redraw_item(index)
clear_item(index) if index >= 0
draw_item(index) if index >= 0
end
#--------------------------------------------------------------------------
# œ ‘I‘ð€–Ú‚ÌÄ•`‰æ
#--------------------------------------------------------------------------
def redraw_current_item
redraw_item(@index)
end
#--------------------------------------------------------------------------
# œ ƒŠƒtƒŒƒbƒVƒ…
#--------------------------------------------------------------------------
def refresh
clear_command_list
make_command_list
create_contents
draw_all_items
update_position
end
#--------------------------------------------------------------------------
# › ƒ_ƒ~[ƒrƒbƒgƒ}ƒbƒv‚Ìì¬ (ƒEƒBƒ“ƒhƒEŒÝŠ·—p)
#--------------------------------------------------------------------------
def create_dummy_bitmap
@dummy_bitmap = Bitmap.new(32, 32)
end
#--------------------------------------------------------------------------
# › ƒ_ƒ~[ƒrƒbƒgƒ}ƒbƒv‚̉ð•ú (ƒEƒBƒ“ƒhƒEŒÝŠ·—p)
#--------------------------------------------------------------------------
def dispose_dummy_bitmap
@dummy_bitmap.dispose
end
#--------------------------------------------------------------------------
# › ƒEƒBƒ“ƒhƒE“à—e‚̎擾 (ƒEƒBƒ“ƒhƒEŒÝŠ·—p)
#--------------------------------------------------------------------------
def contents
@dummy_bitmap
end
#--------------------------------------------------------------------------
# › ƒJ[ƒ\ƒ‹‚Ì‹éŒ` (ƒEƒBƒ“ƒhƒEŒÝŠ·—p)
#--------------------------------------------------------------------------
def cursor_rect
Rect.new(self.x, self.y, self.width, self.height)
end
#--------------------------------------------------------------------------
# › ƒXƒNƒ[ƒ‹—p–îˆó‚̉Ž‹ó‘Ô (ƒEƒBƒ“ƒhƒEŒÝŠ·—p)
#--------------------------------------------------------------------------
def arrows_visible
return true
end
#--------------------------------------------------------------------------
# › ƒXƒNƒ[ƒ‹—p–îˆó‚̉Ž‹ó‘Ô‚Ì•ÏX (ƒEƒBƒ“ƒhƒEŒÝŠ·—p)
#--------------------------------------------------------------------------
def arrows_visible=(arrows_visible)
end
#--------------------------------------------------------------------------
# › ƒ|[ƒY‚̉Ž‹ó‘Ô (ƒEƒBƒ“ƒhƒEŒÝŠ·—p)
#--------------------------------------------------------------------------
def pause
return false
end
#--------------------------------------------------------------------------
# › ƒ|[ƒY‚̉Ž‹ó‘Ô‚Ì•ÏX (ƒEƒBƒ“ƒhƒEŒÝŠ·—p)
#--------------------------------------------------------------------------
def pause=(pause)
end
end
#******************************************************************************
# ¥ ‰ñ“]ƒAƒCƒRƒ“ƒRƒ}ƒ“ƒh•”
#******************************************************************************
#==============================================================================
# ¡ Sprite_ZiifRollIconCommand
#------------------------------------------------------------------------------
# @‰ñ“]ƒRƒ}ƒ“ƒhƒAƒCƒRƒ“•\Ž¦—p‚̃Xƒvƒ‰ƒCƒg‚Å‚·B
#==============================================================================
class Sprite_ZiifRollIconCommand < Sprite_ZiifCommandSprite
#--------------------------------------------------------------------------
# œ ‰ð•ú
#--------------------------------------------------------------------------
def dispose
self.bitmap.dispose
super
end
#--------------------------------------------------------------------------
# œ ƒrƒbƒgƒ}ƒbƒv‚Ìì¬
#--------------------------------------------------------------------------
def create_bitmap
self.bitmap = Bitmap.new(24, 24)
self.ox = self.bitmap.width / 2
self.oy = self.bitmap.height / 2
end
#--------------------------------------------------------------------------
# œ ƒAƒCƒRƒ“”Ô†‚̎擾
#--------------------------------------------------------------------------
def icon_index
ZiifManager.command_icon_index(command_set.command(self.index))
end
#--------------------------------------------------------------------------
# œ ƒAƒCƒRƒ“”Ô†‚̎擾
#--------------------------------------------------------------------------
def enabled
command_set.command_enabled?(self.index)
end
#--------------------------------------------------------------------------
# œ ”¼“§–¾•`‰æ—p‚̃Aƒ‹ƒtƒ@’l‚ðŽæ“¾
#--------------------------------------------------------------------------
def translucent_alpha
return 160
end
#--------------------------------------------------------------------------
# œ “à—e‚Ìì¬
#--------------------------------------------------------------------------
def create_contents
draw_icon
end
#--------------------------------------------------------------------------
# œ ƒAƒCƒRƒ“‚ð•`‰æ
#--------------------------------------------------------------------------
def draw_icon
bitmap = Cache.system("Iconset"
icon_index = self.icon_index
rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
self.bitmap.blt(0, 0, bitmap, rect, enabled ? 255 : translucent_alpha)
end
#--------------------------------------------------------------------------
# œ “à—e‚Ìíœ
#--------------------------------------------------------------------------
def clear_contents
self.bitmap.clear
end
#--------------------------------------------------------------------------
# œ ˆÊ’uî•ñ‚ÌXV
#--------------------------------------------------------------------------
def update_position
super
update_roll
end
#--------------------------------------------------------------------------
# œ ‰ñ“]•‚̎擾
#--------------------------------------------------------------------------
def roll_width
command_set.width * command_set.openness / 510
end
#--------------------------------------------------------------------------
# œ ‰ñ“]‚‚³‚̎擾
#--------------------------------------------------------------------------
def roll_height
command_set.height * command_set.openness / 510
end
#--------------------------------------------------------------------------
# œ ‰ñ“]Šp“x‚̎擾
#--------------------------------------------------------------------------
def roll_angle
angle = (self.index - command_set.index) * command_set.move_size
angle += command_set.roll_angle
end
#--------------------------------------------------------------------------
# œ ‰ñ“]ˆÊ’u‚ÌXV
#--------------------------------------------------------------------------
def update_roll
angle = roll_angle
self.x = roll_width * Math.sin(angle) + command_set.x
self.y = roll_height * (-Math.cos(angle)) + command_set.y
self.z = command_set.z
end
end
#==============================================================================
# ¡ Sprite_ZiifRollIconBackground
#------------------------------------------------------------------------------
# @‰æ‘œƒRƒ}ƒ“ƒh”wŒi‚̃Xƒvƒ‰ƒCƒg‚Å‚·B
#==============================================================================
class Sprite_ZiifRollIconBackground < Sprite_ZiifCommandSprite
#--------------------------------------------------------------------------
# œ ‰ð•ú
#--------------------------------------------------------------------------
def dispose
self.bitmap.dispose if command_set.background_filename.empty?
super
end
#--------------------------------------------------------------------------
# œ ƒrƒbƒgƒ}ƒbƒv‚Ìì¬
#--------------------------------------------------------------------------
def create_bitmap
self.bitmap = Cache.system(command_set.background_filename)
self.ox = self.bitmap.width / 2
self.oy = self.bitmap.height / 2
end
#--------------------------------------------------------------------------
# œ ƒRƒ}ƒ“ƒh‚Ì“§–¾“x‚̎擾
#--------------------------------------------------------------------------
def command_set_opacity
opacity = command_set.opacity
opacity *= command_set.back_opacity
opacity *= command_set.openness
opacity /= 65025
end
#--------------------------------------------------------------------------
# œ ˆÊ’uî•ñ‚ÌXV
#--------------------------------------------------------------------------
def update_position
super
self.x = command_set.x
self.y = command_set.y
self.z = command_set.z - 10
end
end
#==============================================================================
# ¡ Sprite_ZiifRollIconCursor
#------------------------------------------------------------------------------
# @‰æ‘œƒRƒ}ƒ“ƒhƒJ[ƒ\ƒ‹‚̃Xƒvƒ‰ƒCƒg‚Å‚·B
#==============================================================================
class Sprite_ZiifRollIconCursor < Sprite_ZiifCommandSprite
#--------------------------------------------------------------------------
# œ ‰ð•ú
#--------------------------------------------------------------------------
def dispose
self.bitmap.dispose if command_set.cursor_filename.empty?
super
end
#--------------------------------------------------------------------------
# œ ƒrƒbƒgƒ}ƒbƒv‚Ìì¬
#--------------------------------------------------------------------------
def create_bitmap
self.bitmap = Cache.system(command_set.cursor_filename)
self.ox = self.bitmap.width / 2
self.oy = self.bitmap.height / 2
@effect_count = 0
end
#--------------------------------------------------------------------------
# œ ƒRƒ}ƒ“ƒh‚Ì“§–¾“x‚̎擾
#--------------------------------------------------------------------------
def command_set_opacity
if @effect_count < 32
value = 176 + @effect_count * 4
else
value = 432 - @effect_count * 4
end
return (value * command_set.contents_opacity / 255)
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV
#--------------------------------------------------------------------------
def update
super
update_effect
end
#--------------------------------------------------------------------------
# œ ‰‰oŒø‰Ê‚ÌXV
#--------------------------------------------------------------------------
def update_effect
self.opacity = command_set_opacity
@effect_count = 0 if @effect_count == 64
@effect_count += 1
end
#--------------------------------------------------------------------------
# œ ‰ñ“]•‚̎擾
#--------------------------------------------------------------------------
def roll_width
return 0
end
#--------------------------------------------------------------------------
# œ ‰ñ“]‚‚³‚̎擾
#--------------------------------------------------------------------------
def roll_height
(- command_set.height * command_set.openness / 510)
end
#--------------------------------------------------------------------------
# œ ˆÊ’uî•ñ‚ÌXV
#--------------------------------------------------------------------------
def update_position
super
self.x = command_set.x + roll_width
self.y = command_set.y + roll_height
self.z = command_set.z - 5
end
end
#==============================================================================
# ¡ Window_ZiifRollIconCommandName
#------------------------------------------------------------------------------
# @‰ñ“]ƒAƒCƒRƒ“ƒRƒ}ƒ“ƒh‚Ì‘I‘ðƒRƒ}ƒ“ƒh–¼‚ð•\Ž¦‚·‚éƒEƒBƒ“ƒhƒE‚Å‚·B
#==============================================================================
class Window_ZiifRollIconCommandName < Window_Base
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize(command_set)
super(0, 0, command_set.width, fitting_height(1))
@command_set = command_set
self.opacity = 0
end
#--------------------------------------------------------------------------
# œ ƒXƒvƒ‰ƒCƒgƒRƒ}ƒ“ƒh‚̎擾
#--------------------------------------------------------------------------
def command_set
return @command_set
end
#--------------------------------------------------------------------------
# œ XÀ•W‚̎擾
#--------------------------------------------------------------------------
def window_x
(command_set.x - self.width / 2)
end
#--------------------------------------------------------------------------
# œ YÀ•W‚̎擾
#--------------------------------------------------------------------------
def window_y
(command_set.y - self.height / 2)
end
#--------------------------------------------------------------------------
# œ ƒRƒ}ƒ“ƒh‚̃rƒ…[ƒ|[ƒg‚̎擾
#--------------------------------------------------------------------------
def command_set_viewport
return command_set.viewport
end
#--------------------------------------------------------------------------
# œ ƒRƒ}ƒ“ƒh‚̉Ž‹ó‘Ԃ̎擾
#--------------------------------------------------------------------------
def command_set_visible
return command_set.visible && command_set.open?
end
#--------------------------------------------------------------------------
# œ ƒRƒ}ƒ“ƒh‚Ì“§–¾“x‚̎擾
#--------------------------------------------------------------------------
def command_set_opacity
return command_set.contents_opacity
end
#--------------------------------------------------------------------------
# œ ˆÊ’uî•ñ‚ÌXV
#--------------------------------------------------------------------------
def update_position
set_information
update_base_position
end
#--------------------------------------------------------------------------
# œ Šî–{‚̈ʒuî•ñ‚ÌXV
#--------------------------------------------------------------------------
def update_base_position
self.viewport = command_set_viewport
self.visible = command_set_visible
self.contents_opacity = command_set_opacity
self.x = window_x + command_set.info_window_offset_x
self.y = window_y + command_set.info_window_offset_y
self.z = command_set.z + 10
end
#--------------------------------------------------------------------------
# œ •\Ž¦î•ñ‚ÌÝ’è
#--------------------------------------------------------------------------
def set_information
return if command_set.current_item_name == @name
@name = command_set.current_item_name
refresh
end
#--------------------------------------------------------------------------
# œ ƒŠƒtƒŒƒbƒVƒ…
#--------------------------------------------------------------------------
def refresh
contents.clear
texts = command_set.info_text_separate? ? @name.scan(/\S+/) : [@name]
texts.push("" if texts.empty?
self.width = texts.collect {|text| text_size(text).width + 8 }.max
self.width += standard_padding * 2
self.height = fitting_height(texts.size)
create_contents
texts.each_with_index do |text, line|
draw_text(0, line_height * line, contents.width, line_height, text, 1)
end
end
end
#==============================================================================
# ¡ ZiifSpriteCommand_RollIcon
#------------------------------------------------------------------------------
# @‰ñ“]ƒAƒCƒRƒ“ƒRƒ}ƒ“ƒh‘I‘ð‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹‚Å‚·BMix-In‚É‚æ‚èŽg—p‚µ‚Ü‚·B
#==============================================================================
module ZiifSpriteCommand_RollIcon
#--------------------------------------------------------------------------
# œ Mix-In
#--------------------------------------------------------------------------
include ZiifSpriteCommand # ‰æ‘œƒRƒ}ƒ“ƒh‘I‘ðƒ‚ƒWƒ…[ƒ‹
#--------------------------------------------------------------------------
# œ ŒöŠJƒCƒ“ƒXƒ^ƒ“ƒX•Ï”
#--------------------------------------------------------------------------
attr_reader :move_size # ˆÚ“®ƒTƒCƒY
attr_reader :move_speed # ˆÚ“®‘¬“x
attr_reader :move_count # ˆÚ“®ƒJƒEƒ“ƒg
attr_reader :move_type # ˆÚ“®ƒ^ƒCƒv
#--------------------------------------------------------------------------
# œ ƒXƒvƒ‰ƒCƒgƒRƒ}ƒ“ƒh•Ï”‚̉Šú‰»
#--------------------------------------------------------------------------
def init_sprite_command
super
@move_size = 0
@move_speed = 64
@move_count = 0
@move_type = nil
end
#--------------------------------------------------------------------------
# œ ‹t‰ñ“]‚Ì”»’è
#--------------------------------------------------------------------------
def reverse_roll?
return $game_system.ziifop_reverse_roll
end
#--------------------------------------------------------------------------
# œ Šp“x‚Ì·‚̎擾
#--------------------------------------------------------------------------
def angle_difference
(item_max > 0 ? Math::PI * 2 / item_max : 0)
end
#--------------------------------------------------------------------------
# œ ‰ñ“]‘¬“x‚̎擾
#--------------------------------------------------------------------------
def roll_speed
([64 - item_max * 3, 16].max * correct_roll_speed)
end
#--------------------------------------------------------------------------
# œ ‰ñ“]‘¬“x‚Ì•â³’l‚̎擾
#--------------------------------------------------------------------------
def correct_roll_speed
case $game_system.ziifop_roll_speed
when 0; return 0.6 # ’x‚¢
when 1; return 0.8 # ‚â‚â’x‚¢
when 2; return 1 # •’Ê
when 3; return 1.2 # ‚â‚⑬‚¢
when 4; return 1.4 # ‘¬‚¢
end
end
#--------------------------------------------------------------------------
# œ ‰ñ“]“®ìŽž‚ÌŠp“x‚̎擾
#--------------------------------------------------------------------------
def roll_angle
(move? ? move_count * move_speed * correct_roll_angle / 360 : 0)
end
#--------------------------------------------------------------------------
# œ ‰ñ“]•ûŒü‚Ì•â³’l‚̎擾
#--------------------------------------------------------------------------
def correct_roll_angle
case @move_type
when :right ; return 1 # ‰E‰ñ“]
when :left ; return -1 # ¶‰ñ“]
else ; return 0
end
end
#--------------------------------------------------------------------------
# œ ‰ñ“]ƒJƒEƒ“ƒg





Merci à Maki et KuroFidy pour ces cadeaux:

Spoiler