Commit 296c0d75 authored by Chen Bill's avatar Chen Bill

fix namespace irr::video

parent b2a50ac0
...@@ -76,7 +76,6 @@ inline FILE* mywfopen(const wchar_t* filename, const char* mode) { ...@@ -76,7 +76,6 @@ inline FILE* mywfopen(const wchar_t* filename, const char* mode) {
using namespace irr; using namespace irr;
using namespace core; using namespace core;
using namespace scene; using namespace scene;
using namespace video;
extern const unsigned short PRO_VERSION; extern const unsigned short PRO_VERSION;
extern unsigned int enable_log; extern unsigned int enable_log;
......
...@@ -1680,7 +1680,7 @@ void DeckBuilder::ShowDeckManage() { ...@@ -1680,7 +1680,7 @@ void DeckBuilder::ShowDeckManage() {
void DeckBuilder::ShowBigCard(int code, float zoom) { void DeckBuilder::ShowBigCard(int code, float zoom) {
bigcard_code = code; bigcard_code = code;
bigcard_zoom = zoom; bigcard_zoom = zoom;
ITexture* img = imageManager.GetBigPicture(code, zoom); auto img = imageManager.GetBigPicture(code, zoom);
mainGame->imgBigCard->setImage(img); mainGame->imgBigCard->setImage(img);
auto size = img->getSize(); auto size = img->getSize();
s32 left = mainGame->window_size.Width / 2 - size.Width / 2; s32 left = mainGame->window_size.Width / 2 - size.Width / 2;
...@@ -1701,7 +1701,7 @@ void DeckBuilder::ZoomBigCard(s32 centerx, s32 centery) { ...@@ -1701,7 +1701,7 @@ void DeckBuilder::ZoomBigCard(s32 centerx, s32 centery) {
bigcard_zoom = 4; bigcard_zoom = 4;
if(bigcard_zoom <= 0.2f) if(bigcard_zoom <= 0.2f)
bigcard_zoom = 0.2f; bigcard_zoom = 0.2f;
ITexture* img = imageManager.GetBigPicture(bigcard_code, bigcard_zoom); auto img = imageManager.GetBigPicture(bigcard_code, bigcard_zoom);
mainGame->imgBigCard->setImage(img); mainGame->imgBigCard->setImage(img);
auto size = img->getSize(); auto size = img->getSize();
auto pos = mainGame->wBigCard->getRelativePosition(); auto pos = mainGame->wBigCard->getRelativePosition();
......
...@@ -98,7 +98,7 @@ void Game::DrawBackGround() { ...@@ -98,7 +98,7 @@ void Game::DrawBackGround() {
fieldcode2 = dField.szone[1][5]->code; fieldcode2 = dField.szone[1][5]->code;
int fieldcode = (fieldcode1 > 0) ? fieldcode1 : fieldcode2; int fieldcode = (fieldcode1 > 0) ? fieldcode1 : fieldcode2;
if(fieldcode1 > 0 && fieldcode2 > 0 && fieldcode1 != fieldcode2) { if(fieldcode1 > 0 && fieldcode2 > 0 && fieldcode1 != fieldcode2) {
ITexture* texture = imageManager.GetTextureField(fieldcode1); auto texture = imageManager.GetTextureField(fieldcode1);
if(texture) { if(texture) {
drawField = true; drawField = true;
matManager.mTexture.setTexture(0, texture); matManager.mTexture.setTexture(0, texture);
...@@ -113,7 +113,7 @@ void Game::DrawBackGround() { ...@@ -113,7 +113,7 @@ void Game::DrawBackGround() {
driver->drawVertexPrimitiveList(matManager.vFieldSpell2, 4, matManager.iRectangle, 2); driver->drawVertexPrimitiveList(matManager.vFieldSpell2, 4, matManager.iRectangle, 2);
} }
} else if(fieldcode > 0) { } else if(fieldcode > 0) {
ITexture* texture = imageManager.GetTextureField(fieldcode); auto texture = imageManager.GetTextureField(fieldcode);
if(texture) { if(texture) {
drawField = true; drawField = true;
matManager.mTexture.setTexture(0, texture); matManager.mTexture.setTexture(0, texture);
...@@ -186,7 +186,7 @@ void Game::DrawBackGround() { ...@@ -186,7 +186,7 @@ void Game::DrawBackGround() {
if (dField.hovered_location != 0 && dField.hovered_location != 2 && dField.hovered_location != POSITION_HINT if (dField.hovered_location != 0 && dField.hovered_location != 2 && dField.hovered_location != POSITION_HINT
&& !(dInfo.duel_rule < 4 && dField.hovered_location == LOCATION_MZONE && dField.hovered_sequence > 4) && !(dInfo.duel_rule < 4 && dField.hovered_location == LOCATION_MZONE && dField.hovered_sequence > 4)
&& !(dInfo.duel_rule >= 4 && dField.hovered_location == LOCATION_SZONE && dField.hovered_sequence > 5)) { && !(dInfo.duel_rule >= 4 && dField.hovered_location == LOCATION_SZONE && dField.hovered_sequence > 5)) {
S3DVertex *vertex = 0; irr::video::S3DVertex* vertex = 0;
if (dField.hovered_location == LOCATION_DECK) if (dField.hovered_location == LOCATION_DECK)
vertex = matManager.vFieldDeck[dField.hovered_controler]; vertex = matManager.vFieldDeck[dField.hovered_controler];
else if (dField.hovered_location == LOCATION_MZONE) { else if (dField.hovered_location == LOCATION_MZONE) {
...@@ -980,7 +980,7 @@ void Game::DrawSpec() { ...@@ -980,7 +980,7 @@ void Game::DrawSpec() {
matk.setRotationRadians(atk_r); matk.setRotationRadians(atk_r);
driver->setTransform(irr::video::ETS_WORLD, matk); driver->setTransform(irr::video::ETS_WORLD, matk);
driver->setMaterial(matManager.mATK); driver->setMaterial(matManager.mATK);
driver->drawVertexPrimitiveList(&matManager.vArrow[attack_sv], 12, matManager.iArrow, 10, EVT_STANDARD, EPT_TRIANGLE_STRIP); driver->drawVertexPrimitiveList(&matManager.vArrow[attack_sv], 12, matManager.iArrow, 10, irr::video::EVT_STANDARD, EPT_TRIANGLE_STRIP);
attack_sv += 4; attack_sv += 4;
if (attack_sv > 28) if (attack_sv > 28)
attack_sv = 0; attack_sv = 0;
......
...@@ -368,11 +368,11 @@ bool Game::Initialize() { ...@@ -368,11 +368,11 @@ bool Game::Initialize() {
stName = env->addStaticText(L"", rect<s32>(10, 10, 287, 32), true, false, tabInfo, -1, false); stName = env->addStaticText(L"", rect<s32>(10, 10, 287, 32), true, false, tabInfo, -1, false);
stName->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); stName->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
stInfo = env->addStaticText(L"", rect<s32>(15, 37, 296, 60), false, true, tabInfo, -1, false); stInfo = env->addStaticText(L"", rect<s32>(15, 37, 296, 60), false, true, tabInfo, -1, false);
stInfo->setOverrideColor(SColor(255, 0, 0, 255)); stInfo->setOverrideColor(irr::video::SColor(255, 0, 0, 255));
stDataInfo = env->addStaticText(L"", rect<s32>(15, 60, 296, 83), false, true, tabInfo, -1, false); stDataInfo = env->addStaticText(L"", rect<s32>(15, 60, 296, 83), false, true, tabInfo, -1, false);
stDataInfo->setOverrideColor(SColor(255, 0, 0, 255)); stDataInfo->setOverrideColor(irr::video::SColor(255, 0, 0, 255));
stSetName = env->addStaticText(L"", rect<s32>(15, 83, 296, 106), false, true, tabInfo, -1, false); stSetName = env->addStaticText(L"", rect<s32>(15, 83, 296, 106), false, true, tabInfo, -1, false);
stSetName->setOverrideColor(SColor(255, 0, 0, 255)); stSetName->setOverrideColor(irr::video::SColor(255, 0, 0, 255));
stText = env->addStaticText(L"", rect<s32>(15, 106, 287, 324), false, true, tabInfo, -1, false); stText = env->addStaticText(L"", rect<s32>(15, 106, 287, 324), false, true, tabInfo, -1, false);
scrCardText = env->addScrollBar(false, rect<s32>(267, 106, 287, 324), tabInfo, SCROLL_CARDTEXT); scrCardText = env->addScrollBar(false, rect<s32>(267, 106, 287, 324), tabInfo, SCROLL_CARDTEXT);
scrCardText->setLargeStep(1); scrCardText->setLargeStep(1);
...@@ -971,7 +971,7 @@ bool Game::Initialize() { ...@@ -971,7 +971,7 @@ bool Game::Initialize() {
env->getSkin()->setFont(guiFont); env->getSkin()->setFont(guiFont);
env->setFocus(wMainMenu); env->setFocus(wMainMenu);
for (int i = 0; i < irr::gui::EGDC_COUNT; ++i) { for (int i = 0; i < irr::gui::EGDC_COUNT; ++i) {
SColor col = env->getSkin()->getColor((irr::gui::EGUI_DEFAULT_COLOR)i); auto col = env->getSkin()->getColor((irr::gui::EGUI_DEFAULT_COLOR)i);
col.setAlpha(224); col.setAlpha(224);
env->getSkin()->setColor((irr::gui::EGUI_DEFAULT_COLOR)i, col); env->getSkin()->setColor((irr::gui::EGUI_DEFAULT_COLOR)i, col);
} }
...@@ -995,7 +995,7 @@ void Game::MainLoop() { ...@@ -995,7 +995,7 @@ void Game::MainLoop() {
mProjection.buildCameraLookAtMatrixLH(vector3df(4.2f, 8.0f, 7.8f), vector3df(4.2f, 0, 0), vector3df(0, 0, 1)); mProjection.buildCameraLookAtMatrixLH(vector3df(4.2f, 8.0f, 7.8f), vector3df(4.2f, 0, 0), vector3df(0, 0, 1));
camera->setViewMatrixAffector(mProjection); camera->setViewMatrixAffector(mProjection);
smgr->setAmbientLight(SColorf(1.0f, 1.0f, 1.0f)); smgr->setAmbientLight(irr::video::SColorf(1.0f, 1.0f, 1.0f));
float atkframe = 0.1f; float atkframe = 0.1f;
irr::ITimer* timer = device->getTimer(); irr::ITimer* timer = device->getTimer();
timer->setTime(0); timer->setTime(0);
...@@ -1013,7 +1013,7 @@ void Game::MainLoop() { ...@@ -1013,7 +1013,7 @@ void Game::MainLoop() {
linePatternGL = (linePatternGL << 1) | (linePatternGL >> 15); linePatternGL = (linePatternGL << 1) | (linePatternGL >> 15);
atkframe += 0.1f; atkframe += 0.1f;
atkdy = (float)sin(atkframe); atkdy = (float)sin(atkframe);
driver->beginScene(true, true, SColor(0, 0, 0, 0)); driver->beginScene(true, true, irr::video::SColor(0, 0, 0, 0));
gMutex.lock(); gMutex.lock();
if(dInfo.isStarted) { if(dInfo.isStarted) {
if(dInfo.isFinished && showcardcode == 1) if(dInfo.isFinished && showcardcode == 1)
......
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