Commit 39b9090c authored by argon.sun's avatar argon.sun

fix

parent f78d5957
...@@ -853,6 +853,7 @@ video::IVideoModeList* CIrrDeviceWin32::getVideoModeList() { ...@@ -853,6 +853,7 @@ video::IVideoModeList* CIrrDeviceWin32::getVideoModeList() {
} }
typedef BOOL (WINAPI *PGPI)(DWORD, DWORD, DWORD, DWORD, PDWORD); typedef BOOL (WINAPI *PGPI)(DWORD, DWORD, DWORD, DWORD, PDWORD);
// Needed for old windows apis // Needed for old windows apis
#ifndef PRODUCT_ULTIMATE
#define PRODUCT_ULTIMATE 0x00000001 #define PRODUCT_ULTIMATE 0x00000001
#define PRODUCT_HOME_BASIC 0x00000002 #define PRODUCT_HOME_BASIC 0x00000002
#define PRODUCT_HOME_PREMIUM 0x00000003 #define PRODUCT_HOME_PREMIUM 0x00000003
...@@ -873,6 +874,7 @@ typedef BOOL (WINAPI *PGPI)(DWORD, DWORD, DWORD, DWORD, PDWORD); ...@@ -873,6 +874,7 @@ typedef BOOL (WINAPI *PGPI)(DWORD, DWORD, DWORD, DWORD, PDWORD);
#define PRODUCT_PROFESSIONAL_E 0x00000045 #define PRODUCT_PROFESSIONAL_E 0x00000045
#define PRODUCT_ENTERPRISE_E 0x00000046 #define PRODUCT_ENTERPRISE_E 0x00000046
#define PRODUCT_ULTIMATE_E 0x00000047 #define PRODUCT_ULTIMATE_E 0x00000047
#endif
void CIrrDeviceWin32::getWindowsVersion(core::stringc& out) { void CIrrDeviceWin32::getWindowsVersion(core::stringc& out) {
OSVERSIONINFOEX osvi; OSVERSIONINFOEX osvi;
PGPI pGPI; PGPI pGPI;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#pragma once #pragma once
#define _IRR_STATIC_LIB_ #define _IRR_STATIC_LIB_
#define _IRR_COMPILE_WITH_DX9_DEV_PACK
#ifdef _WIN32 #ifdef _WIN32
#include <WinSock2.h> #include <WinSock2.h>
......
...@@ -25,11 +25,25 @@ void Game::DrawSelectionLine(irr::video::S3DVertex* vec, bool strip, int width, ...@@ -25,11 +25,25 @@ void Game::DrawSelectionLine(irr::video::S3DVertex* vec, bool strip, int width,
glMaterialfv(GL_FRONT, GL_AMBIENT, origin); glMaterialfv(GL_FRONT, GL_AMBIENT, origin);
glDisable(GL_LINE_STIPPLE); glDisable(GL_LINE_STIPPLE);
} else { } else {
int indexlist[4] = {0, 1, 3, 2}; driver->setMaterial(matManager.mOutLine);
driver->draw3DLine(vec[0].Pos,vec[1].Pos); if(strip) {
driver->draw3DLine(vec[1].Pos,vec[3].Pos); if(linePattern < 15) {
driver->draw3DLine(vec[3].Pos,vec[2].Pos); driver->draw3DLine(vec[0].Pos, vec[0].Pos + (vec[1].Pos - vec[0].Pos) * (linePattern + 1) / 15.0);
driver->draw3DLine(vec[2].Pos,vec[0].Pos); driver->draw3DLine(vec[1].Pos, vec[1].Pos + (vec[3].Pos - vec[1].Pos) * (linePattern + 1) / 15.0);
driver->draw3DLine(vec[3].Pos, vec[3].Pos + (vec[2].Pos - vec[3].Pos) * (linePattern + 1) / 15.0);
driver->draw3DLine(vec[2].Pos, vec[2].Pos + (vec[0].Pos - vec[2].Pos) * (linePattern + 1) / 15.0);
} else {
driver->draw3DLine(vec[0].Pos + (vec[1].Pos - vec[0].Pos) * (linePattern - 14) / 15.0, vec[1].Pos);
driver->draw3DLine(vec[1].Pos + (vec[3].Pos - vec[1].Pos) * (linePattern - 14) / 15.0, vec[3].Pos);
driver->draw3DLine(vec[3].Pos + (vec[2].Pos - vec[3].Pos) * (linePattern - 14) / 15.0, vec[2].Pos);
driver->draw3DLine(vec[2].Pos + (vec[0].Pos - vec[2].Pos) * (linePattern - 14) / 15.0, vec[0].Pos);
}
} else {
driver->draw3DLine(vec[0].Pos, vec[1].Pos);
driver->draw3DLine(vec[1].Pos, vec[3].Pos);
driver->draw3DLine(vec[3].Pos, vec[2].Pos);
driver->draw3DLine(vec[2].Pos, vec[0].Pos);
}
} }
} }
void Game::DrawBackGround() { void Game::DrawBackGround() {
......
...@@ -471,16 +471,17 @@ void Game::MainLoop() { ...@@ -471,16 +471,17 @@ void Game::MainLoop() {
camera->setProjectionMatrix(mProjection); camera->setProjectionMatrix(mProjection);
mProjection.buildCameraLookAtMatrixLH(vector3df(3.95f, 8.0f, 7.8f), vector3df(3.95f, 0, 0), vector3df(0, 0, 1)); mProjection.buildCameraLookAtMatrixLH(vector3df(3.95f, 8.0f, 7.8f), vector3df(3.95f, 0, 0), vector3df(0, 0, 1));
camera->setViewMatrixAffector(mProjection); camera->setViewMatrixAffector(mProjection);
irr::scene::ILightSceneNode* light = smgr->addLightSceneNode(0, vector3df(0, 0, 100)); smgr->setAmbientLight(SColorf(1.0f, 1.0f, 1.0f));
light->getLightData().AmbientColor = SColorf(1.0f, 1.0f, 1.0f);
light->getLightData().DiffuseColor = SColorf(0.0f, 0.0f, 0.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);
int fps = 0; int fps = 0;
int cur_time = 0; int cur_time = 0;
while(device->run()) { while(device->run()) {
linePattern = (linePattern << 1) | (linePattern >> 15); if(gameConf.use_d3d)
linePattern = (linePattern + 1) % 30;
else
linePattern = (linePattern << 1) | (linePattern >> 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, SColor(0, 0, 0, 0));
......
...@@ -349,6 +349,8 @@ Materials::Materials() { ...@@ -349,6 +349,8 @@ Materials::Materials() {
mSelField.DiffuseColor = 0xff000000; mSelField.DiffuseColor = 0xff000000;
mSelField.MaterialType = irr::video::EMT_ONETEXTURE_BLEND; mSelField.MaterialType = irr::video::EMT_ONETEXTURE_BLEND;
mSelField.MaterialTypeParam = pack_texureBlendFunc(EBF_SRC_ALPHA, EBF_ONE_MINUS_SRC_ALPHA, EMFN_MODULATE_1X, EAS_VERTEX_COLOR); mSelField.MaterialTypeParam = pack_texureBlendFunc(EBF_SRC_ALPHA, EBF_ONE_MINUS_SRC_ALPHA, EMFN_MODULATE_1X, EAS_VERTEX_COLOR);
mOutLine.ColorMaterial = irr::video::ECM_AMBIENT;
mOutLine.DiffuseColor = 0xff000000;
mOutLine.Thickness = 2; mOutLine.Thickness = 2;
mTRTexture = mTexture; mTRTexture = mTexture;
mTRTexture.AmbientColor = 0xffffff00; mTRTexture.AmbientColor = 0xffffff00;
......
...@@ -55,13 +55,13 @@ function c15317640.rctop(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,13 +55,13 @@ function c15317640.rctop(e,tp,eg,ep,ev,re,r,rp)
local coin=Duel.SelectOption(tp,60,61) local coin=Duel.SelectOption(tp,60,61)
local res=Duel.TossCoin(tp,1) local res=Duel.TossCoin(tp,1)
if coin==res then if coin==res then
c:RemoveCounter(tp,0x1f,1,REASON_EFFECT) e:GetHandler():RemoveCounter(tp,0x1f,1,REASON_EFFECT)
end end
end end
function c15317640.descon(e,tp,eg,ep,ev,re,r,rp) function c15317640.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0x1f)==0 return e:GetHandler():GetCounter(0x1f)==0
end end
function c15317640.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c15317640.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end end
......
...@@ -66,7 +66,7 @@ end ...@@ -66,7 +66,7 @@ end
function c22790789.descon(e,tp,eg,ep,ev,re,r,rp) function c22790789.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0x1f)==0 return e:GetHandler():GetCounter(0x1f)==0
end end
function c22790789.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c22790789.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end end
......
...@@ -20,7 +20,7 @@ end ...@@ -20,7 +20,7 @@ end
function c28553439.filter(c,e,tp) function c28553439.filter(c,e,tp)
return c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c28553439.rfilter(c) function c28553439.rfilter(c,e)
return not c:IsImmuneToEffect(e) return not c:IsImmuneToEffect(e)
end end
function c28553439.target(e,tp,eg,ep,ev,re,r,rp,chk) function c28553439.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -33,7 +33,7 @@ function c29436665.rfilter(c) ...@@ -33,7 +33,7 @@ function c29436665.rfilter(c)
end end
function c29436665.spcon(e,c) function c29436665.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATINO_MZONE)>-1 return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1
and Duel.CheckReleaseGroup(c:GetControler(),c29436665.rfilter,1,nil) and Duel.CheckReleaseGroup(c:GetControler(),c29436665.rfilter,1,nil)
end end
function c29436665.spop(e,tp,eg,ep,ev,re,r,rp,c) function c29436665.spop(e,tp,eg,ep,ev,re,r,rp,c)
...@@ -41,7 +41,7 @@ function c29436665.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -41,7 +41,7 @@ function c29436665.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c29436665.dmgcon(e,tp,eg,ep,ev,re,r,rp) function c29436665.dmgcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) return re:GetActiveType()==TYPE_SPELL and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end end
function c29436665.dmgop(e,tp,eg,ep,ev,re,r,rp) function c29436665.dmgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(1-tp,1000,REASON_EFFECT) Duel.Damage(1-tp,1000,REASON_EFFECT)
......
...@@ -21,4 +21,11 @@ function c46897277.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -21,4 +21,11 @@ function c46897277.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(1) e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(0,1)
Duel.RegisterEffect(e2,tp)
end end
...@@ -40,7 +40,7 @@ function c63676256.initial_effect(c) ...@@ -40,7 +40,7 @@ function c63676256.initial_effect(c)
e5:SetType(EFFECT_TYPE_EQUIP) e5:SetType(EFFECT_TYPE_EQUIP)
e5:SetCode(EFFECT_UPDATE_ATTACK) e5:SetCode(EFFECT_UPDATE_ATTACK)
e5:SetCondition(c63676256.uncon) e5:SetCondition(c63676256.uncon)
e5:SetValue(500) e5:SetValue(-500)
c:RegisterEffect(e5) c:RegisterEffect(e5)
local e6=e5:Clone() local e6=e5:Clone()
e6:SetCode(EFFECT_UPDATE_DEFENCE) e6:SetCode(EFFECT_UPDATE_DEFENCE)
......
...@@ -13,6 +13,7 @@ end ...@@ -13,6 +13,7 @@ end
function c66518841.condition(e,tp,eg,ep,ev,re,r,rp) function c66518841.condition(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker() local tc=Duel.GetAttacker()
if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end
if not tc then return false end
local bc=tc:GetBattleTarget() local bc=tc:GetBattleTarget()
if tc and bc then if tc and bc then
local dif=bc:GetAttack()-tc:GetAttack() local dif=bc:GetAttack()-tc:GetAttack()
......
...@@ -33,5 +33,5 @@ function c75363626.retop(e,tp,eg,ep,ev,re,r,rp) ...@@ -33,5 +33,5 @@ function c75363626.retop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c75363626.atktg(e,c) function c75363626.atktg(e,c)
return c:GetCode()~=75363626 return c:GetCode()~=75363626 and c:IsSetCard(0x71)
end end
...@@ -15,7 +15,7 @@ end ...@@ -15,7 +15,7 @@ end
function c86778566.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c86778566.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return true end if chk==0 then return true end
local op=0 local opt=0
if Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) then if Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) then
opt=Duel.SelectOption(tp,aux.Stringid(86778566,0),aux.Stringid(86778566,1)) opt=Duel.SelectOption(tp,aux.Stringid(86778566,0),aux.Stringid(86778566,1))
else opt=Duel.SelectOption(tp,aux.Stringid(86778566,1))+1 end else opt=Duel.SelectOption(tp,aux.Stringid(86778566,1))+1 end
......
...@@ -3,7 +3,7 @@ function c90407382.initial_effect(c) ...@@ -3,7 +3,7 @@ function c90407382.initial_effect(c)
--equip --equip
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(90407382,0)) e1:SetDescription(aux.Stringid(90407382,0))
e1:SetProperty(EFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_EQUIP) e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
......
...@@ -59,7 +59,7 @@ end ...@@ -59,7 +59,7 @@ end
function c95943058.spcon(e,tp,eg,ep,ev,re,r,rp) function c95943058.spcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()~=tp then return end if Duel.GetTurnPlayer()~=tp then return end
local ct=e:GetLabel() local ct=e:GetLabel()
e:GetHandler():SetLabel(ct+1) e:SetLabel(ct+1)
return ct==1 return ct==1
end end
function c95943058.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c95943058.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -33,7 +33,7 @@ function c96561011.rfilter(c) ...@@ -33,7 +33,7 @@ function c96561011.rfilter(c)
end end
function c96561011.spcon(e,c) function c96561011.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATINO_MZONE)>-1 return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1
and Duel.CheckReleaseGroup(c:GetControler(),c96561011.rfilter,1,nil) and Duel.CheckReleaseGroup(c:GetControler(),c96561011.rfilter,1,nil)
end end
function c96561011.spop(e,tp,eg,ep,ev,re,r,rp,c) function c96561011.spop(e,tp,eg,ep,ev,re,r,rp,c)
......
...@@ -14,7 +14,7 @@ end ...@@ -14,7 +14,7 @@ end
function c98162242.damcon(e,tp,eg,ep,ev,re,r,rp) function c98162242.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local bc=c:GetBattleTarget() local bc=c:GetBattleTarget()
return c:IsRelateTobattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) and bc:IsType(TYPE_MONSTER) return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) and bc:IsType(TYPE_MONSTER)
end end
function c98162242.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function c98162242.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
#config file #config file
#nickname & gamename should be less than 20 characters #nickname & gamename should be less than 20 characters
use_d3d = 0 use_d3d = 1
antialias = 2 antialias = 2
errorlog = 1 errorlog = 1
nickname = Player nickname = Player
......
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