赞 | 0 |
VIP | 0 |
好人卡 | 3 |
积分 | 1 |
经验 | 5069 |
最后登录 | 2014-6-18 |
在线时间 | 181 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 181 小时
- 注册时间
- 2010-7-20
- 帖子
- 347
|
本帖最后由 5810707 于 2012-6-15 11:16 编辑
这是那个章鱼牌加速器
犹由于有个BUG 不加个开关不行- module Fux2
- HACK_X = -11
- HACK_Y = -8
- HACK_WIDTH = 12
- HACK_HEIGHT = 9
- end
- class Game_Map
-
- def setup(map_id)
- $speclist = []
- @map_id = map_id
- @map = load_data(sprintf("Data/Map%03d.rvdata", @map_id))
- @display_x = 0
- @display_y = 0
- @passages = $data_system.passages
- referesh_vehicles
- setup_events
- setup_scroll
- setup_parallax
- @need_refresh = false
- end
-
- def update_events
- ($splist+$autolist+$speclist).uniq.sort.each{|i| $game_map.events[i].update if $game_map.events[i]}
- for common_event in @common_events.values
- common_event.update
- end
- end
- end
- class Spriteset_Map
- def create_characters
- $splist = []
- $autolist = []
- @character_sprites = []
- for i in $game_map.events.keys.sort
- next if $speclist.include?(i)
- #~ if $game_map.events[i].trigger >= 3
- #~ $autolist << i
- #~ end
- if ($game_map.events[i].x-$game_map.display_x/256+Fux2::HACK_X).abs < Fux2::HACK_WIDTH+1 && ($game_map.events[i].y-$game_map.display_y/256+Fux2::HACK_Y).abs < Fux2::HACK_HEIGHT+1
- sprite = Sprite_Character.new(@viewport1, $game_map.events[i])
- @character_sprites.push(sprite)
- $splist << i
- end
- end
- for vehicle in $game_map.vehicles
- sprite = Sprite_Character.new(@viewport1, vehicle)
- @character_sprites.push(sprite)
- end
- @character_sprites.push(Sprite_Character.new(@viewport1, $game_player))
- end
-
- def add_character(i)
- return if $speclist.include?(i)
- sprite = Sprite_Character.new(@viewport1, $game_map.events[i])
- @character_sprites.insert($splist.size,sprite)
- $speclist << i
- end
- def update_characters
- if @scx != $game_map.display_x/256+Fux2::HACK_X || @scy != $game_map.display_y/256+Fux2::HACK_Y
- @scx = $game_map.display_x/256+Fux2::HACK_X
- @scy = $game_map.display_y/256+Fux2::HACK_Y
- $splist.each_with_index do |i,j|
- if ($game_map.events[i].x-$game_map.display_x/256+Fux2::HACK_X).abs > Fux2::HACK_WIDTH || ($game_map.events[i].y-$game_map.display_y/256+Fux2::HACK_Y).abs > Fux2::HACK_HEIGHT
- @character_sprites[j].dispose
- @character_sprites.delete_at(j)
- $splist.delete_at(j)
- end
- end
- for i in $game_map.events.keys.sort
- next if $splist.include?(i)
- if ($game_map.events[i].x-$game_map.display_x/256+Fux2::HACK_X).abs < Fux2::HACK_WIDTH+1 && ($game_map.events[i].y-$game_map.display_y/256+Fux2::HACK_Y).abs < Fux2::HACK_HEIGHT+1
- sprite = Sprite_Character.new(@viewport1, $game_map.events[i])
- @character_sprites.insert(0,sprite)
- $splist.insert(0,i)
- end
- end
- end
- @character_sprites.each{|i| i.update}
- end
- end
- class Scene_Map < Scene_Base
- attr_accessor :spriteset
- end
- class Game_Interpreter
- def command_205
- if $game_map.need_refresh
- $game_map.refresh
- end
- character = get_character(@params[0])
- if @params[0] > 0
- if $scene.is_a?(Scene_Map)
- $scene.spriteset.add_character(@params[0])
- end
- end
- if character != nil
- character.force_move_route(@params[1])
- @moving_character = character if @params[1].wait
- end
- return true
- end
-
- end
复制代码 |
|