Commit 4f53e33e authored by nanahira's avatar nanahira

Merge branch 'server' into 2pick

parents a2efc2e7 da3b93d2
......@@ -395,6 +395,22 @@ void Game::DrawCard(ClientCard* pcard) {
driver->setTransform(irr::video::ETS_WORLD, atk);
driver->drawVertexPrimitiveList(matManager.vSymbol, 4, matManager.iRectangle, 2);
}
if(mainGame->chkEnablePScale->isChecked() && (pcard->type & TYPE_PENDULUM) && ((pcard->location & LOCATION_SZONE) && (pcard->sequence == 0 || pcard->sequence == 6))) {
int scale = pcard->lscale;
if(scale >= 0 && scale <= 13 && imageManager.tLScale[scale]) {
matManager.mTexture.setTexture(0, imageManager.tLScale[scale]);
driver->setMaterial(matManager.mTexture);
driver->drawVertexPrimitiveList(matManager.vPScale, 4, matManager.iRectangle, 2);
}
}
if(mainGame->chkEnablePScale->isChecked() && (pcard->type & TYPE_PENDULUM) && ((pcard->location & LOCATION_SZONE) && (pcard->sequence == 4 || pcard->sequence == 7))) {
int scale2 = pcard->rscale;
if(scale2 >= 0 && scale2 <= 13 && imageManager.tRScale[scale2]) {
matManager.mTexture.setTexture(0, imageManager.tRScale[scale2]);
driver->setMaterial(matManager.mTexture);
driver->drawVertexPrimitiveList(matManager.vPScale, 4, matManager.iRectangle, 2);
}
}
}
void Game::DrawShadowText(CGUITTFont * font, const core::stringw & text, const core::rect<s32>& position, const core::rect<s32>& padding,
video::SColor color, video::SColor shadowcolor, bool hcenter, bool vcenter, const core::rect<s32>* clip) {
......
......@@ -371,6 +371,9 @@ bool Game::Initialize() {
posY += 30;
chkMusicMode = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabSystem, -1, dataManager.GetSysString(1281));
chkMusicMode->setChecked(gameConf.music_mode != 0);
posY += 30;
chkEnablePScale = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabSystem, -1, dataManager.GetSysString(1282));
chkEnablePScale->setChecked(gameConf.chkEnablePScale != 0);
//
wHand = env->addWindow(rect<s32>(500, 450, 825, 605), false, L"");
wHand->getCloseButton()->setVisible(false);
......@@ -1159,6 +1162,7 @@ void Game::LoadConfig() {
gameConf.window_width = 1024;
gameConf.window_height = 640;
gameConf.resize_popup_menu = false;
gameConf.chkEnablePScale = 1;
if(fp) {
while(fgets(linebuf, 256, fp)) {
sscanf(linebuf, "%s = %s", strbuf, valbuf);
......@@ -1242,6 +1246,8 @@ void Game::LoadConfig() {
gameConf.window_height = atoi(valbuf);
} else if(!strcmp(strbuf, "resize_popup_menu")) {
gameConf.resize_popup_menu = atoi(valbuf) > 0;
} else if(!strcmp(strbuf, "enable_pendulum_scale")) {
gameConf.chkEnablePScale = atoi(valbuf);
} else {
// options allowing multiple words
sscanf(linebuf, "%s = %240[^\n]", strbuf, valbuf);
......@@ -1343,6 +1349,8 @@ void Game::LoadConfig() {
gameConf.window_height = atoi(valbuf);
} else if(!strcmp(strbuf, "resize_popup_menu")) {
gameConf.resize_popup_menu = atoi(valbuf) > 0;
} else if(!strcmp(strbuf, "enable_pendulum_scale")) {
gameConf.chkEnablePScale = atoi(valbuf);
} else {
// options allowing multiple words
sscanf(linebuf, "%s = %240[^\n]", strbuf, valbuf);
......@@ -1426,6 +1434,7 @@ void Game::SaveConfig() {
fprintf(fp, "window_width = %d\n", gameConf.window_width);
fprintf(fp, "window_height = %d\n", gameConf.window_height);
fprintf(fp, "resize_popup_menu = %d\n", gameConf.resize_popup_menu ? 1 : 0);
fprintf(fp, "enable_pendulum_scale = %d\n", ((mainGame->chkEnablePScale->isChecked()) ? 1 : 0));
fclose(fp);
}
void Game::ShowCardInfo(int code, bool resize) {
......
......@@ -56,6 +56,7 @@ struct Config {
double sound_volume;
double music_volume;
int music_mode;
int chkEnablePScale;
};
struct DuelInfo {
......@@ -281,6 +282,7 @@ public:
irr::gui::IGUIScrollBar* scrSoundVolume;
irr::gui::IGUIScrollBar* scrMusicVolume;
irr::gui::IGUICheckBox* chkMusicMode;
irr::gui::IGUICheckBox* chkEnablePScale;
//main menu
irr::gui::IGUIWindow* wMainMenu;
irr::gui::IGUIButton* btnLanMode;
......@@ -673,7 +675,6 @@ extern HostInfo game_info;
#define BUTTON_MARKS_FILTER 380
#define BUTTON_MARKERS_OK 381
#define TEXTURE_DUEL 0
#define TEXTURE_DECK 1
#define TEXTURE_MENU 2
......@@ -682,7 +683,5 @@ extern HostInfo game_info;
#define TEXTURE_ATTACK 5
#define TEXTURE_ACTIVATE 6
#define DEFAULT_DUEL_RULE 4
#endif // GAME_H
......@@ -65,6 +65,15 @@ bool ImageManager::Initial() {
tFieldTransparent[0] = driver->getTexture("textures/field-transparent2.png");
tField[1] = driver->getTexture("textures/field3.png");
tFieldTransparent[1] = driver->getTexture("textures/field-transparent3.png");
char buff[100];
for (int i = 0; i < 14; i++) {
snprintf(buff, 100, "textures/pscale/rscale_%d.png", i);
tRScale[i] = driver->getTexture(buff);
}
for (int i = 0; i < 14; i++) {
snprintf(buff, 100, "textures/pscale/lscale_%d.png", i);
tLScale[i] = driver->getTexture(buff);
}
return true;
}
irr::video::ITexture* ImageManager::GetRandomImage(int image_type) {
......
......@@ -49,6 +49,8 @@ public:
irr::video::ITexture* tBackGround_deck;
irr::video::ITexture* tField[2];
irr::video::ITexture* tFieldTransparent[2];
irr::video::ITexture* tRScale[14];
irr::video::ITexture* tLScale[14];
};
extern ImageManager imageManager;
......
......@@ -21,6 +21,7 @@ Materials::Materials() {
SetS3DVertex(vChainNum, -0.35f, -0.35f, 0.35f, 0.35f, 0, 1, 0, 0, 0.19375f, 0.2421875f);
SetS3DVertex(vActivate, -0.5f, -0.5f, 0.5f, 0.5f, 0, 1, 0, 0, 1, 1);
SetS3DVertex(vField, -1.0f, -4.0f, 9.0f, 4.0f, 0, 1, 0, 0, 1, 1);
SetS3DVertex(vPScale, -0.35f, -0.5, 0.35, 0.5f, 0, 1, 0, 0, 1, 1);
SetS3DVertex(vFieldSpell, 1.2f, -3.2f, 6.7f, 3.2f, 0, 1, 0, 0, 1, 1);
SetS3DVertex(vFieldSpell1, 1.2f, 0.8f, 6.7f, 3.2f, 0, 1, 0, 0.2f, 1, 0.63636f);
SetS3DVertex(vFieldSpell2, 1.2f, -3.2f, 6.7f, -0.8f, 0, 1, 1, 0.63636f, 0, 0.2f);
......
......@@ -11,6 +11,7 @@ public:
S3DVertex vCardOutline[4];
S3DVertex vCardOutliner[4];
S3DVertex vCardBack[4];
S3DVertex vPScale[4];
S3DVertex vSymbol[4];
S3DVertex vNegate[4];
S3DVertex vChainNum[4];
......
......@@ -305,6 +305,7 @@
!system 1279 开启音效
!system 1280 开启音乐
!system 1281 按场景切换音乐
!system 1282 数字灵摆图片
!system 1290 忽略对方发言
!system 1291 忽略观战者发言
!system 1292 忽略时点
......
......@@ -41,3 +41,4 @@ window_maximized = 0
window_width = 1024
window_height = 640
resize_popup_menu = 0
enable_pendulum_scale = 1
textures/unknown.jpg

9.83 KB | W: | H:

textures/unknown.jpg

65.2 KB | W: | H:

textures/unknown.jpg
textures/unknown.jpg
textures/unknown.jpg
textures/unknown.jpg
  • 2-up
  • Swipe
  • Onion skin
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