설명 : 맵 처리를 가볍게 하는 스크립트 입니다. 컴퓨터의 사양이 낮아서 XP가 원할하기 돌아가지 않을시 이 스크립트 를 쓰면 어느정도 효과를 보실수 있습니다. 하지만 여러 스크립트 들과 사용시 오류가 많이 나는 단점이 있습니다. # # 듗댲붎?긞긵똹쀊돸긚긏깏긵긣??v1.01 by tonbi # # New : 븶랹궠귪궻긬?긡귻쀱롎댷벍궴빘뾭됀?궸갃 # # 갋럊궋뺴 # # Scene_Debug 귝귟돷갂Main 귝귟뤵궸갂륷딮긜긞긘깈깛귩띿궯궲갂 # 궞궻빒뤞멣븫귩?귟븊궚궲궘궬궠궋갃 # # 궞궻긚긏깏긵긣귩럊뾭궥귡궞궴궳갂 # 긌긿깋?됪 # 궴궋궯궫룉뿚궕뛼뫊돸궢귏궥갃 # 뛼뫊돸궥귡궬궚궶궻궳갂돺궔궕궳궖귡귝궎궸궶귡궯궲궞궴궼궇귟귏궧귪갃 # # 궇궴갂럊뾭궥귡띧궼갂겓궻븫빁귩뷠뾭궸돒궣궲룕궖듂궑궲궘궬궠궋갃 #======================================================================== #======================================================================== #걳긚긏깏긵긣긘긃깑긲궻븶랹궠귪궻긬?긡귻쀱롎댷벍궴궇귦궧궲럊궎뤾뜃궼갂 #?궞궻긚긏깏긵긣귩쀱롎댷벍귝귟귖돷궸궢궲갂 #?겓귩갂 USE_TRAIN_ACTOR = true 궴궢궲궘궬궠궋갃(럊귦궶궋궴궖궼 = false) USE_TRAIN_ACTOR = false #======================================================================== #걳긏깏긞긯깛긐궻떁뿣럚믦(댰뼞귦궔귪궶궔궯궫귞궞궻귏귏궳갃) class Game_Character DRAWRANGEX = 15 *128 # ?긞긵긌긿깋궻긚긵깋귽긣귩뛛륷궥귡떁뿣 DRAWRANGEY = 13 *128 # 궔궶귟묈궖궋긌긿깋?긞긵귩럊궎뤾뜃궼몵귘궢궲궘궬궠궋갃 # X:14 Y:12멟뚣릢룲 *128궼빾궑궶궋궳궘궬궠궋 # 궭궶귒궸뤵궕X(돘)돷궕Y(뢢)궳궥갃 end #======================================================================== # 벍띿됶먣 # # 갋?긞긵긚긵깋귽긣 # $onscreen[char_ID] # 궞궻긐깓?긫깑빾릶궸갂됪뽋볙긲깋긐귩먠믦 # 됪뽋궔귞돀궘뿣귢궫긌긿깋긏??긚긵깋귽긣궼갂 # 덇먛뛛륷궢궶궋궞궴궳뛼뫊돸 # #------------------------------------------------------------------- # 걶Game_Temp긏깋긚 #-------------------------------------------------------------------- class Game_Temp alias initialize_tonbi1 initialize def initialize initialize_tonbi1 $onscreen = [] # 긚긵깋귽긣됪뽋볙긲깋긐 end end #-------------------------------------------------------------------------- # 걶 Game_Character긏깋긚 #-------------------------------------------------------------------------- class Game_Character #-------------------------------------------------------------------------- # 걶 긲깒??뛛륷 #-------------------------------------------------------------------------- alias update_tonbi1 update def update #됪뽋뤵궳궻댧뭫 sx = @real_x - $game_map.display_x - 1280 sy = @real_y - $game_map.display_y - 960 # 먥뫮뭠귩땫귕귡 abs_sx = sx > 0 ? sx : -sx abs_sy = sy > 0 ? sy-3 : -sy # 뢢궔돘궕 DRAWRANGE ?귽깑댥뤵뿣귢궲궋귡뤾뜃 if abs_sx > DRAWRANGEX or abs_sy > DRAWRANGEY # 긚긵깋귽긣뷄뛛륷궸궥귡 $onscreen[@id]=false else # 긚긵깋귽긣뛛륷궇귟궸궥귡 $onscreen[@id]=true end update_tonbi1 end end class Spriteset_Map #-------------------------------------------------------------------------- # 걶 긆긳긙긃긏긣룊딖돸 #-------------------------------------------------------------------------- attr_accessor :character_sprites def initialize $onscreen = [] # 긮깄???긣귩띿맟 @viewport1 = Viewport.new(0, 0, 640, 480) @viewport2 = Viewport.new(0, 0, 640, 480) @viewport3 = Viewport.new(0, 0, 640, 480) @viewport2.z = 200 @viewport3.z = 5000 # ?귽깑?긞긵귩띿맟 @tilemap = Tilemap.new(@viewport1) @tilemap.tileset = RPG::Cache.tileset($game_map.tileset_name) for i in 0..6 autotile_name = $game_map.autotile_names[i] @tilemap.autotiles[i] = RPG::Cache.autotile(autotile_name) end @tilemap.map_data = $game_map.data @tilemap.priorities = $game_map.priorities # 긬긩깋?긵깒?깛귩띿맟 @panorama = Plane.new(@viewport1) @panorama.z = -1000 # 긲긅긐긵깒?깛귩띿맟 @fog = Plane.new(@viewport1) @fog.z = 3000 #########################################################걳빾뛛 # 긌긿깋긏??긚긵깋귽긣귩띿맟 # 룈붥빾뛛(긵깒귽깂?귩먩궸띿맟갂귽긹깛긣궼ID궴벏룈)갃 @character_sprites = [] @party_sprites = [] for i in $game_map.events.keys.sort sprite = Sprite_Character.new(@viewport1, $game_map.events[i]) @character_sprites[i]=sprite $onscreen[i] = true end @party_sprites.push(Sprite_Character.new(@viewport1, $game_player)) ######################################################### # 밮뚷귩띿맟 @weather = RPG::Weather.new(@viewport1) # 긯긏?긿귩띿맟 @picture_sprites = [] for i in 1..50 @picture_sprites.push(Sprite_Picture.new(@viewport2, $game_screen.pictures[i])) end # ?귽??긚긵깋귽긣귩띿맟 @timer_sprite = Sprite_Timer.new # 긲깒??뛛륷 update end #-------------------------------------------------------------------------- # 걶 됶뺳 #-------------------------------------------------------------------------- def dispose # ?귽깑?긞긵귩됶뺳 @tilemap.tileset.dispose for i in 0..6 @tilemap.autotiles[i].dispose end @tilemap.dispose # 긬긩깋?긵깒?깛귩됶뺳 @panorama.dispose # 긲긅긐긵깒?깛귩됶뺳 @fog.dispose ############################################################걳빾뛛 # 긌긿깋긏??긚긵깋귽긣귩됶뺳 # nil 궶귞둎뺳궢궶궋 for i in @character_sprites if i != nil i.dispose end end for i in @party_sprites if i != nil i.dispose end end ############################################################ # 밮뚷귩됶뺳 @weather.dispose # 긯긏?긿귩됶뺳 for sprite in @picture_sprites sprite.dispose end # ?귽??긚긵깋귽긣귩됶뺳 @timer_sprite.dispose # 긮깄???긣귩됶뺳 @viewport1.dispose @viewport2.dispose @viewport3.dispose end #-------------------------------------------------------------------------- # 걶 긲깒??뛛륷 #-------------------------------------------------------------------------- def update # 긬긩깋?궕뙸띪궻귖궻궴댶궶귡뤾뜃 if @panorama_name != $game_map.panorama_name or @panorama_hue != $game_map.panorama_hue @panorama_name = $game_map.panorama_name @panorama_hue = $game_map.panorama_hue if @panorama.bitmap != nil @panorama.bitmap.dispose @panorama.bitmap = nil end if @panorama_name != "" @panorama.bitmap = RPG::Cache.panorama(@panorama_name, @panorama_hue) end Graphics.frame_reset end # 긲긅긐궕뙸띪궻귖궻궴댶궶귡뤾뜃 if @fog_name != $game_map.fog_name or @fog_hue != $game_map.fog_hue @fog_name = $game_map.fog_name @fog_hue = $game_map.fog_hue if @fog.bitmap != nil @fog.bitmap.dispose @fog.bitmap = nil end if @fog_name != "" @fog.bitmap = RPG::Cache.fog(@fog_name, @fog_hue) end Graphics.frame_reset end # ?귽깑?긞긵귩뛛륷 @tilemap.ox = $game_map.display_x / 4 @tilemap.oy = $game_map.display_y / 4 @tilemap.update # 긬긩깋?긵깒?깛귩뛛륷 @panorama.ox = $game_map.display_x / 8 @panorama.oy = $game_map.display_y / 8 # 긲긅긐긵깒?깛귩뛛륷 @fog.zoom_x = $game_map.fog_zoom / 100.0 @fog.zoom_y = $game_map.fog_zoom / 100.0 @fog.opacity = $game_map.fog_opacity @fog.blend_type = $game_map.fog_blend_type @fog.ox = $game_map.display_x / 4 + $game_map.fog_ox @fog.oy = $game_map.display_y / 4 + $game_map.fog_oy @fog.tone = $game_map.fog_tone #####################################################걳빾뛛 # 긌긿깋긏??긚긵깋귽긣귩뛛륷 # 됪뽋둖궻긚긵깋귽긣궼뛛륷궢궶궋 for i in $game_map.events.keys if $onscreen[i] @character_sprites[i].update end end # 긵깒귽깂?긌긿깋뛛륷 for i in @party_sprites i.update end ##################################################### # 밮뚷긐깋긲귻긞긏귩뛛륷 @weather.type = $game_screen.weather_type @weather.max = $game_screen.weather_max @weather.ox = $game_map.display_x / 4 @weather.oy = $game_map.display_y / 4 @weather.update # 긯긏?긿귩뛛륷 for sprite in @picture_sprites sprite.update end # ?귽??긚긵깋귽긣귩뛛륷 @timer_sprite.update # 됪뽋궻륡뮧궴긘긃귽긏댧뭫귩먠믦 @viewport1.tone = $game_screen.tone @viewport1.ox = $game_screen.shake # 됪뽋궻긲깋긞긘깄륡귩먠믦 @viewport3.color = $game_screen.flash_color # 긮깄???긣귩뛛륷 @viewport1.update @viewport3.update end end if USE_TRAIN_ACTOR == true module Train_Actor module Spriteset_Map_Module def setup_actor_character_sprites(characters) if !setup_actor_character_sprites? for character in characters.reverse @party_sprites.unshift( Sprite_Character.new(@viewport1, character) ) end @setup_actor_character_sprites_flag = true end end end end end