Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
mycard
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
syntax_j
mycard
Commits
5a2f4348
Commit
5a2f4348
authored
Dec 31, 2011
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
把所有的background和contents都做了display_format,速度提高不少
parent
1f985569
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
37 additions
and
27 deletions
+37
-27
error-程序出错请到论坛反馈.txt
error-程序出错请到论坛反馈.txt
+10
-0
lib/iduel/user.rb
lib/iduel/user.rb
+1
-1
lib/scene_config.rb
lib/scene_config.rb
+1
-1
lib/scene_duel.rb
lib/scene_duel.rb
+1
-1
lib/scene_hall.rb
lib/scene_hall.rb
+1
-1
lib/scene_login.rb
lib/scene_login.rb
+1
-1
lib/scene_title.rb
lib/scene_title.rb
+1
-1
lib/widget_msgbox.rb
lib/widget_msgbox.rb
+2
-2
lib/window_action.rb
lib/window_action.rb
+3
-3
lib/window_config.rb
lib/window_config.rb
+4
-4
lib/window_field.rb
lib/window_field.rb
+2
-2
lib/window_fieldback.rb
lib/window_fieldback.rb
+1
-1
lib/window_phases.rb
lib/window_phases.rb
+2
-2
lib/window_roomlist.rb
lib/window_roomlist.rb
+1
-1
lib/window_title.rb
lib/window_title.rb
+1
-1
lib/window_user.rb
lib/window_user.rb
+3
-3
lib/window_userinfo.rb
lib/window_userinfo.rb
+2
-2
No files found.
error-程序出错请到论坛反馈.txt
0 → 100644
View file @
5a2f4348
#<SyntaxError: E:/zh99998/Documents/NetBeansProjects/mycard/lib/window.rb:82: syntax error, unexpected keyword_end, expecting $end>
E:/zh99998/Documents/NetBeansProjects/mycard/lib/window_list.rb:7:in `require_relative'
E:/zh99998/Documents/NetBeansProjects/mycard/lib/window_list.rb:7:in `<top (required)>'
E:/zh99998/Documents/NetBeansProjects/mycard/lib/window_title.rb:1:in `require_relative'
E:/zh99998/Documents/NetBeansProjects/mycard/lib/window_title.rb:1:in `<top (required)>'
E:/zh99998/Documents/NetBeansProjects/mycard/lib/scene_title.rb:8:in `require_relative'
E:/zh99998/Documents/NetBeansProjects/mycard/lib/scene_title.rb:8:in `<top (required)>'
E:/zh99998/Documents/NetBeansProjects/mycard/lib/main.rb:29:in `require_relative'
E:/zh99998/Documents/NetBeansProjects/mycard/lib/main.rb:29:in `<main>'
\ No newline at end of file
lib/iduel/user.rb
View file @
5a2f4348
...
@@ -26,7 +26,7 @@ class User
...
@@ -26,7 +26,7 @@ class User
yield
result
yield
result
Thread
.
new
do
Thread
.
new
do
open
(
"http://www.duelcn.com/uc_server/avatar.php?uid=
#{
id
-
100000
}
&size=
#{
size
}
"
,
'rb'
)
{
|
io
|
open
(
cache
,
'wb'
)
{
|
c
|
c
.
write
io
.
read
}}
rescue
cache
=
"graphics/avatars/noavatar_
#{
size
}
.gif"
open
(
"http://www.duelcn.com/uc_server/avatar.php?uid=
#{
id
-
100000
}
&size=
#{
size
}
"
,
'rb'
)
{
|
io
|
open
(
cache
,
'wb'
)
{
|
c
|
c
.
write
io
.
read
}}
rescue
cache
=
"graphics/avatars/noavatar_
#{
size
}
.gif"
yield
Surface
.
load
cache
yield
Surface
.
load
(
cache
)
end
end
else
else
result
result
...
...
lib/scene_config.rb
View file @
5a2f4348
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
class
Scene_Config
<
Scene
class
Scene_Config
<
Scene
require_relative
'window_config'
require_relative
'window_config'
def
start
def
start
@background
=
Surface
.
load
"graphics/config/background.png"
@background
=
Surface
.
load
(
"graphics/config/background.png"
).
display_format
@config_window
=
Window_Config
.
new
(
0
,
0
)
@config_window
=
Window_Config
.
new
(
0
,
0
)
end
end
def
handle
(
event
)
def
handle
(
event
)
...
...
lib/scene_duel.rb
View file @
5a2f4348
...
@@ -30,7 +30,7 @@ class Scene_Duel < Scene
...
@@ -30,7 +30,7 @@ class Scene_Duel < Scene
def
start
def
start
@bgm
=
Mixer
::
Music
.
load
"audio/bgm/title.ogg"
@bgm
=
Mixer
::
Music
.
load
"audio/bgm/title.ogg"
Mixer
.
fade_in_music
(
@bgm
,
-
1
,
800
)
Mixer
.
fade_in_music
(
@bgm
,
-
1
,
800
)
@background
=
Surface
.
load
"graphics/field/main.png"
@background
=
Surface
.
load
(
"graphics/field/main.png"
).
display_format
Surface
.
blit
(
@background
,
0
,
0
,
0
,
0
,
$screen
,
0
,
0
)
Surface
.
blit
(
@background
,
0
,
0
,
0
,
0
,
$screen
,
0
,
0
)
init_game
init_game
...
...
lib/scene_hall.rb
View file @
5a2f4348
...
@@ -12,7 +12,7 @@ class Scene_Hall < Scene
...
@@ -12,7 +12,7 @@ class Scene_Hall < Scene
require_relative
'window_chat'
require_relative
'window_chat'
def
start
def
start
$game
.
refresh
$game
.
refresh
@background
=
Surface
.
load
"graphics/hall/background.png"
@background
=
Surface
.
load
(
"graphics/hall/background.png"
).
display_format
Surface
.
blit
(
@background
,
0
,
0
,
0
,
0
,
$screen
,
0
,
0
)
Surface
.
blit
(
@background
,
0
,
0
,
0
,
0
,
$screen
,
0
,
0
)
@userlist
=
Window_UserList
.
new
(
24
,
204
,
$game
.
users
)
@userlist
=
Window_UserList
.
new
(
24
,
204
,
$game
.
users
)
@roomlist
=
Window_RoomList
.
new
(
320
,
50
,
$game
.
rooms
)
@roomlist
=
Window_RoomList
.
new
(
320
,
50
,
$game
.
rooms
)
...
...
lib/scene_login.rb
View file @
5a2f4348
...
@@ -10,7 +10,7 @@ require_relative 'scene_replay'
...
@@ -10,7 +10,7 @@ require_relative 'scene_replay'
class
Scene_Login
<
Scene
class
Scene_Login
<
Scene
Vocab_Logging
=
"Logging"
Vocab_Logging
=
"Logging"
def
start
def
start
@background
=
Surface
.
load
(
"graphics/login/background.png"
)
@background
=
Surface
.
load
(
"graphics/login/background.png"
)
.
display_format
@gameselect_window
=
Window_GameSelect
.
new
(
117
,
269
,
$config
[
"game"
])
@gameselect_window
=
Window_GameSelect
.
new
(
117
,
269
,
$config
[
"game"
])
end
end
#def handle(event)
#def handle(event)
...
...
lib/scene_title.rb
View file @
5a2f4348
...
@@ -10,7 +10,7 @@ class Scene_Title < Scene
...
@@ -10,7 +10,7 @@ class Scene_Title < Scene
def
start
def
start
title
=
Dir
.
glob
(
"graphics/titles/title_*.*"
)
title
=
Dir
.
glob
(
"graphics/titles/title_*.*"
)
title
=
title
[
rand
(
title
.
size
)]
title
=
title
[
rand
(
title
.
size
)]
@background
=
Surface
.
load
(
title
)
@background
=
Surface
.
load
(
title
)
.
display_format
Surface
.
blit
(
@background
,
0
,
0
,
0
,
0
,
$screen
,
0
,
0
)
Surface
.
blit
(
@background
,
0
,
0
,
0
,
0
,
$screen
,
0
,
0
)
@command_window
=
Window_Title
.
new
(
title
[
"left"
]
?
200
:
title
[
"right"
]
?
600
:
400
,
300
)
@command_window
=
Window_Title
.
new
(
title
[
"left"
]
?
200
:
title
[
"right"
]
?
600
:
400
,
300
)
#logo = Surface.load("graphics/system/logo.png")
#logo = Surface.load("graphics/system/logo.png")
...
...
lib/widget_msgbox.rb
View file @
5a2f4348
...
@@ -15,8 +15,8 @@ class Widget_Msgbox < Window
...
@@ -15,8 +15,8 @@ class Widget_Msgbox < Window
end
end
def
initialize
(
title
,
message
,
buttons
=
{},
&
proc
)
def
initialize
(
title
,
message
,
buttons
=
{},
&
proc
)
#@background = Surface.load 'graphics/system/msgbox.png'
#@background = Surface.load 'graphics/system/msgbox.png'
@contents
=
Surface
.
load
'graphics/system/msgbox.png'
@contents
=
Surface
.
load
(
'graphics/system/msgbox.png'
).
display_format
@button
=
Surface
.
load
'graphics/system/button.png'
@button
=
Surface
.
load
(
'graphics/system/button.png'
)
@font
=
TTF
.
open
(
"fonts/WenQuanYi Micro Hei.ttf"
,
16
)
@font
=
TTF
.
open
(
"fonts/WenQuanYi Micro Hei.ttf"
,
16
)
super
((
1024
-
@contents
.
w
)
/
2
,
230
,
@contents
.
w
,
@contents
.
h
)
super
((
1024
-
@contents
.
w
)
/
2
,
230
,
@contents
.
w
,
@contents
.
h
)
set
(
title
,
message
,
buttons
,
&
proc
)
set
(
title
,
message
,
buttons
,
&
proc
)
...
...
lib/window_action.rb
View file @
5a2f4348
...
@@ -6,9 +6,9 @@ class Window_Action < Window_List
...
@@ -6,9 +6,9 @@ class Window_Action < Window_List
def
initialize
#,list,list_available=Array.new(list.size, true))
def
initialize
#,list,list_available=Array.new(list.size, true))
super
(
0
,
0
,
123
,
20
*
WLH
,
300
)
super
(
0
,
0
,
123
,
20
*
WLH
,
300
)
#@skin = Surface.load 'graphics/field/action.png'
#@skin = Surface.load 'graphics/field/action.png'
@up
=
Surface
.
load
'graphics/field/action_up.png'
@up
=
Surface
.
load
(
'graphics/field/action_up.png'
)
@down
=
Surface
.
load
'graphics/field/action_down.png'
@down
=
Surface
.
load
(
'graphics/field/action_down.png'
)
@middle
=
Surface
.
load
'graphics/field/action.png'
@middle
=
Surface
.
load
(
'graphics/field/action.png'
)
@up
.
set_alpha
(
RLEACCEL
,
255
)
@up
.
set_alpha
(
RLEACCEL
,
255
)
@middle
.
set_alpha
(
RLEACCEL
,
255
)
@middle
.
set_alpha
(
RLEACCEL
,
255
)
@down
.
set_alpha
(
RLEACCEL
,
255
)
@down
.
set_alpha
(
RLEACCEL
,
255
)
...
...
lib/window_config.rb
View file @
5a2f4348
...
@@ -3,10 +3,10 @@ class Window_Config < Window
...
@@ -3,10 +3,10 @@ class Window_Config < Window
def
initialize
(
x
,
y
)
def
initialize
(
x
,
y
)
super
(
x
,
y
,
$screen
.
w
,
$screen
.
h
)
super
(
x
,
y
,
$screen
.
w
,
$screen
.
h
)
@checkbox
=
Surface
.
load
'graphics/system/checkbox.png'
@checkbox
=
Surface
.
load
(
'graphics/system/checkbox.png'
)
@button
=
Surface
.
load
'graphics/system/button.png'
@button
=
Surface
.
load
(
'graphics/system/button.png'
)
@background
=
Surface
.
load
'graphics/config/background.png'
@background
=
Surface
.
load
(
'graphics/config/background.png'
).
display_format
@contents
=
Surface
.
load
'graphics/config/background.png'
@contents
=
Surface
.
load
(
'graphics/config/background.png'
).
display_format
@font
=
TTF
.
open
(
'fonts/WenQuanYi Micro Hei.ttf'
,
20
)
@font
=
TTF
.
open
(
'fonts/WenQuanYi Micro Hei.ttf'
,
20
)
@index
=
nil
@index
=
nil
...
...
lib/window_field.rb
View file @
5a2f4348
...
@@ -21,8 +21,8 @@ class Window_Field < Window
...
@@ -21,8 +21,8 @@ class Window_Field < Window
Card_Size
=
[
54
,
81
]
Card_Size
=
[
54
,
81
]
attr_accessor
:action_window
attr_accessor
:action_window
def
initialize
(
x
,
y
,
field
,
player
=
true
)
def
initialize
(
x
,
y
,
field
,
player
=
true
)
@border
=
Surface
.
load
'graphics/field/border.png'
@border
=
Surface
.
load
(
'graphics/field/border.png'
)
@border_horizontal
=
Surface
.
load
'graphics/field/border_horizontal.png'
#@border.transform_surface(0x66000000,90,1,1,Surface::TRANSFORM_SAFE|Surface::TRANSFORM_AA)#FUCK!
@border_horizontal
=
Surface
.
load
(
'graphics/field/border_horizontal.png'
)
#@border.transform_surface(0x66000000,90,1,1,Surface::TRANSFORM_SAFE|Surface::TRANSFORM_AA)#FUCK!
super
(
x
,
y
,
711
,
282
)
super
(
x
,
y
,
711
,
282
)
@field
=
field
@field
=
field
@player
=
player
@player
=
player
...
...
lib/window_fieldback.rb
View file @
5a2f4348
...
@@ -9,7 +9,7 @@ class Window_FieldBack < Window
...
@@ -9,7 +9,7 @@ class Window_FieldBack < Window
return
if
@card
==
card
return
if
@card
==
card
@card
=
card
@card
=
card
if
card
and
File
.
file?
file
=
"graphics/fields/
#{
card
.
name
}
.gif"
if
card
and
File
.
file?
file
=
"graphics/fields/
#{
card
.
name
}
.gif"
@contents
=
Surface
.
load
file
@contents
=
Surface
.
load
(
file
).
display_format
self
.
visible
=
true
self
.
visible
=
true
else
else
self
.
visible
=
false
self
.
visible
=
false
...
...
lib/window_phases.rb
View file @
5a2f4348
...
@@ -2,9 +2,9 @@ class Window_Phases < Window_List
...
@@ -2,9 +2,9 @@ class Window_Phases < Window_List
WLH
=
81
#其实是列宽
WLH
=
81
#其实是列宽
Phases
=
[
:DP
,
:SP
,
:M1
,
:BP
,
:M2
,
:EP
]
Phases
=
[
:DP
,
:SP
,
:M1
,
:BP
,
:M2
,
:EP
]
def
initialize
(
x
,
y
)
def
initialize
(
x
,
y
)
@phases_player
=
Surface
.
load
'graphics/system/phases_player.png'
@phases_player
=
Surface
.
load
(
'graphics/system/phases_player.png'
)
@phases_player
.
set_alpha
(
RLEACCEL
,
255
)
@phases_player
.
set_alpha
(
RLEACCEL
,
255
)
@phases_opponent
=
Surface
.
load
'graphics/system/phases_opponent.png'
@phases_opponent
=
Surface
.
load
(
'graphics/system/phases_opponent.png'
)
@phases_opponent
.
set_alpha
(
RLEACCEL
,
255
)
@phases_opponent
.
set_alpha
(
RLEACCEL
,
255
)
super
(
x
,
y
,
5
*
WLH
+
@phases_player
.
w
/
3
,
@phases_player
.
h
/
6
)
super
(
x
,
y
,
5
*
WLH
+
@phases_player
.
w
/
3
,
@phases_player
.
h
/
6
)
@column_max
=
@item_max
=
6
@column_max
=
@item_max
=
6
...
...
lib/window_roomlist.rb
View file @
5a2f4348
...
@@ -9,7 +9,7 @@ class Window_RoomList < Window_List
...
@@ -9,7 +9,7 @@ class Window_RoomList < Window_List
attr_reader
:list
attr_reader
:list
WLH
=
48
WLH
=
48
def
initialize
(
x
,
y
,
list
)
def
initialize
(
x
,
y
,
list
)
@button
=
Surface
.
load
'graphics/hall/room.png'
@button
=
Surface
.
load
(
'graphics/hall/room.png'
)
@button
.
set_alpha
(
RLEACCEL
,
255
)
@button
.
set_alpha
(
RLEACCEL
,
255
)
#@background = Surface.load 'graphics/hall/roomlist.png'
#@background = Surface.load 'graphics/hall/roomlist.png'
#@contents = Surface.load 'graphics/hall/roomlist.png'
#@contents = Surface.load 'graphics/hall/roomlist.png'
...
...
lib/window_title.rb
View file @
5a2f4348
...
@@ -4,7 +4,7 @@ class Window_Title < Window_List
...
@@ -4,7 +4,7 @@ class Window_Title < Window_List
WLH
=
50
WLH
=
50
attr_reader
:x
,
:y
,
:width
,
:height
,
:single_height
,
:index
attr_reader
:x
,
:y
,
:width
,
:height
,
:single_height
,
:index
def
initialize
(
x
,
y
)
def
initialize
(
x
,
y
)
@button
=
Surface
.
load
"graphics/system/titlebuttons.png"
@button
=
Surface
.
load
(
"graphics/system/titlebuttons.png"
)
@button
.
set_alpha
(
RLEACCEL
,
255
)
@button
.
set_alpha
(
RLEACCEL
,
255
)
@single_height
=
@button
.
h
/
Button_Count
@single_height
=
@button
.
h
/
Button_Count
super
(
x
,
y
,
@button
.
w
/
3
,
WLH
*
Button_Count
-
(
WLH
-
@button
.
h
/
Button_Count
))
super
(
x
,
y
,
@button
.
w
/
3
,
WLH
*
Button_Count
-
(
WLH
-
@button
.
h
/
Button_Count
))
...
...
lib/window_user.rb
View file @
5a2f4348
...
@@ -2,13 +2,13 @@
...
@@ -2,13 +2,13 @@
class
Window_User
<
Window_List
class
Window_User
<
Window_List
WLH
=
20
WLH
=
20
def
initialize
(
x
,
y
,
user
)
def
initialize
(
x
,
y
,
user
)
@background
=
Surface
.
load
"graphics/hall/user.png"
@background
=
Surface
.
load
(
"graphics/hall/user.png"
).
display_format
super
(
x
,
y
,
@background
.
w
,
@background
.
h
,
300
)
super
(
x
,
y
,
@background
.
w
,
@background
.
h
,
300
)
@font
=
TTF
.
open
(
'fonts/WenQuanYi Micro Hei.ttf'
,
16
)
@font
=
TTF
.
open
(
'fonts/WenQuanYi Micro Hei.ttf'
,
16
)
@user
=
user
@user
=
user
@contents
=
Surface
.
load
"graphics/hall/user.png"
#TODO:调用已经加载了的背景
@contents
=
Surface
.
load
(
"graphics/hall/user.png"
).
display_format
#TODO:调用已经加载了的背景
@avatar_boarder
=
Surface
.
load
"graphics/hall/avatar_boader.png"
@avatar_boarder
=
Surface
.
load
(
"graphics/hall/avatar_boader.png"
)
@list
=
[
"发送消息"
,
"查看资料"
]
@list
=
[
"发送消息"
,
"查看资料"
]
@list
<<
"加入游戏"
if
user
.
status
==
:waiting
@list
<<
"加入游戏"
if
user
.
status
==
:waiting
@list
<<
"观战"
if
user
.
status
==
:dueling
@list
<<
"观战"
if
user
.
status
==
:dueling
...
...
lib/window_userinfo.rb
View file @
5a2f4348
...
@@ -7,11 +7,11 @@
...
@@ -7,11 +7,11 @@
class
Window_UserInfo
<
Window
class
Window_UserInfo
<
Window
def
initialize
(
x
,
y
,
user
)
def
initialize
(
x
,
y
,
user
)
@avatar_boarder
=
Surface
.
load
"graphics/hall/avatar_boader.png"
@avatar_boarder
=
Surface
.
load
(
"graphics/hall/avatar_boader.png"
)
super
(
x
,
y
,
240
,
144
)
super
(
x
,
y
,
240
,
144
)
@font
=
TTF
.
open
(
'fonts/WenQuanYi Micro Hei.ttf'
,
16
)
@font
=
TTF
.
open
(
'fonts/WenQuanYi Micro Hei.ttf'
,
16
)
@user
=
user
@user
=
user
@background
=
Surface
.
load
"graphics/hall/userinfo.png"
@background
=
Surface
.
load
(
"graphics/hall/userinfo.png"
).
display_format
refresh
refresh
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment