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

fix

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