Advertisement
Dekita

amn 1.7

Feb 7th, 2013
3,003
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 39.46 KB | None | 0 0
  1. =begin =========================================================================
  2. Dekita's v1.7
  3. ★ Animatéd Map Namé™ ★
  4.  
  5. ================================================================================
  6. Script Information:
  7. ====================
  8. This script creates a highly dynamic and customisable map name "window"
  9. and gives the ability to remove the old (shit) one.
  10.  
  11. Features :~
  12. Each map can have its own unique map name display features,
  13. such as... Location, Icon, Font, Color, Outline Color , Size,
  14. Effect, Position, Background.
  15. Each Individual letter can also now have its own unique effects, color, size,
  16. ect..
  17.  
  18. ================================================================================
  19. ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
  20. ================================================================================
  21. 1. You must give credit to "Dekita"
  22. 2. You are NOT allowed to repost this script.(or modified versions)
  23. 3. You are NOT allowed to convert this script.(into other game engines e.g RGSS2)
  24. 4. You are NOT allowed to use this script for Commercial games.
  25. 5. ENJOY!
  26.  
  27. "FINE PRINT"
  28. By using this script you hereby agree to the above terms and conditions,
  29. if any violation of the above terms occurs "legal action" may be taken.
  30. Not understanding the above terms and conditions does NOT mean that
  31. they do not apply to you.
  32. If you wish to discuss the terms and conditions in further detail you can
  33. contact me at http://dekitarpg.wordpress.com/ or DekitaRPG@gmail.com
  34.  
  35. ================================================================================
  36. History:
  37. =========
  38. D /M /Y
  39. o6/o2/2o13 - Fixed Bug for BG when Map has no display name,
  40. Added individual letter effects and slide,
  41. Fixed a few typos,
  42. o5/o2/2o13 - Added individual letter color/outline color,
  43. Added individual letter fonts, bold, italic,
  44. o4/o2/2o13 - Added "new-Line Letter",
  45. Added individual letter size,
  46. 21/o1/2o13 - Added individual letter position to fix the rpg maker
  47. "irregular letter" bug,(for map name window only obviously)
  48. 11/o1/2o13 - increased efficiency,
  49. - added background option,
  50. - fixed bug, (icons not doing name effect properly)
  51. o9/o1/2o13 - added 18 effects,
  52. o8/o1/2o13 - added 8 effects,
  53. fixed bug, (typo)
  54. o6/o1/2o13 - started && finished,
  55.  
  56. ================================================================================
  57. Known Bugs:
  58. ============
  59. N/A
  60.  
  61. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  62. If a new bug is found please contact me at
  63. http://dekitarpg.wordpress.com/
  64.  
  65. ================================================================================
  66. INSTRUCTIONS:
  67. ==============
  68. Place this script UNDER "▼ Materials" and ABOVE "▼ Main" in your script editor.
  69.  
  70. ================================================================================
  71. SCRIPT CALLS:
  72. =============
  73. reset_map_name
  74. ^ Does what it says.(and resets the map name display trigger and shows it again)
  75.  
  76. ================================================================================
  77. NOTETAGS: (map noteboxes)
  78. ==========
  79.  
  80. Font_Name_Tags :
  81. <FONT NAME: X>
  82. <FN: X>
  83. replace X with the Font_Name array index.
  84.  
  85. Font_Size_Tags :
  86. <FONT SIZE: X>
  87. <FS: X>
  88. replace X with the font size.
  89.  
  90. Font_Bold_Tags :
  91. <FONT BOLD: bool>
  92. <FB: bool>
  93. replace bool with true or false
  94.  
  95. Font-italic_Tags :
  96. <FONT ITALIC: bool>
  97. <FI: bool>
  98. replace bool with true or false
  99.  
  100. Font_Color_Tags :
  101. (main color tags)
  102. <FONT COLOR: red, grn, blu, alp>
  103. <FC: red, grn, blu, alp>
  104. (outline color tags)
  105. <FONT OUT COLOR: red, grn, blu, alp>
  106. <FOC: red, grn, blu, alp>
  107. red = the red value of the font
  108. grn = the green value of the font
  109. blu = the blue value of the font
  110. alp = the alpha value of the font
  111.  
  112. Icon_id_Tags :
  113. <NAME ICON: X>
  114. <ICON: X>
  115. <NI: X>
  116. replace x with the icon id from your iconset
  117.  
  118. Icon_Position_Tags :
  119. <ICON POS: x, y>
  120. <IP, x, y>
  121. x / y = the screen position.
  122.  
  123. Icon_Center_Tags :
  124. <ICON CENTER: bool_X, bool_Y>
  125. <ICEN: bool_X, bool_Y>
  126. bool_X / bool_Y should be replaced with true or false e.g <ICEN: true, false>
  127. this would center the icon's x value in the middle but not the y
  128.  
  129. Icon_Effect_Tags :
  130. <ICON EFFECT: bool>
  131. <IC: bool>
  132. bool = true or false
  133.  
  134. Map_Name_Effect_Tags :
  135. <NAME EFFECT: id>
  136. <NAME EFF: id>
  137. <NE: id>
  138. id = the effect id for this map.
  139.  
  140. <NO NAME EFFECT>
  141. <NO NAME EFF>
  142. <NO NE>
  143. makes this map have no name effect
  144.  
  145. Map_Name_Slide_Tags :
  146. <NAME SLIDE: dist>
  147. <NS DIST: dist>
  148. <NSD: dist>
  149. dist = the distance of the slide, eg. 180
  150.  
  151. Map_Name_Position_Tags :
  152. <NAME POS: x, y>
  153. <NP: x, y>
  154. x, y = the position of the map name
  155.  
  156. <NAME CENTER: bool_X, bool_Y>
  157. <NCEN: bool_X, bool_Y>
  158. bool_X / bool_Y should be replaced with true or false e.g <NCEN: true, false>
  159. this would center the name's x value in the middle but not the y
  160.  
  161. Map_Name_L_S_D_Tags :
  162. <NAME DELAY: val>
  163. <ND: val>
  164. val = the delay value from one letter showing till the next.
  165.  
  166. BACKGROUND NOTETAGS :
  167. <BACKGROUND: "IMAGE NAME">
  168. <BG: "IMAGE NAME">
  169. These notetags will change the maps background image name,
  170. for use if you want t use a special image for a background box :p
  171.  
  172. <BGPOS: x, y>
  173. <BGP: x, y>
  174. Background box position.
  175.  
  176. <SHOW BG: bool>
  177. <SBG: bool>
  178. Do you want to show the background ? bool = true / false
  179.  
  180.  
  181. Single Huge Notetag :
  182. Tired of putting loads of little '<' and '>' ? use this notetag .
  183. <MAP NAME>
  184. # -- notes go here
  185. <\MAP NAME>
  186. or
  187. <MNW>
  188. # -- notes go here
  189. <\MNW>
  190.  
  191. the notes for inside these notetags are the same as above without the '<' and '>'
  192. e.g
  193.  
  194. <MNW>
  195. FN: X
  196. FS: X
  197. FB: bool
  198. FI: bool
  199. FC: red, grn, blu, alp
  200. FOC: red, grn, blu, alp
  201. NI: X
  202. IP, x, y
  203. ICEN: bool_X, bool_Y
  204. IC: bool
  205. NE: id
  206. NO NE
  207. NSD: dist
  208. NP: x, y
  209. NCEN: bool_X, bool_Y
  210. ND: val
  211. BG: "IMAGENAME"
  212. BGP: x, y
  213. SBG: bool
  214. </MNW>
  215.  
  216. <LET: id, x, y>
  217. <letter id, x, y>
  218. id = the id position of the letter, the first letter is 0, second = 1 ect.
  219. x = the extra distance added to the origional x position of this letter
  220. y = the extra distance added to the origional y position of this letter
  221. NOTE : This notetag cannot be used within the "large notetag"
  222. NOTE" : You can put as may of this notetag into a map's notebox as you like
  223. e.g
  224. <let: 0, 2, 0>
  225. <let: 1, 2, 0>
  226. <let: 3, 2, 0>
  227.  
  228. Use these notetags for individual letter effects, ie, size, font, color..
  229. You must use one of these notetags for each letter you wish to modify
  230. you cannot use these in the large notetag..
  231.  
  232. <L SIZE: letter_id, size>
  233. <let size: letter_id, size>
  234.  
  235. <LCOL: letter_id,red,grn,blu,alpha>
  236. <let col: letter_id,red,grn,blu,alpha>
  237.  
  238. <LOC: letter_id,red,grn,blu,alpha>
  239. <let ocol: letter_id,red,grn,blu,alpha>
  240.  
  241. <L Fon: letter_id,font_id>
  242. <let font: letter_id,font_id>
  243.  
  244. <L Bol: letter_id,boolean>
  245. <let bold: letter_id,boolean>
  246.  
  247. <L Ita: letter_id,boolean>
  248. <let italic: letter_id,boolean>
  249.  
  250. <L FX: letter_id, effect_type>
  251. <let effect: letter_id,effect_type>
  252.  
  253. <L SLI: letter_id, slide>
  254. <let slide: letter_id,slide>
  255.  
  256.  
  257. letter_id = the id of the letter, eg. 0, 1, 2, 3
  258. red = the red value
  259. grn = the green value
  260. blu = the blue value
  261. alpha = the visibility of the color
  262. boolean = true or false
  263. font_id = the font array to use for this letter
  264. effect_type = the effect type to use for this letter.
  265.  
  266. =end #=========================================================================#
  267. module Map_Name_Window
  268. Font_Name=[]#Do Not Delete.
  269.  
  270. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  271. # ★ GENERAL SETTINGS ★
  272. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  273.  
  274. Remove_Default_Name_Window = true # obviously...
  275.  
  276. # Z value for the new map name "window" reccommended to be about 200
  277. Map_Name_z = 200
  278.  
  279. # The delay from entering the map till the name begins to show. (Frames)
  280. Delay_Timer = 30
  281.  
  282. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  283. # ★ FONT SETTINGS ★
  284. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  285.  
  286. # This adjusts the fonts used for your maps. If the font at the start of
  287. # the array doesn't exist on the player's computer, it'll use the next one.
  288. # the games default font will be used if a maps font name is unspecified.
  289. Font_Name[0] = ["VL Gothic", "Arial" ] + Font.default_name
  290. Font_Name[1] = ["Arial" , "Xirod" ] + Font.default_name
  291. Font_Name[2] = ["Xirod" , "Arial Bold"] + Font.default_name
  292. Font_Name[3] = ["Comic Sans MS"] + Font.default_name
  293. Font_Name[4] = ["Verdana" ] + Font.default_name
  294. Font_Name[5] = ["Arial" ] + Font.default_name
  295. Font_Name[6] = ["Courier" ] + Font.default_name
  296.  
  297. Font_Size = 16
  298.  
  299. Font_Bold = true
  300.  
  301. Font_Italic = true
  302.  
  303. Font_Color = [ 255, 255, 255, 255 ] # [ red, grn, blu, alpha ]
  304.  
  305. Font_Out_Col=[ 0 , 0 , 0 , 128 ] # Font outline color, same format as above.
  306.  
  307. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  308. # ★ ICON SETTINGS ★
  309. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  310.  
  311. #Icon= [ use? , icon id ]
  312. Icon = [ true , 304 ] # Default iconset map icon = 231
  313.  
  314. Icon_Pos = [15, 15] # [x, y] (position of the icon)
  315.  
  316. Icon_Has_Effects = true # Icon has the same effects as letters ?
  317.  
  318. Center_Icon = [ false , false ] # format = [ center x ? , center y ? ]
  319.  
  320. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  321. # ★ LETTER SETTINGS ★
  322. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  323.  
  324. Map_Name_Pos = [25, 10] # [x, y] (position of the first letter in the map name)
  325.  
  326. # The delay between each letter showing, this results in a fade like effect.
  327. L_S_D_Timer = 15
  328.  
  329. Center_Name = [ false , false ] # format = [ center x ? , center y ? ]
  330.  
  331. Slide_Distance = Graphics.width / 4 # the distance that letters slide.
  332.  
  333. Letter_Effects = true # do letters have effects ? e.g slide, spin...
  334.  
  335. L_Effect_Type = 0
  336. # 0 = Basic Left Slide
  337. # 1 = Basic Right Slide
  338. # 2 = Top Drop Left Slide
  339. # 3 = Top Drop Right Slide
  340. # 4 = Bottoms up Left Slide
  341. # 5 = Bottoms up Right Slide
  342. # 6 = Basic Left Spin
  343. # 7 = Basic Right Spin
  344. # 8 = Basic Left Swirl Top
  345. # 9 = Basic Left Swirl Bottom
  346. # 10 = Basic Right Swirl Bottom
  347. # 11 = Basic Right Swirl Top
  348. # 12 = Slide Up
  349. # 13 = Slide Down
  350. # 14 = Slide Up & Left
  351. # 15 = Slide Up & Right
  352. # 16 = Slide Down & Left
  353. # 17 = Slide Down & Right
  354. # 18 = Slide Up & Left, Left Spin
  355. # 19 = Slide Up & Left, Right Spin
  356. # 20 = Slide Up & Right, Left Spin
  357. # 21 = Slide Up & Right, Right Spin
  358. # 22 = Slide Down & Left, Left Spin
  359. # 23 = Slide Down & Left, Right Spin
  360. # 24 = Slide Down & Right, Left Spin
  361. # 25 = Slide Down & Right, Right Spin
  362.  
  363. # If this 'letter' is used in a map name, it will trigger a new line
  364. # all letters afterwords will be placed on the new line.
  365. # they can then still be repositioned ect using notetags.
  366. # REMEMBER :~ if using the new-line symbol, it still counts as a letter
  367. # even though it wont be visable.
  368. NewLine_Letter = '%'
  369. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  370. # ★ BACKGROUND SETTINGS ★
  371. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  372.  
  373. # Basic background color , format = (red , green , blue , alpha)
  374. BackGround_Color_1 = Color.new(0,0,0,128)
  375. BackGround_Color_2 = Color.new(0,0,0,0)
  376.  
  377. Show_Background = true#false # self explanitory
  378.  
  379. # This is the name of the folder you want to store your map name bg images in,
  380. # This MUST be within your games poject folder.
  381. BG_Image_Folder = "Graphics/Map Windows/"
  382.  
  383. end # DO NOT DELETE #
  384. module M_N_W_RegExp #
  385. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  386. # ★ REGEXP SETTINGS ★
  387. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  388. # only change these if you know what you are doing.
  389. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  390. F_Name = /(?:FONT NAME|font name|FN|fn):[ ](\d+)/
  391. F_Size = /(?:FONT SIZE|FS):[ ](\d+)/i
  392. F_Bold = /(?:FONT BOLD|FB):[ ](.*)/i
  393. F_Ital = /(?:FONT ITALIC|FI):[ ](.*)/i
  394. F_Col_ = /(?:FONT COLOR|FC):[ ](.*),(.*),(.*),(.*)/i
  395. F_OCol = /(?:FONT OUT COLOR|FOC):[ ](.*),(.*),(.*),(.*)/i
  396. Icon = /(?:NAME ICON|ICON|NI):[ ](\d+)/i
  397. IPos = /(?:ICON POS|IP):[ ](\d+),[ ](\d+)/i
  398. ICent = /(?:ICON CENTER|ICEN):[ ](.*),[ ](.*)/i
  399. IEffs = /(?:ICON EFFECT|IEFF):[ ](.*)/i
  400. Eff = /(?:NAME EFFECT|NAME EFF|NE):[ ](\d+)/i
  401. NEff = /(?:NO NAME EFFECT|NO NAME EFF|NO NE)/i
  402. Slide = /(?:NAME SLIDE|NS DIST|NSD):[ ](\d+)/i
  403. Posi = /(?:NAME POS|NP):[ ](\d+),[ ](\d+)/i
  404. Pos2 = /(?:NAME CENTER|NCEN):[ ](.*),[ ](.*)/i
  405. LSD_ = /(?:NAME DELAY|ND):[ ](\d+)/i
  406. Large = /<(?:MAP NAME|MNW)>([^><]*)<\/(?:MAP NAME|MNW)>/im
  407. BG__ = /(?:BACKGROUND|BG):[ ]"(.*)"/i
  408. BG_2 = /(?:BACKGROUND|BG):[ ]'(.*)'/i
  409. BGpos = /(?:BGPOS|BGP):[ ](\d+),[ ](\d+)/i
  410. BGshow = /(?:SHOW BG|SBG):[ ](.*)/i
  411. Letter_Fixx = /<(?:LET|letter):[ ](.*),(.*),(.*)>/i
  412. Letter_Size = /<(?:L SIZE|let size):[ ](.*),(.*)>/i
  413. Letter_Col = /<(?:LCOL|let col):[ ](.*),(.*),(.*),(.*),(.*)>/i
  414. Letter_OCol = /<(?:LOC|let ocol):[ ](.*),(.*),(.*),(.*),(.*)>/i
  415. Letter_Font = /<(?:L Fon|let font):[ ](.*),(.*)>/i
  416. Letter_Bold = /<(?:L Bol|let bold):[ ](.*),(.*)>/i
  417. Letter_Ital = /<(?:L Ita|let italic):[ ](.*),(.*)>/i
  418. Letter_FX = /<(?:L FX|let effect):[ ](.*),(.*)>/i
  419. Letter_SLI = /<(?:L SLI|let slide):[ ](.*),(.*)>/i
  420. #####################
  421. # CUSTOMISATION END #
  422. end #####################
  423. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  424. # #
  425. # http://dekitarpg.wordpress.com/ #
  426. # #
  427. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  428. #===============================================================================#
  429. # ARE YOU MODIFYING BEYOND THIS POINT? \.\. #
  430. # YES?\.\. #
  431. # OMG, REALLY? \| #
  432. # WELL SLAP MY FACE AND CALL ME A DRAGONITE.\..\.. #
  433. # I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\.. #
  434. #===============================================================================#
  435.  
  436. $imported = {} if $imported.nil?
  437. $imported[:Dekita_Anim_Map_Name] = true
  438.  
  439. #===============================================================================#
  440. class RPG::Map
  441. #===============================================================================#
  442.  
  443. attr_reader(:map_name_font_name)
  444. attr_reader(:map_name_font_size)
  445. attr_reader(:map_name_font_bold)
  446. attr_reader(:map_name_font_ital)
  447. attr_reader(:map_name_font_col_)
  448. attr_reader(:map_name_font_ocol)
  449. attr_reader(:map_name_icon)
  450. attr_reader(:map_name_icon_pos)
  451. attr_reader(:map_name_icon_pos_centered)
  452. attr_reader(:map_name_icon_gets_effects)
  453. attr_reader(:map_name_effect)
  454. attr_reader(:map_name_slide_dist)
  455. attr_reader(:map_name_letter_show_delay)
  456. attr_reader(:map_name_position)
  457. attr_reader(:map_name_position_centered)
  458. attr_reader(:map_name_bg)
  459. attr_reader(:map_name_bg_pos)
  460. attr_reader(:map_name_bg_show)
  461. attr_reader(:map_name_ind_let_fixx)
  462. attr_reader(:map_name_ind_let_font)
  463. attr_reader(:map_name_ind_let_size)
  464. attr_reader(:map_name_ind_let_bold)
  465. attr_reader(:map_name_ind_let_ital)
  466. attr_reader(:map_name_ind_let_color)
  467. attr_reader(:map_name_ind_let_outcolor)
  468. attr_reader(:map_name_ind_let_fx)
  469. attr_reader(:map_name_ind_let_slide)
  470.  
  471. def get_map_name_icon_info
  472. @map_name_font_name = Font.default_name
  473. @map_name_font_size = Map_Name_Window::Font_Size
  474. @map_name_font_bold = Map_Name_Window::Font_Bold
  475. @map_name_font_ital = Map_Name_Window::Font_Italic
  476. @map_name_font_col_ = Map_Name_Window::Font_Color
  477. @map_name_font_ocol = Map_Name_Window::Font_Out_Col
  478. @map_name_icon = Map_Name_Window::Icon
  479. @map_name_icon_pos = Map_Name_Window::Icon_Pos
  480. @map_name_icon_pos_centered = Map_Name_Window::Center_Icon
  481. @map_name_icon_gets_effects = Map_Name_Window::Icon_Has_Effects
  482. @map_name_effect = [Map_Name_Window::Letter_Effects,Map_Name_Window::L_Effect_Type]
  483. @map_name_slide_dist = Map_Name_Window::Slide_Distance
  484. @map_name_position = Map_Name_Window::Map_Name_Pos
  485. @map_name_position_centered = Map_Name_Window::Center_Name
  486. @map_name_letter_show_delay = Map_Name_Window::L_S_D_Timer
  487. @map_name_bg = nil
  488. @map_name_bg_pos = @map_name_position
  489. @map_name_bg_show = Map_Name_Window::Show_Background
  490. @map_name_ind_let_fixx = []
  491. @map_name_ind_let_size = []
  492. @map_name_ind_let_font = []
  493. @map_name_ind_let_bold = []
  494. @map_name_ind_let_ital = []
  495. @map_name_ind_let_color = []
  496. @map_name_ind_let_outcolor = []
  497. @map_name_ind_let_fx = []
  498. @map_name_ind_let_slide = []
  499. self.note.split(/[\r\n]+/).each { |line| ; case line
  500. when /<#{M_N_W_RegExp::F_Name}>/ ; @map_name_font_name = Map_Name_Window::Font_Name[$1.to_i]
  501. when /<#{M_N_W_RegExp::F_Size}>/ ; @map_name_font_size = $1.to_i
  502. when /<#{M_N_W_RegExp::F_Bold}>/ ; @map_name_font_bold = $1.to_s
  503. when /<#{M_N_W_RegExp::F_Ital}>/ ; @map_name_font_ital = $1.to_s
  504. when /<#{M_N_W_RegExp::F_Col_}>/ ; @map_name_font_col_ = [$1.to_i,$2.to_i,$3.to_i,$4.to_i]
  505. when /<#{M_N_W_RegExp::F_OCol}>/ ; @map_name_font_ocol = [$1.to_i,$2.to_i,$3.to_i,$4.to_i,]
  506. when /<#{M_N_W_RegExp::Icon}>/ ; @map_name_icon = [true, $1.to_i]
  507. when /<#{M_N_W_RegExp::IPos}>/ ; @map_name_icon_pos = [$1.to_i, $2.to_i]
  508. when /<#{M_N_W_RegExp::ICent}>/ ; @map_name_icon_pos_centered = [$1.to_s.downcase, $2.to_s.downcase]
  509. when /<#{M_N_W_RegExp::IEffs}>/ ; @map_name_icon_gets_effects = $1.to_s.downcase
  510. when /<#{M_N_W_RegExp::Eff}>/ ; @map_name_effect = [true, $1.to_i]
  511. when /<#{M_N_W_RegExp::NEff}>/ ; @map_name_effect = [false, 0]
  512. when /<#{M_N_W_RegExp::Slide}>/ ; @map_name_slide_dist = $1.to_i
  513. when /<#{M_N_W_RegExp::Posi}>/ ; @map_name_position = [$1.to_i, $2.to_i]
  514. when /<#{M_N_W_RegExp::Pos2}>/ ; @map_name_position_centered = [$1.to_s.downcase, $2.to_s.downcase]
  515. when /<#{M_N_W_RegExp::LSD_}>/ ; @map_name_letter_show_delay = $1.to_i
  516. when /<#{M_N_W_RegExp::BG__}>/ ; @map_name_bg = $1.to_s
  517. when /<#{M_N_W_RegExp::BG_2}>/ ; @map_name_bg = $1.to_s
  518. when /<#{M_N_W_RegExp::BGpos}>/ ; @map_name_bg_pos = [$1.to_i, $2.to_i]
  519. when /<#{M_N_W_RegExp::BGshow}>/ ; @map_name_bg_show = $1.to_s.downcase
  520. when M_N_W_RegExp::Letter_Fixx
  521. @map_name_ind_let_fixx.push([$1.to_i, $2.to_i, $3.to_i])
  522. when M_N_W_RegExp::Letter_Font
  523. @map_name_ind_let_font.push([$1.to_i, Map_Name_Window::Font_Name[$2.to_i] ])
  524. when M_N_W_RegExp::Letter_Size
  525. @map_name_ind_let_size.push([$1.to_i, $2.to_i])
  526. when M_N_W_RegExp::Letter_Bold
  527. @map_name_ind_let_bold.push([$1.to_i, $2.to_s.downcase])
  528. when M_N_W_RegExp::Letter_Ital
  529. @map_name_ind_let_ital.push([$1.to_i, $2.to_s.downcase])
  530. when M_N_W_RegExp::Letter_Col
  531. @map_name_ind_let_color.push([$1.to_i,$2.to_i,$3.to_i,$4.to_i,$5.to_i])
  532. when M_N_W_RegExp::Letter_OCol
  533. @map_name_ind_let_outcolor.push([$1.to_i,$2.to_i,$3.to_i,$4.to_i,$5.to_i])
  534. when M_N_W_RegExp::Letter_FX
  535. @map_name_ind_let_fx.push([$1.to_i,$2.to_i])
  536. when M_N_W_RegExp::Letter_SLI
  537. @map_name_ind_let_slide.push([$1.to_i,$2.to_i])
  538. end ; } # self.note.split
  539. get_mni(self.note)
  540. end
  541.  
  542. def get_mni(note)
  543. note.scan(M_N_W_RegExp::Large) { setup_map_name_info($1) }
  544. end
  545.  
  546. def setup_map_name_info(info)
  547. @map_name_font_name = Map_Name_Window::Font_Name[$1.to_i] if info =~ M_N_W_RegExp::F_Name
  548. @map_name_font_size = $1.to_i if info =~ M_N_W_RegExp::F_Size
  549. @map_name_font_bold = $1.to_s.downcase if info =~ M_N_W_RegExp::F_Bold
  550. @map_name_font_ital = $1.to_s.downcase if info =~ M_N_W_RegExp::F_Ital
  551. @map_name_font_col_ = [$1.to_i,$2.to_i,$3.to_i,$4.to_i] if info =~ M_N_W_RegExp::F_Col_
  552. @map_name_font_ocol = [$1.to_i,$2.to_i,$3.to_i,$4.to_i] if info =~ M_N_W_RegExp::F_OCol
  553. @map_name_icon = [true,$1.to_i] if info =~ M_N_W_RegExp::Icon
  554. @map_name_icon_pos = [$1.to_i, $2.to_i] if info =~ M_N_W_RegExp::IPos
  555. @map_name_icon_pos_centered = [$1.to_s.downcase, $2.to_s.downcase] if info =~ M_N_W_RegExp::ICent
  556. @map_name_icon_gets_effects = $1.to_s.downcase if info =~ M_N_W_RegExp::IEffs
  557. @map_name_effect = [true,$1.to_i] if info =~ M_N_W_RegExp::Eff
  558. @map_name_effect = [false, 0] if info =~ M_N_W_RegExp::NEff
  559. @map_name_slide_dist = $1.to_i if info =~ M_N_W_RegExp::Slide
  560. @map_name_position = [$1.to_i,$2.to_i] if info =~ M_N_W_RegExp::Posi
  561. @map_name_position_centered = [$1.to_s.downcase, $2.to_s.downcase] if info =~ M_N_W_RegExp::Pos2
  562. @map_name_letter_show_delay = $1.to_i if info =~ M_N_W_RegExp::LSD_
  563. @map_name_bg = $1.to_s if info =~ M_N_W_RegExp::BG__
  564. @map_name_bg = $1.to_s if info =~ M_N_W_RegExp::BG_2
  565. @map_name_bg_pos = [$1.to_i,$2.to_i] if info =~ M_N_W_RegExp::BGpos
  566. @map_name_bg_show = $1.to_s.downcase if info =~ M_N_W_RegExp::BGshow
  567. end
  568.  
  569. end
  570.  
  571. #==============================================================================
  572. module Cache
  573. #==============================================================================
  574.  
  575. def self.mapname_im(filename)
  576. load_bitmap(Map_Name_Window::BG_Image_Folder, filename)
  577. end
  578.  
  579. end
  580.  
  581. #==============================================================================
  582. class Game_Temp
  583. #==============================================================================
  584.  
  585. attr_accessor :mapname
  586.  
  587. alias :map_name_initialize_GT :initialize
  588. def initialize
  589. map_name_initialize_GT
  590. @mapname = nil
  591. end
  592.  
  593. end
  594.  
  595. #===============================================================================#
  596. class Game_Map
  597. #===============================================================================#
  598.  
  599. alias :map_nameGMsetup :setup
  600. def setup(map_id)
  601. map_nameGMsetup(map_id)
  602. @map.get_map_name_icon_info
  603. end
  604.  
  605. def setup_map_name_info
  606. end
  607.  
  608. def map_name_icon
  609. @map.map_name_icon
  610. end
  611.  
  612. def map_name_icon_pos_x
  613. @map.map_name_icon_pos[0]
  614. end
  615.  
  616. def map_name_icon_pos_y
  617. @map.map_name_icon_pos[1]
  618. end
  619.  
  620. def map_name_icon_pos_x_center?
  621. @map.map_name_icon_pos_centered[0]
  622. end
  623.  
  624. def map_name_icon_pos_y_center?
  625. @map.map_name_icon_pos_centered[1]
  626. end
  627.  
  628. def map_name_icon_effects?
  629. @map.map_name_icon_gets_effects
  630. end
  631.  
  632. def map_name_effect
  633. @map.map_name_effect
  634. end
  635.  
  636. def map_name_slide
  637. @map.map_name_slide_dist
  638. end
  639.  
  640. def map_name_font_name
  641. @map.map_name_font_name
  642. end
  643.  
  644. def map_name_font_size
  645. @map.map_name_font_size
  646. end
  647.  
  648. def map_name_font_bold
  649. @map.map_name_font_bold
  650. end
  651.  
  652. def map_name_font_italic
  653. @map.map_name_font_ital
  654. end
  655.  
  656. def map_name_position_x
  657. @map.map_name_position[0]
  658. end
  659.  
  660. def map_name_position_y
  661. @map.map_name_position[1]
  662. end
  663.  
  664. def map_name_pos_center_x?
  665. @map.map_name_position_centered[0]
  666. end
  667.  
  668. def map_name_pos_center_y?
  669. @map.map_name_position_centered[1]
  670. end
  671.  
  672. def map_name_LSD
  673. @map.map_name_letter_show_delay
  674. end
  675.  
  676. def map_name_font_color
  677. c = @map.map_name_font_col_
  678. Color.new(c[0],c[1],c[2],c[3])
  679. end
  680.  
  681. def map_name_font_out_color
  682. c = @map.map_name_font_ocol
  683. Color.new(c[0],c[1],c[2],c[3])
  684. end
  685.  
  686. def map_name_bg
  687. @map.map_name_bg
  688. end
  689.  
  690. def map_name_bg_x
  691. @map.map_name_bg_pos[0]
  692. end
  693.  
  694. def map_name_bg_y
  695. @map.map_name_bg_pos[1]
  696. end
  697.  
  698. def map_name_bg_showing?
  699. @map.map_name_bg_show
  700. end
  701.  
  702. def ind_letter_fixx
  703. @map.map_name_ind_let_fixx
  704. end
  705.  
  706. def ind_letter_size
  707. @map.map_name_ind_let_size
  708. end
  709.  
  710. def ind_letter_font
  711. @map.map_name_ind_let_font
  712. end
  713.  
  714. def ind_letter_bold
  715. @map.map_name_ind_let_bold
  716. end
  717.  
  718. def ind_letter_ital
  719. @map.map_name_ind_let_ital
  720. end
  721.  
  722. def ind_letter_color
  723. @map.map_name_ind_let_color
  724. end
  725.  
  726. def ind_letter_outcolor
  727. @map.map_name_ind_let_outcolor
  728. end
  729.  
  730. def ind_letter_fx
  731. @map.map_name_ind_let_fx
  732. end
  733.  
  734. def ind_letter_slide
  735. @map.map_name_ind_let_slide
  736. end
  737.  
  738. end
  739.  
  740. #==============================================================================
  741. class Game_Interpreter
  742. #==============================================================================
  743.  
  744. def reset_map_name
  745. $game_temp.mapname = nil
  746. end
  747.  
  748. end
  749.  
  750. #==============================================================================
  751. class Sprite_MapName < Sprite
  752. #==============================================================================
  753.  
  754. include Map_Name_Window
  755.  
  756. def initialize(letter, x = 0, y = 0, timer = 0, index = 0)
  757. super(nil)
  758. create_variables(timer, index, letter)
  759. get_letter_effects if @letter_effects[0]
  760. x = x_needs_fixed?(letter, x) if letter != nil
  761. y = y_needs_fixed?(letter, y) if letter != nil
  762. create_map_name(letter, x, y) if letter != nil
  763. end
  764.  
  765. def create_variables(t, i, l)
  766. @open = true
  767. @slide_left = false
  768. @slide_right = false
  769. @slide_up = false
  770. @slide_down = false
  771. @timer = t
  772. @timer_val = 0
  773. @letter_index = i
  774. @angle_type = nil
  775. @letter_effects = get_let_fx(l)
  776. @slide_distance = get_let_slide(l)
  777. end
  778.  
  779. def get_letter_effects
  780. case @letter_effects[1]
  781. when 0 ; basic_left_slide
  782. when 1 ; basic_right_slide
  783. when 2 ; basic_left_slide ; get_angle_type(0)
  784. when 3 ; basic_right_slide ; get_angle_type(1)
  785. when 4 ; basic_left_slide ; get_angle_type(1)
  786. when 5 ; basic_right_slide ; get_angle_type(0)
  787. when 6 ; basic_left_spin ; get_angle_type(2)
  788. when 7 ; basic_right_spin ; get_angle_type(3)
  789. when 8 ; basic_right_slide ; get_angle_type(4)
  790. when 9 ; basic_left_slide ; get_angle_type(4)
  791. when 10; basic_right_slide ; get_angle_type(5)
  792. when 11; basic_left_slide ; get_angle_type(5)
  793. when 12; basic_up_slide
  794. when 13; basic_down_slide
  795. when 14; basic_up_slide ; basic_left_slide
  796. when 15; basic_up_slide ; basic_right_slide
  797. when 16; basic_down_slide ; basic_left_slide
  798. when 17; basic_down_slide ; basic_right_slide
  799. when 18; basic_up_slide ;basic_left_slide; basic_left_spin ;get_angle_type(2)
  800. when 19; basic_up_slide ;basic_left_slide; basic_right_spin ;get_angle_type(3)
  801. when 20; basic_up_slide ;basic_right_slide; basic_left_spin ;get_angle_type(2)
  802. when 21; basic_up_slide ;basic_right_slide; basic_right_spin ;get_angle_type(3)
  803. when 22; basic_down_slide ;basic_left_slide ; basic_left_spin ;get_angle_type(2)
  804. when 23; basic_down_slide ;basic_left_slide ; basic_right_spin ;get_angle_type(3)
  805. when 24; basic_down_slide ;basic_right_slide ; basic_left_spin ;get_angle_type(2)
  806. when 25; basic_down_slide ;basic_right_slide ; basic_right_spin ;get_angle_type(3)
  807. end
  808. end
  809.  
  810. def get_let_fx(letter)
  811. $game_map.ind_letter_fx.each {|let|
  812. return [true, let[1]] if let[0] == @letter_index }
  813. return $game_map.map_name_effect
  814. end
  815.  
  816. def get_let_slide(letter)
  817. $game_map.ind_letter_slide.each {|let|
  818. return let[1] if let[0] == @letter_index }
  819. return $game_map.map_name_slide
  820. end
  821.  
  822. def x_needs_fixed?(letter, x)
  823. $game_map.ind_letter_fixx.each {|let|
  824. return x += let[1] if let[0] == @letter_index }
  825. return x
  826. end
  827.  
  828. def y_needs_fixed?(letter, y)
  829. $game_map.ind_letter_fixx.each {|let|
  830. return y += let[2] if let[0] == @letter_index }
  831. return y
  832. end
  833.  
  834. def create_map_name(letter, x, y)
  835. size = get_let_size(letter)
  836. self.bitmap = Bitmap.new(size,size)
  837. self.bitmap.font.name = get_let_font(letter)
  838. self.bitmap.font.size = size
  839. self.bitmap.font.bold = get_let_bold(letter)
  840. self.bitmap.font.italic = get_let_ital(letter)
  841. self.bitmap.font.color = get_letter_color(letter)
  842. self.bitmap.font.out_color = get_letter_outcolor(letter)
  843. self.bitmap.draw_text(0, 0, size, size, letter.to_s)
  844. self.x = x
  845. self.y = y + (size / 2).to_i
  846. self.z = Map_Name_z + 2
  847. self.opacity = 0
  848. end
  849.  
  850. def get_let_font(letter)
  851. $game_map.ind_letter_font.each {|let|
  852. return let[1] if let[0] == @letter_index }
  853. return $game_map.map_name_font_name
  854. end
  855.  
  856. def get_let_size(letter)
  857. $game_map.ind_letter_size.each {|let|
  858. return let[1] if let[0] == @letter_index }
  859. return $game_map.map_name_font_size
  860. end
  861.  
  862. def get_let_bold(letter)
  863. $game_map.ind_letter_bold.each {|let|
  864. return let[1] if let[0] == @letter_index }
  865. return $game_map.map_name_font_bold
  866. end
  867.  
  868. def get_let_ital(letter)
  869. $game_map.ind_letter_ital.each {|let|
  870. return let[1] if let[0] == @letter_index }
  871. return $game_map.map_name_font_italic
  872. end
  873.  
  874. def get_letter_color(letter)
  875. $game_map.ind_letter_color.each do |let|
  876. if let[0] == @letter_index
  877. return Color.new(let[1],let[2],let[3],let[4])
  878. end
  879. end
  880. return $game_map.map_name_font_color
  881. end
  882.  
  883. def get_letter_outcolor(letter)
  884. $game_map.ind_letter_outcolor.each do |let|
  885. if let[0] == @letter_index
  886. return Color.new(let[1],let[2],let[3],let[4])
  887. end
  888. end
  889. return $game_map.map_name_font_out_color
  890. end
  891.  
  892. def basic_left_slide
  893. @slide_left = true
  894. self.ox = -(@slide_distance).to_i
  895. end
  896.  
  897. def basic_right_slide
  898. @slide_right = true
  899. self.ox = (@slide_distance).to_i
  900. end
  901.  
  902. def basic_up_slide
  903. @slide_up = true
  904. self.oy = -(@slide_distance).to_i
  905. end
  906.  
  907. def basic_down_slide
  908. @slide_down = true
  909. self.oy = (@slide_distance).to_i
  910. end
  911.  
  912. def basic_left_spin
  913. @move_for_spin = true
  914. end
  915.  
  916. def basic_right_spin
  917. @move_for_spin = true
  918. end
  919.  
  920. def get_angle_type(angle_type)
  921. @angle_type = angle_type
  922. case angle_type
  923. when 0 ; self.angle = 50
  924. when 1 ; self.angle = -50
  925. when 2 ; self.angle = -360
  926. when 3 ; self.angle = 360
  927. when 4 ; self.angle = (50 * (@timer / (@letter_index+1)))
  928. when 5 ; self.angle = -(50 * (@timer / (@letter_index+1)))
  929. end
  930. end
  931.  
  932. def update
  933. super
  934. update_timer
  935. update_show
  936. update_slide if @open
  937. update_angle if @angle_type != nil
  938. end
  939.  
  940. def update_timer
  941. return if @timer_val >= @timer
  942. @timer_val += 1
  943. self.opacity = 1
  944. end
  945.  
  946. def update_show
  947. self.opacity += 1 if @open
  948. self.opacity -= 1 if !@open
  949. @open = false if self.opacity >= 255
  950. end
  951.  
  952. def update_slide
  953. self.ox += 1 if self.ox < 0 && @slide_left
  954. self.ox -= 1 if self.ox > 0 && @slide_right
  955. self.oy += 1 if self.oy < 0 && @slide_up
  956. self.oy -= 1 if self.oy > 0 && @slide_down
  957. end
  958.  
  959. def update_angle
  960. return if @angle_type == nil
  961. return if self.angle.between?(-0.49,0.49)
  962. case @angle_type
  963. when 0, 1 ; self.angle < 0 ? self.angle += 0.2 : self.angle -= 0.2
  964. when 2, 3 ; self.angle.between?(-5,5) ?
  965. self.angle < 0 ? self.angle += 0.5 : self.angle -= 0.5 :
  966. self.angle < 0 ? self.angle += 1.5 : self.angle -= 1.5
  967. when 4, 5 ; self.angle.between?(-10,10) ? self.angle.between?(-4,4) ?
  968. self.angle < 0 ? self.angle += 0.5 : self.angle -= 0.5 : # 2nd between
  969. self.angle < 0 ? self.angle += 1.5 : self.angle -= 1.5 : # 1st between
  970. self.angle < 0 ? self.angle += 2.5 : self.angle -= 2.5
  971. end
  972. end
  973.  
  974. def dispose
  975. super
  976. if self.bitmap != nil
  977. self.bitmap.dispose
  978. end
  979. end
  980.  
  981. end
  982.  
  983. #==============================================================================
  984. class Sprite_MapIcon < Sprite_MapName
  985. #==============================================================================
  986.  
  987. def initialize(icon, x = 0, y = 0, timer, index)
  988. super(nil, x, y, timer, index)
  989. self.bitmap = Cache.system("Iconset")
  990. rect = Rect.new(icon % 16 * 24, icon / 16 * 24, 24, 24)
  991. self.bitmap.blt(0, 0, self.bitmap, rect)
  992. self.src_rect.set(rect.x, rect.y, 24, 24)
  993. self.x = x
  994. self.y = y
  995. self.z = Map_Name_z + 1
  996. end
  997.  
  998. def update
  999. super
  1000. end
  1001.  
  1002. def dispose
  1003. super
  1004. if self.bitmap != nil
  1005. self.bitmap.dispose
  1006. end
  1007. end
  1008.  
  1009. end
  1010.  
  1011. #==============================================================================
  1012. class Sprite_MapName_BG < Sprite
  1013. #==============================================================================
  1014.  
  1015. include Map_Name_Window
  1016.  
  1017. def initialize(x, y, width, height, image = nil)
  1018. super(nil)
  1019. self.z = Map_Name_z
  1020. self.opacity = 0
  1021. @open = true
  1022. if image == nil
  1023. create_standard_bg(x, y, width, height)
  1024. else
  1025. create_background_image(x, y, image)
  1026. end
  1027. @timer = 0
  1028. update
  1029. end
  1030.  
  1031. def create_standard_bg(x, y, width, height)
  1032. self.bitmap = Bitmap.new(width,height)
  1033. rect = Rect.new(0, 0,width,height)
  1034. rect.width /= 2
  1035. self.bitmap.gradient_fill_rect(rect, BackGround_Color_2, BackGround_Color_1)
  1036. rect.x = rect.width
  1037. self.bitmap.gradient_fill_rect(rect, BackGround_Color_1, BackGround_Color_2)
  1038. self.x = x
  1039. self.y = y + (height / 2 )
  1040. end
  1041.  
  1042. def create_background_image(x, y, image)
  1043. self.bitmap = Cache.mapname_im(image)
  1044. self.x = x
  1045. self.y = y
  1046. end
  1047.  
  1048. def update
  1049. super
  1050. @timer += 1 if !@open
  1051. self.opacity += 1 if @open
  1052. self.opacity -= 1 if !@open
  1053. @open = false if self.opacity >= 250
  1054. end
  1055.  
  1056. def dispose
  1057. super
  1058. if self.bitmap != nil
  1059. self.bitmap.dispose
  1060. end
  1061. end
  1062.  
  1063. end
  1064.  
  1065. #==============================================================================
  1066. module Spriteset_Map_Name
  1067. #==============================================================================
  1068.  
  1069. def init_map_name_set
  1070. return if $game_temp.mapname == $game_map.display_name
  1071. $game_temp.mapname = $game_map.display_name
  1072. create_map_name
  1073. create_map_name_icon
  1074. create_map_name_BG
  1075. @delay_timer = 0
  1076. @display_mn_timer = 0
  1077. end
  1078.  
  1079. def create_map_name_icon
  1080. return unless $game_map.map_name_icon[0]
  1081. x = $game_map.map_name_icon_pos_x
  1082. y = $game_map.map_name_icon_pos_y
  1083. x = (Graphics.width / 2) - (12) if $game_map.map_name_icon_pos_x_center?
  1084. y = (Graphics.height / 2) - (12) if $game_map.map_name_icon_pos_y_center?
  1085. timer = $game_map.map_name_LSD
  1086. index = 0
  1087. icon = $game_map.map_name_icon[1]
  1088. @map_icon = Sprite_MapIcon.new(icon, x, y, timer, index)
  1089. end
  1090.  
  1091. def create_map_name
  1092. x = $game_map.map_name_position_x
  1093. y = $game_map.map_name_position_y
  1094. n = $game_map.display_name.to_s.split(//)
  1095. @map_name = []
  1096. timer = $game_map.map_name_LSD
  1097. index = 0
  1098. fbvaal = ($game_map.map_name_font_bold ? 0 : 0) + ($game_map.map_name_font_italic ? 0 : 0)
  1099. if $game_map.map_name_pos_center_x?
  1100. n_size = ($game_map.display_name.size+1) * ($game_map.map_name_font_size + fbvaal )
  1101. x = (Graphics.width / 2) - (n_size / 2)
  1102. end
  1103. if $game_map.map_name_pos_center_y?
  1104. n_size = ($game_map.map_name_font_size + fbvaal )
  1105. y = (Graphics.height / 2) - (n_size / 2)
  1106. end
  1107. for i in n
  1108. letter = i[0]
  1109. if letter == Map_Name_Window::NewLine_Letter
  1110. y += $game_map.map_name_font_size
  1111. x = $game_map.map_name_position_x - ($game_map.map_name_font_size)
  1112. letter = ''
  1113. end
  1114. @map_name.push( Sprite_MapName.new(letter, x, y, timer, index))
  1115. x += ($game_map.map_name_font_size / 4 * 3)
  1116. timer += $game_map.map_name_LSD
  1117. index += 1
  1118. end
  1119. end
  1120.  
  1121. def create_map_name_BG
  1122. return unless $game_map.map_name_bg_showing?
  1123. return if $game_map.display_name == ''
  1124. timer = $game_map.map_name_LSD
  1125. mbgwid = ($game_map.display_name.size) * @map_name[0].width / 4 * 3
  1126. mbghei = @map_name[0].height
  1127. mbgx = $game_map.map_name_bg_x
  1128. mbgy = $game_map.map_name_bg_y
  1129. image = $game_map.map_name_bg
  1130. @map_BG = Sprite_MapName_BG.new(mbgx, mbgy, mbgwid, mbghei, image) if @map_name != nil
  1131. end
  1132.  
  1133. def update_map_name_set
  1134. if $game_temp.mapname != $game_map.display_name
  1135. dispose_map_name_set
  1136. init_map_name_set
  1137. end
  1138. return if @map_name == nil
  1139. update_map_name_DPBz if @map_name != nil
  1140. update_map_name_BG if @map_BG != nil
  1141. update_map_name_icon if @map_icon != nil
  1142. @display_mn_timer += 1
  1143. if @display_mn_timer > 600
  1144. @map_name.each {|i| return if i.opacity > 0 }
  1145. return if @map_icon != nil && @map_icon.opacity > 0
  1146. return if @map_BG != nil && @map_BG.opacity > 0
  1147. dispose_map_name_set
  1148. end
  1149. end
  1150.  
  1151. def update_map_name_DPBz
  1152. return if @delay_timer == nil
  1153. @delay_timer += 1
  1154. return unless @delay_timer >= Map_Name_Window::Delay_Timer
  1155. @map_name.each {|sprite| sprite.update } if @map_name != nil
  1156. end
  1157.  
  1158. def update_map_name_BG
  1159. @map_BG.update if @map_BG != nil
  1160. end
  1161.  
  1162. def update_map_name_icon
  1163. @map_icon.update if @map_icon != nil
  1164. end
  1165.  
  1166. def dispose_map_name_set
  1167. @map_BG.dispose if @map_BG != nil
  1168. @map_icon.dispose if @map_icon != nil
  1169. @map_name.each {|sprite| sprite.dispose } if @map_name != nil
  1170. @map_BG = nil
  1171. @map_icon = nil
  1172. @map_name = nil
  1173. @delay_timer = nil
  1174. end
  1175.  
  1176. end
  1177.  
  1178. #==============================================================================
  1179. class Spriteset_Map
  1180. #==============================================================================
  1181.  
  1182. include Spriteset_Map_Name
  1183.  
  1184. alias :initialize_map_name :initialize
  1185. alias :dispose_map_name :dispose
  1186. alias :update_map_name :update
  1187.  
  1188. def initialize
  1189. initialize_map_name
  1190. init_map_name_set
  1191. end
  1192.  
  1193. def dispose
  1194. dispose_map_name
  1195. dispose_map_name_set
  1196. end
  1197.  
  1198. def update
  1199. update_map_name
  1200. update_map_name_set
  1201. end
  1202.  
  1203. end
  1204.  
  1205. #==============================================================================
  1206. class Window_MapName < Window_Base
  1207. #==============================================================================
  1208.  
  1209. if Map_Name_Window::Remove_Default_Name_Window
  1210.  
  1211. def refresh
  1212. contents.clear
  1213. end
  1214.  
  1215. end # if Map_Name_Window::Remove_Default_Name_Window
  1216.  
  1217. end
  1218.  
  1219. #==============================================================================#
  1220. # - SCRIPT END - #
  1221. #==============================================================================#
  1222. # http://dekitarpg.wordpress.com/ #
  1223. #==============================================================================#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement