Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
3461b601
Commit
3461b601
authored
Oct 26, 2009
by
Max-Wilhelm Bruker
Browse files
nicer description file
parent
ad47988d
Changes
3
Hide whitespace changes
Inline
Side-by-side
common/protocol_commands.cpp
View file @
3461b601
...
@@ -125,7 +125,7 @@ Command_MoveCard::Command_MoveCard(int _gameId, const QString &_startZone, int _
...
@@ -125,7 +125,7 @@ Command_MoveCard::Command_MoveCard(int _gameId, const QString &_startZone, int _
setParameter
(
"target_zone"
,
targetZone
);
setParameter
(
"target_zone"
,
targetZone
);
setParameter
(
"x"
,
x
);
setParameter
(
"x"
,
x
);
setParameter
(
"y"
,
y
);
setParameter
(
"y"
,
y
);
setParameter
(
"face
D
own"
,
faceDown
);
setParameter
(
"face
_d
own"
,
faceDown
);
}
}
void
Command_MoveCard
::
extractParameters
()
void
Command_MoveCard
::
extractParameters
()
{
{
...
@@ -135,7 +135,7 @@ void Command_MoveCard::extractParameters()
...
@@ -135,7 +135,7 @@ void Command_MoveCard::extractParameters()
targetZone
=
parameters
[
"target_zone"
];
targetZone
=
parameters
[
"target_zone"
];
x
=
parameters
[
"x"
].
toInt
();
x
=
parameters
[
"x"
].
toInt
();
y
=
parameters
[
"y"
].
toInt
();
y
=
parameters
[
"y"
].
toInt
();
faceDown
=
(
parameters
[
"face
D
own"
]
==
"1"
);
faceDown
=
(
parameters
[
"face
_d
own"
]
==
"1"
);
}
}
Command_CreateToken
::
Command_CreateToken
(
int
_gameId
,
const
QString
&
_zone
,
const
QString
&
_name
,
const
QString
&
_pt
,
int
_x
,
int
_y
)
Command_CreateToken
::
Command_CreateToken
(
int
_gameId
,
const
QString
&
_zone
,
const
QString
&
_name
,
const
QString
&
_pt
,
int
_x
,
int
_y
)
:
GameCommand
(
"create_token"
,
_gameId
),
zone
(
_zone
),
name
(
_name
),
pt
(
_pt
),
x
(
_x
),
y
(
_y
)
:
GameCommand
(
"create_token"
,
_gameId
),
zone
(
_zone
),
name
(
_name
),
pt
(
_pt
),
x
(
_x
),
y
(
_y
)
...
...
common/protocol_commands.dat
View file @
3461b601
0:ping:Ping
0:ping
0:login:Login:s,username:s,password
0:login:s,username:s,password
0:chat_list_channels:ChatListChannels
0:chat_list_channels
0:chat_join_channel:ChatJoinChannel:s,channel
0:chat_join_channel:s,channel
1:chat_leave_channel:ChatLeaveChannel
1:chat_leave_channel
1:chat_say:ChatSay:s,message
1:chat_say:s,message
0:list_games:ListGames
0:list_games
0:create_game:CreateGame:s,description:s,password:i,max_players:b,spectators_allowed
0:create_game:s,description:s,password:i,max_players:b,spectators_allowed
0:join_game:JoinGame:i,game_id:s,password:b,spectator
0:join_game:i,game_id:s,password:b,spectator
2:leave_game:LeaveGame
2:leave_game
2:say:Say:s,message
2:say:s,message
2:shuffle:Shuffle
2:shuffle
2:roll_die:RollDie:i,sides
2:roll_die:i,sides
2:draw_cards:DrawCards:i,number
2:draw_cards:i,number
2:move_card:MoveCard:s,start_zone:i,card_id:s,target_zone:i,x:i,y:b,faceDown
2:move_card:s,start_zone:i,card_id:s,target_zone:i,x:i,y:b,face_down
2:create_token:CreateToken:s,zone:s,name:s,pt:i,x:i,y
2:create_token:s,zone:s,name:s,pt:i,x:i,y
2:create_arrow:CreateArrow:i,start_player_id:s,start_zone:i,start_card_id:i,target_player_id:s,target_player_zone:i,target_card_id:i,color
2:create_arrow:i,start_player_id:s,start_zone:i,start_card_id:i,target_player_id:s,target_player_zone:i,target_card_id:i,color
2:delete_arrow:DeleteArrow:i,arrow_id
2:delete_arrow:i,arrow_id
2:set_card_attr:SetCardAttr:s,zone:i,card_id:s,attr_name:s,attr_value
2:set_card_attr:s,zone:i,card_id:s,attr_name:s,attr_value
2:ready_start:ReadyStart
2:ready_start
2:inc_counter:IncCounter:i,counter_id:i,delta
2:inc_counter:i,counter_id:i,delta
2:add_counter:AddCounter:s,counter_name:i,color:i,radius:i,value
2:add_counter:s,counter_name:i,color:i,radius:i,value
2:set_counter:SetCounter:i,counter_id:i,value
2:set_counter:i,counter_id:i,value
2:del_counter:DelCounter:i,counter_id
2:del_counter:i,counter_id
2:next_turn:NextTurn
2:next_turn
2:set_active_phase:SetActivePhase:i,phase
2:set_active_phase:i,phase
2:dump_zone:DumpZone:i,player_id:s,zone_name:i,number_cards
2:dump_zone:i,player_id:s,zone_name:i,number_cards
2:stop_dump_zone:StopDumpZone:i,player_id:s,zone_name
2:stop_dump_zone:i,player_id:s,zone_name
2:dump_all:DumpAll
2:dump_all
2:submit_deck:SubmitDeck
2:submit_deck
\ No newline at end of file
\ No newline at end of file
common/protocol_mc.pl
View file @
3461b601
...
@@ -17,6 +17,8 @@ while (<file>) {
...
@@ -17,6 +17,8 @@ while (<file>) {
@line
=
split
(
/:/
);
@line
=
split
(
/:/
);
$type
=
shift
(
@line
);
$type
=
shift
(
@line
);
$name1
=
shift
(
@line
);
$name1
=
shift
(
@line
);
(
$name2
=
$name1
)
=~
s/_(.)/\U$1\E/g
;
$name2
=~
s/^(.)/\U$1\E/
;
if
(
$type
==
0
)
{
if
(
$type
==
0
)
{
$baseClass
=
'
Command
';
$baseClass
=
'
Command
';
$parentConstructorCall
=
"
$baseClass
(
\"
$name1
\"
)
";
$parentConstructorCall
=
"
$baseClass
(
\"
$name1
\"
)
";
...
@@ -34,7 +36,7 @@ while (<file>) {
...
@@ -34,7 +36,7 @@ while (<file>) {
$constructorParamsCpp
=
"
int _gameId
";
$constructorParamsCpp
=
"
int _gameId
";
}
}
$className
=
'
Command_
'
.
shift
(
@line
)
;
$className
=
'
Command_
'
.
$name2
;
print
headerfile
"
class
$className
: public
$baseClass
{
\n
"
print
headerfile
"
class
$className
: public
$baseClass
{
\n
"
.
"
\t
Q_OBJECT
\n
"
.
"
\t
Q_OBJECT
\n
"
.
"
private:
\n
";
.
"
private:
\n
";
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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