Commit 1a754caf authored by edo9300's avatar edo9300

Update

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