Commit 51f4ec56 authored by 神楽坂玲奈's avatar 神楽坂玲奈

大厅png换24位,去掉nbproject的version

parent 8c2803a7
cd /d %~dp0 cd /d %~dp0
del graphics\avatars\*_*.png del graphics\avatars\*_*.png
del Thumbs.db /s /F /A:S del Thumbs.db /s /F /A:S
del fonts\*_STOP.*
del log.txt del log.txt
del err.txt
\ No newline at end of file
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
cd /d %~dp0 cd /d %~dp0
ruby lib/main.rb > log.txt echo ------------------ >> log.txt
\ No newline at end of file echo ------------------ >> err.txt
ruby\bin\ruby lib/main.rb >> log.txt 2>> err.txt
\ No newline at end of file
...@@ -27,16 +27,19 @@ class Iduel ...@@ -27,16 +27,19 @@ class Iduel
def send(head, *args) def send(head, *args)
info = "##{head.to_s(16).upcase}|#{args.join(',')}".encode("GBK") + RS info = "##{head.to_s(16).upcase}|#{args.join(',')}".encode("GBK") + RS
puts "<< #{info}" puts "<< #{info}"
(@conn.write info) rescue Event.push Error.new(0) (@conn.write info) rescue Event.push Event::Error.new(0)
end end
def recv(info) def recv(info)
if info.nil? Event.push begin
Event.push Error.new(0)
end
info.chomp!(RS) info.chomp!(RS)
info.encode! "UTF-8", :invalid => :replace, :undef => :replace info.encode! "UTF-8", :invalid => :replace, :undef => :replace
puts ">> #{info}" puts ">> #{info}"
Event.push Event.parse info Event.parse info
rescue
@conn.close
@conn = nil
Event::Error.new(0)
end
end end
def close def close
$iduel.quit $iduel.quit
......
...@@ -19,14 +19,13 @@ class Scene ...@@ -19,14 +19,13 @@ class Scene
end end
def initialize def initialize
@windows = [] @windows = []
#@fps = Window.new(0,0,100,24)
#@font = TTF.open('fonts/WenQuanYi Micro Hei.ttf', 16)
#@fpscount = 0
end end
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# ● 开始处理 # ● 开始处理
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def start def start
@fps = Window.new(0,0,100,24,500)
@font = TTF.open('fonts/WenQuanYi Micro Hei.ttf', 16)
end end
def refresh_rect(x, y, width, height, background=@background, ox=0,oy=0) def refresh_rect(x, y, width, height, background=@background, ox=0,oy=0)
Surface.blit(background,x+ox,y+oy,width,height,$screen,x,y) Surface.blit(background,x+ox,y+oy,width,height,$screen,x,y)
...@@ -56,6 +55,8 @@ class Scene ...@@ -56,6 +55,8 @@ class Scene
#@fpscount += 1 #@fpscount += 1
$fpstimer.wait_frame do $fpstimer.wait_frame do
$screen.put(@background,0,0) $screen.put(@background,0,0)
@fps.contents.fill_rect(0,0,@fps.contents.w,@fps.contents.h,0x00000000)
@font.draw_solid_utf8(@fps.contents, "%.1f" % $fpstimer.real_fps, 0, 0, 0xFF, 0xFF, 0xFF)
@windows.each do |window| @windows.each do |window|
if window.angle.zero? if window.angle.zero?
Surface.blit(window.contents, *window.viewport, $screen, window.x, window.y) if window.contents && window.visible Surface.blit(window.contents, *window.viewport, $screen, window.x, window.y) if window.contents && window.visible
......
...@@ -14,6 +14,7 @@ class Scene_Deck < Scene ...@@ -14,6 +14,7 @@ class Scene_Deck < Scene
@deck_window.contents.draw_text(0, index*24, card.name) @deck_window.contents.draw_text(0, index*24, card.name)
end end
super
end end
def loaddeck(file='/media/本地磁盘/zh99998/yu-gi-oh/token.txt') def loaddeck(file='/media/本地磁盘/zh99998/yu-gi-oh/token.txt')
src = IO.read(file) src = IO.read(file)
......
...@@ -54,6 +54,7 @@ class Scene_Duel < Scene ...@@ -54,6 +54,7 @@ class Scene_Duel < Scene
@cardinfo_window = Window_CardInfo.new(715, 0) @cardinfo_window = Window_CardInfo.new(715, 0)
@action_window = Window_Action.new @action_window = Window_Action.new
@chat_window = Window_RoomChat.new(@cardinfo_window.x, @cardinfo_window.height, 1024-@cardinfo_window.x, 768-@cardinfo_window.height) @chat_window = Window_RoomChat.new(@cardinfo_window.x, @cardinfo_window.height, 1024-@cardinfo_window.x, 768-@cardinfo_window.height)
super
end end
def change_phase(phase) def change_phase(phase)
......
...@@ -19,13 +19,14 @@ class Scene_Hall < Scene ...@@ -19,13 +19,14 @@ class Scene_Hall < Scene
@active_window = @roomlist @active_window = @roomlist
@chat = Window_Chat.new(321,551,682,168) @chat = Window_Chat.new(321,551,682,168)
$screen.update_rect(0,0,0,0)
bgm = Mixer::Music.load("audio/bgm/hall.ogg") bgm = Mixer::Music.load("audio/bgm/hall.ogg")
Mixer.fade_in_music(bgm, 800, -1) Mixer.fade_in_music(bgm, 800, -1)
@bgm.destroy if @bgm @bgm.destroy if @bgm
@bgm = bgm @bgm = bgm
@count = 0 @count = 0
super
end end
def handle(event) def handle(event)
case event case event
when Event::MouseMotion when Event::MouseMotion
...@@ -94,6 +95,7 @@ class Scene_Hall < Scene ...@@ -94,6 +95,7 @@ class Scene_Hall < Scene
super super
end end
end end
def handle_iduel(event) def handle_iduel(event)
case event case event
when Iduel::Event::OLIF when Iduel::Event::OLIF
...@@ -113,6 +115,7 @@ class Scene_Hall < Scene ...@@ -113,6 +115,7 @@ class Scene_Hall < Scene
p event p event
end end
end end
def update def update
super super
while event = Iduel::Event.poll while event = Iduel::Event.poll
...@@ -136,5 +139,4 @@ class Scene_Hall < Scene ...@@ -136,5 +139,4 @@ class Scene_Hall < Scene
end end
end end
end end
end end
\ No newline at end of file
...@@ -21,7 +21,7 @@ class Scene_Title < Scene ...@@ -21,7 +21,7 @@ class Scene_Title < Scene
@bgm = Mixer::Music.load 'audio/bgm/title.ogg' @bgm = Mixer::Music.load 'audio/bgm/title.ogg'
@decision_se = Mixer::Wave.load("audio/se/decision.ogg") @decision_se = Mixer::Wave.load("audio/se/decision.ogg")
Mixer.fade_in_music @bgm, -1, 800 Mixer.fade_in_music @bgm, -1, 800
super
end end
def clear(x,y,width,height) def clear(x,y,width,height)
......
...@@ -14,6 +14,8 @@ class Window ...@@ -14,6 +14,8 @@ class Window
rmask = 0x00ff0000 rmask = 0x00ff0000
gmask = 0x0000ff00 gmask = 0x0000ff00
bmask = 0x000000ff bmask = 0x000000ff
unless @background unless @background
@background = Surface.new(SWSURFACE, @width, @height, 32, rmask, gmask, bmask, amask) @background = Surface.new(SWSURFACE, @width, @height, 32, rmask, gmask, bmask, amask)
@background.fill_rect(0,0,@width,@height,0x66000000) @background.fill_rect(0,0,@width,@height,0x66000000)
......
javac.classpath=
main.file=main.rb
platform.active=Ruby
source.encoding=UTF-8
spec.src.dir=spec
src.dir=lib
test.src.dir=test
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.ruby.rubyproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/ruby-project/1">
<name>iduel</name>
<source-roots>
<root id="src.dir"/>
</source-roots>
<test-roots>
<root id="test.src.dir"/>
<root id="spec.src.dir"/>
</test-roots>
</data>
</configuration>
</project>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment