Commit 0501e429 authored by nanahira's avatar nanahira

add pscale image

parent 505e3772
......@@ -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) {
......
......@@ -309,6 +309,8 @@ 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);
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);
......@@ -1095,6 +1097,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);
......@@ -1178,6 +1181,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);
......@@ -1279,6 +1284,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);
......@@ -1362,6 +1369,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) {
......
......@@ -269,6 +269,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;
......
......@@ -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;
......
......@@ -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