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

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

parent 8c2803a7
cd /d %~dp0
del graphics\avatars\*_*.png
del Thumbs.db /s /F /A:S
del fonts\*_STOP.*
del log.txt
\ No newline at end of file
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
ruby lib/main.rb > log.txt
\ No newline at end of file
echo ------------------ >> log.txt
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
def send(head, *args)
info = "##{head.to_s(16).upcase}|#{args.join(',')}".encode("GBK") + RS
puts "<< #{info}"
(@conn.write info) rescue Event.push Error.new(0)
(@conn.write info) rescue Event.push Event::Error.new(0)
end
def recv(info)
if info.nil?
Event.push Error.new(0)
Event.push begin
info.chomp!(RS)
info.encode! "UTF-8", :invalid => :replace, :undef => :replace
puts ">> #{info}"
Event.parse info
rescue
@conn.close
@conn = nil
Event::Error.new(0)
end
info.chomp!(RS)
info.encode! "UTF-8", :invalid => :replace, :undef => :replace
puts ">> #{info}"
Event.push Event.parse info
end
def close
$iduel.quit
......
......@@ -19,14 +19,13 @@ class Scene
end
def initialize
@windows = []
#@fps = Window.new(0,0,100,24)
#@font = TTF.open('fonts/WenQuanYi Micro Hei.ttf', 16)
#@fpscount = 0
end
#--------------------------------------------------------------------------
# ● 开始处理
#--------------------------------------------------------------------------
def start
@fps = Window.new(0,0,100,24,500)
@font = TTF.open('fonts/WenQuanYi Micro Hei.ttf', 16)
end
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)
......@@ -56,6 +55,8 @@ class Scene
#@fpscount += 1
$fpstimer.wait_frame do
$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|
if window.angle.zero?
Surface.blit(window.contents, *window.viewport, $screen, window.x, window.y) if window.contents && window.visible
......
......@@ -14,6 +14,7 @@ class Scene_Deck < Scene
@deck_window.contents.draw_text(0, index*24, card.name)
end
super
end
def loaddeck(file='/media/本地磁盘/zh99998/yu-gi-oh/token.txt')
src = IO.read(file)
......
......@@ -54,6 +54,7 @@ class Scene_Duel < Scene
@cardinfo_window = Window_CardInfo.new(715, 0)
@action_window = Window_Action.new
@chat_window = Window_RoomChat.new(@cardinfo_window.x, @cardinfo_window.height, 1024-@cardinfo_window.x, 768-@cardinfo_window.height)
super
end
def change_phase(phase)
......
......@@ -19,13 +19,14 @@ class Scene_Hall < Scene
@active_window = @roomlist
@chat = Window_Chat.new(321,551,682,168)
$screen.update_rect(0,0,0,0)
bgm = Mixer::Music.load("audio/bgm/hall.ogg")
Mixer.fade_in_music(bgm, 800, -1)
@bgm.destroy if @bgm
@bgm = bgm
@count = 0
super
end
def handle(event)
case event
when Event::MouseMotion
......@@ -94,6 +95,7 @@ class Scene_Hall < Scene
super
end
end
def handle_iduel(event)
case event
when Iduel::Event::OLIF
......@@ -113,6 +115,7 @@ class Scene_Hall < Scene
p event
end
end
def update
super
while event = Iduel::Event.poll
......@@ -124,7 +127,7 @@ class Scene_Hall < Scene
end
@count += 1
end
def determine
case @active_window
when @roomlist
......@@ -136,5 +139,4 @@ class Scene_Hall < Scene
end
end
end
end
\ No newline at end of file
......@@ -21,7 +21,7 @@ class Scene_Title < Scene
@bgm = Mixer::Music.load 'audio/bgm/title.ogg'
@decision_se = Mixer::Wave.load("audio/se/decision.ogg")
Mixer.fade_in_music @bgm, -1, 800
super
end
def clear(x,y,width,height)
......
......@@ -14,6 +14,8 @@ class Window
rmask = 0x00ff0000
gmask = 0x0000ff00
bmask = 0x000000ff
unless @background
@background = Surface.new(SWSURFACE, @width, @height, 32, rmask, gmask, bmask, amask)
@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