Isto é uma pré-visualização de um tema em Hitskin.com
Instalar o tema • Voltar para a ficha do tema
Client without DirectX
Aldeia RPG :: VXA-OS Engine :: Central de ajuda :: Tutoriais
Página 1 de 1
Client without DirectX
1) After downloading the DirectX version, download the Game.exe executable below and replace it with the one in the folder Client
Download Game.exe
2) Open the Script Editor (F11)
3) Search for the script [VS] Mouse:
4) Replace ALL [VS] Mouse script with:
Credits:
Valentine
Download Game.exe
2) Open the Script Editor (F11)
3) Search for the script [VS] Mouse:
4) Replace ALL [VS] Mouse script with:
- Código:
#==============================================================================
# ** Mouse
#------------------------------------------------------------------------------
# Autor: Cidiomar
#==============================================================================
module Mouse
typedef 'unsigned long HCURSOR'
dll = 'System/VXAOS.dll'
Mouse__setup = c_function(dll, 'void Mouse__setup(struct RArray*, struct RArray*, struct RArray*, void *)')
Mouse__update = c_function(dll, 'void Mouse__update()')
Mouse__getPos = c_function(dll, 'void Mouse__getPos(long *)')
Mouse__getOldPos = c_function(dll, 'void Mouse__getOldPos(long *)')
@triggered = Input.triggered
@pressed = Input.pressed
@released = Input.released
@repeated = Input.repeated
@last_lclick = Time.now
@last_rclick = Time.now
@dbl_lclick = false
@dbl_rclick = false
@pos = Array.new(2, 0)
Mouse__setup.call(@triggered, @pressed, @released, @repeated)
def self.click?(button)
return @triggered[1] if button == :L
return @triggered[2] if button == :R
end
def self.press?(button)
return @pressed[1] if button == :L
return @pressed[2] if button == :R
end
def self.release?(button)
return @released[1] if button == :L
return @released[2] if button == :R
end
def self.repeat?(button)
return @repeated[1] if button == :L
return @repeated[2] if button == :R
end
def self.dbl_clk?(button)
return @dbl_lclick if button == :L
return @dbl_rclick if button == :R
end
def self.tile_x
# Corrige o display_x, já que a tela pode se mover
#16 em vez de 32 pixel na horizontal se a largura da
#resolução for superior a 1000
x = $game_map.display_x > 0 && $game_map.display_x > $game_map.display_x.to_i ? self.x + 16 : self.x
(x / 32 + $game_map.display_x).to_i
end
def self.tile_y
(($game_map.display_y * 32 + self.y) / 32).to_i
end
def self.in_tile?(object)
object.x == tile_x && object.y == tile_y
end
def self.update
Mouse__update.call()
@pos = [0, 0].pack('l2')
@old_pos = [0, 0].pack('l2')
Mouse__getPos.call(@pos)
Mouse__getOldPos.call(@old_pos)
@pos = @pos.unpack('l2')
@old_pos = @old_pos.unpack('l2')
@dbl_lclick = double_left_click?
@dbl_rclick = double_right_click?
end
def self.double_left_click?
return false unless click?(:L)
result = false
t_diff = Time.now - @last_lclick
if t_diff < 0.5 && @last_pos == @pos
result = true
else
@last_lclick = Time.now
@last_pos = @pos
end
result
end
def self.double_right_click?
return false unless click?(:R)
result = false
t_diff = Time.now - @last_rclick
if t_diff < 0.5 && @last_pos == @pos
result = true
else
@last_rclick = Time.now
@last_pos = @pos
end
result
end
def self.x; @pos[0]; end
def self.y; @pos[1]; end
def self.pos; @pos.dup; end
def self.old_x; @old_pos[0]; end
def self.old_y; @old_pos[1]; end
def self.old_pos; @old_pos.dup; end
def self.moved?; @pos != @old_pos; end
end
#==============================================================================
# ** Graphics
#==============================================================================
module Graphics
def self.is_fullscreen?
false
end
def self.toggle_fullscreen
end
def self.vsync=(vsync)
end
def self.vsync
end
end
Credits:
Valentine
Tópicos semelhantes
» Como fazer para o client buscar informações tipo caracter/conta/mapa no servidor e não no próprio client?
» Mudando o DirectX
» Download DirectX
» Engine com DirectX 8
» Cliente sem DirectX
» Mudando o DirectX
» Download DirectX
» Engine com DirectX 8
» Cliente sem DirectX
Aldeia RPG :: VXA-OS Engine :: Central de ajuda :: Tutoriais
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos
|
|