Commit 1a754caf authored by edo9300's avatar edo9300

Update

parent 05afcad7
This diff is collapsed.
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include "duelclient.h" #include "duelclient.h"
#include "netserver.h" #include "netserver.h"
#include "single_mode.h" #include "single_mode.h"
#include "../ocgcore/duel.h"
#include <sstream> #include <sstream>
#include "utils.h" #include "utils.h"
...@@ -1395,6 +1396,44 @@ int Game::LocalPlayer(int player) { ...@@ -1395,6 +1396,44 @@ int Game::LocalPlayer(int player) {
const wchar_t* Game::LocalName(int local_player) { const wchar_t* Game::LocalName(int local_player) {
return local_player == 0 ? dInfo.hostname : dInfo.clientname; return local_player == 0 ? dInfo.hostname : dInfo.clientname;
} }
int Game::GetMasterRule(uint32 param, int* truerule) {
switch(param) {
case MASTER_RULE_1: {
if (truerule)
*truerule = 1;
return 1;
break;
}
case MASTER_RULE_2: {
if (truerule)
*truerule = 2;
return 2;
break;
}
case MASTER_RULE_3: {
if (truerule)
*truerule = 3;
return 3;
break;
}
case MASTER_RULE_4: {
if (truerule)
*truerule = 4;
return 4;
break;
}
default: {
if (truerule)
*truerule = 5;
if(param & DUEL_EMZONE)
return 4;
else if (param & DUEL_PZONE)
return 3;
else
return 2;
}
}
}
void Game::OnResize() void Game::OnResize()
{ {
wMainMenu->setRelativePosition(ResizeWin(370, 200, 650, 415)); wMainMenu->setRelativePosition(ResizeWin(370, 200, 650, 415));
......
...@@ -126,6 +126,7 @@ public: ...@@ -126,6 +126,7 @@ public:
int LocalPlayer(int player); int LocalPlayer(int player);
const wchar_t* LocalName(int local_player); const wchar_t* LocalName(int local_player);
int GetMasterRule(uint32 param, int* truerule = 0);
bool HasFocus(EGUI_ELEMENT_TYPE type) const { bool HasFocus(EGUI_ELEMENT_TYPE type) const {
irr::gui::IGUIElement* focus = env->getFocus(); irr::gui::IGUIElement* focus = env->getFocus();
......
...@@ -15,27 +15,29 @@ struct HostInfo { ...@@ -15,27 +15,29 @@ struct HostInfo {
unsigned int lflist; unsigned int lflist;
unsigned char rule; unsigned char rule;
unsigned char mode; unsigned char mode;
unsigned int duel_flag; unsigned char duel_rule;
bool no_check_deck; bool no_check_deck;
bool no_shuffle_deck; bool no_shuffle_deck;
unsigned int start_lp; unsigned int start_lp;
unsigned char start_hand; unsigned char start_hand;
unsigned char draw_count; unsigned char draw_count;
unsigned short time_limit; unsigned short time_limit;
int destiny_draw; unsigned char check;
int sealed; unsigned int duel_flag;
int booster; bool destiny_draw;
int speed; bool sealed;
int concentration; bool booster;
int boss; bool speed;
int city; bool concentration;
int kingdom; bool boss;
int dimension; bool city;
int turbo1; bool kingdom;
int turbo2; bool dimension;
int doubled; bool turbo1;
int command; bool turbo2;
int master; bool doubled;
bool command;
bool master;
int rule_count; int rule_count;
}; };
struct HostPacket { struct HostPacket {
......
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