设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 2026|回复: 2
打印 上一主题 下一主题

[已经过期] 关于图片扭曲。。。

[复制链接]

Lv2.观梦者

梦石
0
星屑
413
在线时间
214 小时
注册时间
2011-3-21
帖子
161
跳转到指定楼层
1
发表于 2013-11-6 12:06:04 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
就是定义4个点的坐标可以随意拉伸的→_→
貌似伪3D脚本里面有这种算法可是看的头疼。。
下面是脚本
RUBY 代码复制
  1. #克蓝娜德 CNGAMES
  2. =begin
  3. 把下面的字符加到你的地图名里面
  4. [W3D]  -  使用伪3D 如果你不填的话 就木有效果
  5. [#XX] -  XX = 叉叉范围是0-89之间 惯例用了我给你的伪3D看到这个是不是有违和感
  6. [-X]  -  X = 这个X的范围是0或者1 0为显示两面墙 1为仅显示
  7. 法线正面的墙(只是个概念伪3D肿么会有法线,也就是正面朝着你的墙)
  8. 如果你不写[#XX]或者[-X]就会使用默认的
  9. 默认参数为:
  10. [#XX] = [#45]
  11. [-X] = [-1]
  12. =end
  13. class Game_System
  14.   alias initialize_W3D initialize
  15.  
  16.   attr_reader :factor
  17.   attr_reader :correct
  18.  
  19.   attr_reader :scroll_y
  20.   attr_reader :distance
  21.   attr_reader :angle
  22.   attr_reader :height
  23.   attr_reader :columns
  24.   attr_reader :filter
  25.   attr_reader :zoom
  26.   attr_accessor :new_zoom
  27.   attr_accessor :hidewalls
  28.   attr_accessor :hide
  29.   attr_accessor :new_angle
  30.   attr_accessor :need_refresh
  31.   attr_accessor :coord
  32.   def initialize
  33.     initialize_W3D
  34.     [url=home.php?mod=space&uid=98379]@zoom[/url] = 1.00
  35.     @scroll_y = 256#相机与角色的距离
  36.     [url=home.php?mod=space&uid=291977]@height[/url] = 1    #地图原件的高度,建议不要改 除非你做特殊效果
  37.     @columns = 16   #伪3D图块的质量,值为8或者16。如果场景不大可以用16。
  38.                    #针对纵面 8的话图块边缘锯齿比较大,流畅。16边缘锯齿较小,卡。
  39.     [url=home.php?mod=space&uid=457221]@Filter[/url] = 2*32 #纵向墙的高度设定(如果增加高度 不要忘了在上面加上标志)
  40.     @hidewalls = 1 #这个就是默认的双面还是单面墙显示的值,值为0或1。
  41.     @distance = 480#焦距 玩过相机的人都知道 值不要太低,默认为480,不要低于256。
  42.     #焦距值越高看到纵面的墙壁面积就越少,越低看到的墙壁面积就越多。
  43.     [url=home.php?mod=space&uid=94902]@Hide[/url] = 90#角色与原件距离的Y坐标的值,用于遮挡角色时半透明。
  44.     #一个原件为32像素所以值至少为33 不然低于33 你脸贴到墙上墙都不会管你。
  45.     self.angle = 45 #摄像机角度
  46.     #以上属性均可在游戏中更改,用事件页第三页的脚本调用  格式为:
  47.     #$game_system.(属性) = value(值)
  48.     #举个例子:
  49.     #$game_system.zoom = 1.5   #(1.5为放大150%)
  50.     #或者
  51.     #$game_system.columns = 8
  52.  
  53.     #以下为内部使用,请勿随意更改
  54.     @new_angle = false
  55.     @need_refresh = false
  56.     @new_zoom = false
  57.     @coord = nil
  58.   end
  59.  
  60.   #部分脚本基于Neo Mode07。
  61.   def zoom=(n)
  62.     if @zoom != n
  63.       @new_zoom = true
  64.     end
  65.     @zoom = n
  66.   end
  67.  
  68.   def refresh(x,y)
  69.     @coord = [x,y]
  70.   end
  71.  
  72.   def screen2W3D_y(y)
  73.     y *= @zoom
  74.     return @scroll_y + (@cd * y) / (@distance - y * @sinus)
  75.   end
  76.  
  77.   def screen2map_y(y)
  78.     return ((@distance * (@scroll_y - y) / @zoom /
  79.       (@dif - y * @sinus) + @scroll_y))
  80.   end
  81.  
  82.   def screen2zoom(y)
  83.     return (y * @factor + @correct) * @zoom
  84.   end
  85.  
  86.   def angle=(n)
  87.     [url=home.php?mod=space&uid=124954]@Angle[/url] = n
  88.     @cosinus = Math.cos(Math::PI * (@angle / 180.0))
  89.     @sinus = Math.sin(Math::PI * (@angle / 180.0))
  90.     @cd = @cosinus * @distance
  91.     @ys = @scroll_y * @sinus
  92.     @dif = @ys - @cd
  93.  
  94.     z0 = @distance / (@distance + @scroll_y * @sinus)
  95.     h0 = (-@distance * @scroll_y * @cosinus) /
  96.       (@distance + @scroll_y * @sinus) + @scroll_y
  97.     @factor = (1.0 - z0) / (@scroll_y - h0)
  98.     @correct = 1.0 - @scroll_y * @factor
  99.     @new_angle = true
  100.   end
  101.  
  102.   def distance=(n)
  103.     @distance = n
  104.     self.angle = @angle
  105.   end
  106.  
  107.   def height=(n)
  108.     @height = n
  109.     @need_refresh = true
  110.   end
  111.  
  112.   def columns=(n)
  113.     @columns = n
  114.     @need_refresh = true
  115.   end
  116. end
  117.  
  118. $data_maps = load_data("Data/MapInfos.rxdata")
  119.  
  120. class W3DTilemap
  121.   attr_reader   :autotiles
  122.   attr_accessor :tileset
  123.   attr_accessor :priorities
  124.  
  125.   def initialize(vp)
  126.     @viewport = vp
  127.     @horizontal = {}  
  128.     @vertical = {}   
  129.     @tileset = nil
  130.     @map_data = nil
  131.     @priorities = nil
  132.     @bitmap = Bitmap.new(1,1)
  133.     @sprites = []     
  134.     @autotiles = []
  135.     refresh
  136.   end
  137.  
  138.   def refresh(sprites=true)
  139.     @height = $game_system.height
  140.     @columns = $game_system.columns
  141.     @scroll_y = $game_system.scroll_y
  142.     @filter = $game_system.filter
  143.     @ox = -1
  144.     @oy = -1
  145.     if sprites
  146.       w = nil
  147.       @sprites.each{ |w|
  148.         w.dispose}
  149.       @sprites = []
  150.       for i in 0...(@scroll_y / @height)
  151.         @sprites[i] = Sprite.new(@viewport)
  152.         @sprites[i].y = i * @height
  153.       end
  154.       for i in (@scroll_y / @height)...(((480-@scroll_y) / 2 + @scroll_y) /
  155.                                                                       @height)
  156.         @sprites[i] = Sprite.new(@viewport)
  157.         @sprites[i].y = i * @height * 2 - @scroll_y
  158.       end
  159.     end
  160.     @sprites.each {|w|
  161.       w.zoom_x = $game_system.screen2zoom(w.y+1)
  162.       if w.zoom_x > 1
  163.         w.zoom_y = w.zoom_x
  164.       end
  165.       w.x = 320
  166.     }
  167.     if sprites
  168.       unless @map_data.nil?
  169.         refresh_bitmap
  170.       end
  171.     end
  172.   end
  173.  
  174.   def terrain=(n)
  175.     @terrain = n
  176.   end
  177.  
  178.   def tileset=(bitmap)
  179.     @tileset = bitmap
  180.   end
  181.  
  182.   def ox=(n)
  183.     return if @ox == n
  184.     @ox = n
  185.     dif = (@oy + @scroll_y)
  186.     ox = n + 320
  187.     w = nil
  188.     i = nil
  189.     a = nil
  190.     z = nil
  191.     erase = nil
  192.  
  193.     @sprites.each{ |w|
  194.       w.ox = ox}
  195.  
  196.     @horizontal.each{ |i, a|
  197.       new_y = $game_system.screen2W3D_y(i - dif)
  198.       z = $game_system.screen2zoom(new_y)
  199.       erase = (a[0].y - 256).between?(1,$game_system.hide)
  200.       a.each{ |w|
  201.         w.x = 320 + z * (w.map_x - ox)
  202.         if erase and 28 >= (ox - w.map_x).abs
  203.           w.opacity = 100
  204.         else
  205.           w.opacity = 255
  206.         end
  207.       }
  208.     }
  209.  
  210.     @vertical.each{ |i, a|
  211.       new_y = $game_system.screen2W3D_y(i - dif)
  212.       z = $game_system.screen2zoom(new_y)
  213.       erase = (a[0].map_y % 6 != 0)
  214.       a.each{ |w|
  215.         if erase and (w.map_x - ox).abs < @filter
  216.           w.jump = true     
  217.           w.visible = false
  218.           next
  219.         end
  220.         w.jump = false
  221.         if w.visible
  222.           if w.visible = (ox*w.side >= w.map_x*w.side)
  223.             w.x = 320 + z * (w.map_x - ox)
  224.           end
  225.         elsif w.visible = (ox*w.side >= w.map_x*w.side)
  226.           w.y = new_y
  227.           w.x = 320 + z * (w.map_x - ox)
  228.           w.zoom_y = z
  229.         end
  230.       }
  231.     }
  232.   end
  233.  
  234.   def oy=(n)
  235.     return if @oy == n
  236.     @oy = n
  237.     ox320 = @ox + 320
  238.     dif = (n + @scroll_y)
  239.     w = nil
  240.     i = nil
  241.     a = nil
  242.     z = nil
  243.     mz = nil
  244.     new_y = nil
  245.     erase = nil
  246.  
  247.     @sprites.each{ |w|
  248.       w.src_rect.y = $game_system.screen2map_y(w.y+1).round + @oy
  249.     }
  250.  
  251.     @horizontal.each{ |i, a|
  252.       new_y = $game_system.screen2W3D_y(i - dif)
  253.       z = $game_system.screen2zoom(new_y)
  254.       erase = (a[0].y - 256).between?(1,$game_system.hide)
  255.       a.each{ |w|
  256.         w.y = new_y
  257.         w.x = 320 + (z * (w.map_x - ox320))
  258.         w.zoom_x = (w.zoom_y = z + 0.04)
  259.         if erase and 28 >= (ox320 - w.map_x).abs
  260.           w.opacity = 100
  261.         else
  262.           w.opacity = 255
  263.         end
  264.       }
  265.     }
  266.  
  267.     @vertical.each{ |i, a|
  268.     new_y = $game_system.screen2W3D_y(i - dif)
  269.     z = $game_system.screen2zoom(new_y)
  270.     mz = [z,1].max
  271.     a.each { |w|
  272.       if w.visible
  273.         w.y = new_y
  274.         w.x = 320 + z * (w.map_x - ox320)
  275.         w.zoom_y = z
  276.         w.zoom_x = mz
  277.       end
  278.       }
  279.     }
  280.   end
  281.  
  282.   def map_data=(data)
  283.     @map_data = data
  284.     refresh_bitmap
  285.   end
  286.  
  287.   def refresh_bitmap
  288.     @terrain = $game_map.terrain_tags if @terrain.nil?
  289.     @horizontal.each{ |i, c|
  290.       c.each{ |w|
  291.         w.dispose}}
  292.     @vertical.each{ |i, c|
  293.       c.each{ |w|
  294.         w.dispose}}
  295.     @horizontal.clear
  296.     @vertical.clear
  297.  
  298.     @bitmap.dispose
  299.     @bitmap = Bitmap.new(@map_data.xsize*32,@map_data.ysize*32)
  300.  
  301.     rect = Rect.new(0,0,32,32)
  302.     source = Rect.new(0,0,32,32)
  303.     i = 0
  304.     x = 0
  305.     y = 0
  306.     z = 0
  307.     data = nil
  308.     wall = nil
  309.     for x in [email]0...@map_data.xsize[/email]
  310.       for y in [email]0...@map_data.ysize[/email]
  311.         rect.x = x*32
  312.         rect.y = y*32
  313.         source.x = ((@map_data[x,y,0] - 384) % 8) * 32
  314.         source.y = ((@map_data[x,y,0] - 384) / 8) * 32
  315.         @bitmap.stretch_blt(rect,@tileset,source)
  316.         for z in 0..2
  317.           data = @map_data[x,y,z]
  318.           if @terrain[data] == 2  
  319.             if @terrain[@map_data[[x+1,@map_data.xsize-1].min,y,z].to_i] != 2
  320.               for i in 0...@columns
  321.                 wall = SWall.new(@viewport,@columns)
  322.                 p @viewport
  323.                 p @columns
  324.                 wall.map_x = x * 32 + 32
  325.                 wall.map_y = y * 32 + (@columns-i) * 32 / @columns
  326.                 wall.bitmap = @tileset
  327.                 wall.z = wall.map_y
  328.                 wall.side = 1 * $game_system.hidewalls
  329.                 wall.set_src(@terrain, data, i)
  330.                 wall.ox = 32 / @columns / 2 - 1
  331.                 if @vertical.key?(wall.map_y)
  332.                   @vertical[wall.map_y].push(wall)
  333.                 else
  334.                   @vertical[wall.map_y] = [wall]
  335.                 end
  336.               end
  337.             end
  338.             if @terrain[@map_data[[x-1,0].max,y,z].to_i] != 2
  339.               for i in 0...@columns
  340.                 wall = SWall.new(@viewport,@columns)
  341.                 wall.map_x = x * 32
  342.                 wall.map_y = y * 32 + (@columns-i) * 32 / @columns
  343.                 wall.bitmap = @tileset
  344.                 wall.mirror = true
  345.                 wall.set_src(@terrain, data, i)
  346.                 wall.z = wall.map_y
  347.                 wall.side = -1 * $game_system.hidewalls
  348.                 wall.ox = 32 / @columns / 2
  349.                 if @vertical.key?(wall.map_y)
  350.                   @vertical[wall.map_y].push(wall)
  351.                 else
  352.                   @vertical[wall.map_y] = [wall]
  353.                 end
  354.               end
  355.             end
  356.           end
  357.           if @terrain[data] == 1 and
  358.             (y+1 == @map_data.ysize or
  359.               @map_data[x,y+1,z] != data + 8)
  360.             wall = Wall.new(@viewport,1,@map_data)
  361.             wall.map_x = x * 32 + 16
  362.             wall.map_y = y * 32 + 32 + 1
  363.             wall.real_y = y
  364.             wall.bitmap = @tileset
  365.             wall.set_src(@terrain, data)
  366.             wall.ox = 15
  367.             wall.z = wall.map_y
  368.             if @horizontal.key?(wall.map_y)
  369.               @horizontal[wall.map_y].push(wall)
  370.             else
  371.               @horizontal[wall.map_y] = [wall]
  372.             end
  373.           end
  374.         end
  375.       end
  376.     end
  377.     for i in [email]0...@sprites.size[/email]
  378.       @sprites[i].bitmap = @bitmap
  379.       @sprites[i].src_rect.set(0,i,@bitmap.width,@height)
  380.       if i >= @scroll_y / @height
  381.         @sprites[i].src_rect.height *= 2
  382.       end
  383.     end
  384.   end
  385.  
  386.   def update
  387.     if $game_system.coord
  388.       x = $game_system.coord[0]
  389.       y = $game_system.coord[1]
  390.       source = Rect.new(0,0,32,32)
  391.       rect = Rect.new(x*32,y*32,32,32)
  392.       for z in 0..2
  393.         if not [1,2].include?(@terrain[@map_data[x,y,z]])
  394.           source.x = ((@map_data[x,y,z] - 384) % 8) * 32
  395.           source.y = ((@map_data[x,y,z] - 384) / 8) * 32
  396.           @bitmap.stretch_blt(rect,@tileset,source)
  397.         end
  398.       end
  399.       $game_system.coord = nil
  400.     end
  401.  
  402.     if $game_system.need_refresh
  403.       $game_system.new_angle = false
  404.       $game_system.need_refresh = false
  405.       refresh
  406.       return
  407.     end
  408.     if $game_system.new_zoom
  409.       $game_system.new_zoom = false
  410.       refresh(false)
  411.       return
  412.     end
  413.     if $game_system.new_angle
  414.       @sprites.each {|w|
  415.       w.zoom_x = $game_system.screen2zoom(w.y+1)
  416.         if w.zoom_x > 1
  417.           w.zoom_y = w.zoom_x
  418.         end
  419.         w.x = 320
  420.       }
  421.       x = @ox
  422.       y = @oy
  423.       @ox += 1
  424.       @oy += 1
  425.       self.ox = x
  426.       self.oy = y
  427.       $game_system.new_angle = false
  428.     end
  429.   end
  430.  
  431.   def dispose
  432.     @horizontal.each{ |i, c|
  433.       c.each{ |w|
  434.         w.dispose}}
  435.     @vertical.each{ |i, c|
  436.       c.each{ |w|
  437.         w.dispose}}
  438.     @sprites.each{ |w|
  439.         w.dispose}
  440.     @bitmap.dispose
  441.   end
  442. end
  443.  
  444. class Wall < Sprite
  445.   attr_accessor :map_x
  446.   attr_accessor :map_y
  447.   attr_accessor :real_y
  448.   attr_accessor :side
  449.   attr_accessor :jump
  450.   attr_accessor :height
  451.   def initialize(vp,spalten,data=nil)
  452.     super(vp)
  453.     @data = data
  454.     @spalten = spalten
  455.     [url=home.php?mod=space&uid=271873]@jump[/url] = false
  456.     @real_y = 0
  457.     @map_x = 0
  458.     @map_y = 0
  459.     @side = 0
  460.     self.x = 320
  461.     self.z = 100
  462.     @blick = true
  463.   end
  464.  
  465.   def set_src(terrain,tile,i=0)
  466.     height = 1
  467.     while terrain[tile - height * 8].to_i == 1
  468.       height += 1
  469.     end
  470.     self.src_rect.set(
  471.             ((tile % 8) * 32) + 32 / @spalten * i,
  472.             ((tile - 384) / 8 - height + 1) * 32,
  473.             32 / @spalten,
  474.             32 * height)
  475.     self.oy = height * 32 - 1
  476.     @height = height
  477.   end
  478. end
  479.  
  480. class SWall < Wall
  481.   def set_src(terrain,tile,i)
  482.     super
  483.     self.src_rect.height -= 32
  484.     self.oy -= 32
  485.   end
  486. end
  487.  
  488. class Game_Map
  489.   attr_reader :W3D
  490.  
  491.   alias scroll_down_W3D scroll_down
  492.   alias scroll_left_W3D scroll_left
  493.   alias scroll_right_W3D scroll_right
  494.   alias scroll_up_W3D scroll_up
  495.   alias setup_W3D setup
  496.  
  497.   def scroll_down(distance)
  498.     if $game_map.W3D
  499.       @display_y += distance
  500.     else
  501.       scroll_down_W3D(distance)
  502.     end
  503.   end
  504.  
  505.   def scroll_left(distance)
  506.     if $game_map.W3D
  507.       @display_x -= distance
  508.     else
  509.       scroll_left_W3D(distance)
  510.     end
  511.   end
  512.  
  513.   def scroll_right(distance)
  514.     if $game_map.W3D
  515.       @display_x += distance
  516.     else
  517.       scroll_right_W3D(distance)
  518.     end
  519.   end
  520.  
  521.   def scroll_up(distance)
  522.     if $game_map.W3D
  523.       @display_y -= distance
  524.     else
  525.       scroll_up_W3D(distance)
  526.     end
  527.   end
  528.  
  529.   def name
  530.     return $data_maps[@map_id].name
  531.   end
  532.  
  533.   def setup(id)
  534.     setup_W3D(id)
  535.     @W3D = false
  536.     for part in self.name.split("[")
  537.       case part
  538.       when /#(.*)\]/
  539.         $game_system.angle = $1.to_i
  540.       when "W3D]"
  541.         @W3D = true
  542.       when  /-(.*)\]/
  543.         $game_system.hidewalls = $1.to_i
  544.       end
  545.     end
  546.   end
  547. end
  548.  
  549. class Game_Character
  550.   alias screen_z_W3D screen_z
  551.   def screen_z(height = 0)
  552.     if $game_map.W3D
  553.       if @always_on_top
  554.         return $game_map.height * 32 + 10
  555.       end
  556.       return @real_y / 4 + 33
  557.     else
  558.       screen_z_W3D(height)
  559.     end
  560.   end
  561. end
  562.  
  563. class Game_Player
  564.   alias center_W3D center
  565.   def center(x, y)
  566.     if $game_map.W3D
  567.       $game_map.display_x = x * 128 - CENTER_X
  568.       $game_map.display_y = y * 128 - CENTER_Y
  569.     else
  570.       center_W3D(x, y)
  571.     end
  572.   end
  573. end
  574.  
  575. class Sprite_Character
  576.   alias update_W3D update
  577.   def update
  578.     update_W3D
  579.     return unless $game_map.W3D
  580.     self.y = $game_system.screen2W3D_y(self.y - $game_system.scroll_y)
  581.     self.zoom_x = self.zoom_y = $game_system.screen2zoom(self.y)
  582.     self.x = 320 + (self.zoom_x * (self.x - 320))
  583.   end
  584. end
  585.  
  586. class Spriteset_Map
  587.   def initialize
  588.     @viewport1 = Viewport.new(0, 0, 640, 480)
  589.     @viewport2 = Viewport.new(0, 0, 640, 480)
  590.     @viewport3 = Viewport.new(0, 0, 640, 480)
  591.     @viewport2.z = 200
  592.     @viewport3.z = 5000
  593.     if $game_map.W3D
  594.       @tilemap = W3DTilemap.new(@viewport1)
  595.       @tilemap.terrain = $game_map.terrain_tags
  596.     else
  597.       @tilemap = Tilemap.new(@viewport1)
  598.     end
  599.     @tilemap.tileset = RPG::Cache.tileset($game_map.tileset_name)
  600.     for i in 0..6
  601.       autotile_name = $game_map.autotile_names[i]
  602.       @tilemap.autotiles[i] = RPG::Cache.autotile(autotile_name)
  603.     end
  604.     @tilemap.map_data = $game_map.data
  605.     @tilemap.priorities = $game_map.priorities
  606.     @panorama = Plane.new(@viewport1)
  607.     @panorama.z = -1000
  608.     @fog = Plane.new(@viewport1)
  609.     @fog.z = 3000
  610.     @character_sprites = []
  611.     for i in $game_map.events.keys.sort
  612.       sprite = Sprite_Character.new(@viewport1, $game_map.events[i])
  613.       @character_sprites.push(sprite)
  614.     end
  615.     @character_sprites.push(Sprite_Character.new(@viewport1, $game_player))
  616.     @weather = RPG::Weather.new(@viewport1)
  617.     @picture_sprites = []
  618.     for i in 1..50
  619.       @picture_sprites.push(Sprite_Picture.new(@viewport2,
  620.         $game_screen.pictures[i]))
  621.     end
  622.     @timer_sprite = Sprite_Timer.new
  623.     update
  624.   end
  625. ###########重定义update       更改远景图更新速度 直接复制默认的  顺着箭头往下走
  626.   def update
  627.     # 远景与现在的情况有差异发生的情况下                                     ↓
  628.     if @panorama_name != $game_map.panorama_name or#                         ↓
  629.        @panorama_hue != $game_map.panorama_hue#                              ↓
  630.       @panorama_name = $game_map.panorama_name#                              ↓
  631.       @panorama_hue = $game_map.panorama_hue#                                ↓
  632.       if @panorama.bitmap != nil#                                            ↓
  633.         @panorama.bitmap.dispose#                                            ↓
  634.         @panorama.bitmap = nil#                                              ↓
  635.       end
  636.       if @panorama_name != ""#                                               ↓
  637.         @panorama.bitmap = RPG::Cache.panorama(@panorama_name, @panorama_hue)
  638.       end
  639.       Graphics.frame_reset#                                                  ↓
  640.     end
  641.     # 雾与现在的情况有差异的情况下                                           ↓
  642.     if @fog_name != $game_map.fog_name or @fog_hue != $game_map.fog_hue#     ↓
  643.       @fog_name = $game_map.fog_name#                                        ↓
  644.       @fog_hue = $game_map.fog_hue#                                          ↓
  645.       if @fog.bitmap != nil#                                                 ↓
  646.         @fog.bitmap.dispose#                                                 ↓
  647.         @fog.bitmap = nil#                                                   ↓
  648.       end
  649.       if @fog_name != ""
  650.         @fog.bitmap = RPG::Cache.fog(@fog_name, @fog_hue)#                   ↓
  651.       end
  652.       Graphics.frame_reset#                                                  ↓
  653.     end
  654.     # 刷新元件地图
  655.     @tilemap.ox = $game_map.display_x / 4#                                   ↓
  656.     @tilemap.oy = $game_map.display_y / 4#                                   ↓
  657.     @tilemap.update
  658.     # 刷新远景平面#                                                          ↓
  659.     @panorama.ox = $game_map.display_x / 8 #这里更改X速度                   ←
  660.     @panorama.oy = $game_map.display_y * 0 #这里更改Y速度                   ←
  661.     # 刷新雾平面
  662.     @fog.zoom_x = $game_map.fog_zoom / 100.0
  663.     @fog.zoom_y = $game_map.fog_zoom / 100.0
  664.     @fog.opacity = $game_map.fog_opacity
  665.     @fog.blend_type = $game_map.fog_blend_type
  666.     @fog.ox = $game_map.display_x / 4 + $game_map.fog_ox
  667.     @fog.oy = $game_map.display_y / 4 + $game_map.fog_oy
  668.     @fog.tone = $game_map.fog_tone
  669.     # 刷新角色活动块
  670.     for sprite in @character_sprites
  671.       sprite.update
  672.     end
  673.     # 刷新天候图形
  674.     @weather.type = $game_screen.weather_type
  675.     @weather.max = $game_screen.weather_max
  676.     @weather.ox = $game_map.display_x / 4
  677.     @weather.oy = $game_map.display_y / 4
  678.     @weather.update
  679.     # 刷新图片
  680.     for sprite in @picture_sprites
  681.       sprite.update
  682.     end
  683.     # 刷新计时器块
  684.     @timer_sprite.update
  685.     # 设置画面的色调与震动位置
  686.     @viewport1.tone = $game_screen.tone
  687.     @viewport1.ox = $game_screen.shake
  688.     # 设置画面的闪烁色
  689.     @viewport3.color = $game_screen.flash_color
  690.     # 刷新显示端口
  691.     @viewport1.update
  692.     @viewport3.update
  693.   end
  694. end
签名是什么 好吃么
好吃

Lv2.观梦者

梦石
0
星屑
413
在线时间
214 小时
注册时间
2011-3-21
帖子
161
2
 楼主| 发表于 2013-11-7 20:31:15 | 只看该作者
-A-没人回帖也是种境界
签名是什么 好吃么
好吃
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
76
在线时间
1379 小时
注册时间
2012-7-5
帖子
1698

开拓者

3
发表于 2013-11-7 22:05:08 | 只看该作者
=_=伪3D我也用过
但是没运行的起来

点评

orz  发表于 2013-11-8 12:12

  -fk: -azogi:
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-4-28 13:59

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表