- merge fixes in Blood frontend code.

This commit is contained in:
Christoph Oelckers 2019-10-20 17:09:01 +02:00
parent d83b3f34a3
commit 06f4138202
7 changed files with 34 additions and 38 deletions

View file

@ -2469,14 +2469,9 @@ const char *pzCrypticArts[] = {
"CPART07.AR_", "CPART15.AR_"
};
const char* pzCrypticArts1[] = {
"addons/Cryptic Passage/CPART07.ART", "addons/Cryptic Passage/CPART15.ART"
};
INIDESCRIPTION gINIDescription[] = {
{ "BLOOD: One Unit Whole Blood", "BLOOD.INI", NULL, 0 },
{ "Cryptic passage", "CRYPTIC.INI", pzCrypticArts, ARRAY_SSIZE(pzCrypticArts) },
{ "Cryptic passage", "addons/Cryptic Passage/CRYPTIC.INI", pzCrypticArts1, ARRAY_SSIZE(pzCrypticArts1) }, // let's hope this works for the
};
bool AddINIFile(const char *pzFile, bool bForce = false)

View file

@ -355,16 +355,16 @@ void CounterCheck(int nSector) // 12
for (int nSprite = headspritesect[nSector]; nSprite >= 0; nSprite = nextspritesect[nSprite]) {
if (sprite[nSprite].type == nType) nCount++;
}
}
if (nCount < nReq) {
evPost(nSector, 6, 5, kCallbackCounterCheck);
return;
} else {
//pXSector->waitTimeA = 0; //do not reset necessary objects counter to zero
//pXSector->waitTimeA = 0; //do not reset necessary objects counter to zero
trTriggerSector(nSector, pXSector, kCmdOn);
pXSector->locked = 1; //lock sector, so it can be opened again later
}
pXSector->locked = 1; //lock sector, so it can be opened again later
}
}
@ -491,16 +491,16 @@ void returnFlagToBase(int nSprite) // 17
switch (pSprite->type) {
case kItemFlagA:
trTriggerSprite(pOwner->index, pXOwner, kCmdOn);
sndStartSample(8003, 255, 2, 0);
gBlueFlagDropped = false;
viewSetMessage("Blue Flag returned to base.");
break;
sndStartSample(8003, 255, 2, 0);
gBlueFlagDropped = false;
viewSetMessage("Blue Flag returned to base.");
break;
case kItemFlagB:
trTriggerSprite(pOwner->index, pXOwner, kCmdOn);
sndStartSample(8002, 255, 2, 0);
gRedFlagDropped = false;
viewSetMessage("Red Flag returned to base.");
break;
sndStartSample(8002, 255, 2, 0);
gRedFlagDropped = false;
viewSetMessage("Red Flag returned to base.");
break;
}
}
evPost(pSprite->index, 3, 0, kCallbackRemove);

View file

@ -540,12 +540,8 @@ static inline void G_HandleAsync(void)
netGetPackets();
}
#if defined HAVE_FLAC || defined HAVE_VORBIS
# define FORMAT_UPGRADE_ELIGIBLE
extern int32_t S_OpenAudio(const char *fn, char searchfirst, uint8_t ismusic);
#else
# define S_OpenAudio(fn, searchfirst, ismusic) kopen4loadfrommod(fn, searchfirst)
#endif
#pragma pack(push,1)

View file

@ -291,5 +291,6 @@ bool shrinkPlayerSize(PLAYER* pPlayer, int divider);
bool growPlayerSize(PLAYER* pPlayer, int multiplier);
bool resetPlayerSize(PLAYER* pPlayer);
void deactivateSizeShrooms(PLAYER* pPlayer);
PLAYER* getPlayerById(short id);
END_BLD_NS

View file

@ -822,15 +822,15 @@ void OperateSprite(int nSprite, XSPRITE *pXSprite, EVENT event)
PLAYER* pPlayer = NULL;
if ((pPlayer = getPlayerById(pXSprite->data1)) == NULL) return;
else if (event.cmd < kCmdNumberic) { // play qav as weapon qav
switch (event.cmd) {
case kCmdOff:
switch (event.cmd) {
case kCmdOff:
if (gQavPlayerIndex == nSprite) {
pXSprite->sysData1 = 0;
pPlayer->atc.newWeapon = pPlayer->atbd = pXSprite->data4;
gQavPlayerIndex = -1;
WeaponRaise(pPlayer);
WeaponRaise(pPlayer);
}
break;
break;
case kCmdOn: {
if (gQavPlayerIndex == nSprite && !pXSprite->Interrutable) break;
QAV* pQav = NULL; DICTNODE* hQav = gSysRes.Lookup(pXSprite->data2, "QAV");
@ -842,7 +842,7 @@ void OperateSprite(int nSprite, XSPRITE *pXSprite, EVENT event)
xsprite[sprite[gQavPlayerIndex].extra].data4 = 0;
}
WeaponLower(pPlayer);
WeaponLower(pPlayer);
pQav = (QAV*)gSysRes.Load(hQav); weaponQAV[kFreeQAVEntry] = pQav;
pXSprite->busyTime = (((pQav->at10) / 12) * 120) / 10;
@ -850,14 +850,14 @@ void OperateSprite(int nSprite, XSPRITE *pXSprite, EVENT event)
pXSprite->sysData1 = pXSprite->waitTime; // how many times animation should be played
gQavPlayerIndex = nSprite;
}
break;
}
break;
}
default:
default:
if (gQavPlayerIndex != nSprite) evPost(nSprite, 3, 0, kCmdOn);
else evPost(nSprite, 3, 0, kCmdOff);
break;
}
else evPost(nSprite, 3, 0, kCmdOff);
break;
}
} else if (event.cmd < kCmdNumbericMax) {
switch (event.cmd) {
case kCmdNumberic: // player life form
@ -1415,8 +1415,8 @@ void usePropertiesChanger(XSPRITE* pXSource, short objType, int objIndex) {
// adding physics sprite in list
if ((flags & kPhysGravity) != 0 || (flags & kPhysMove) != 0) {
if (nIndex != -1) pXSprite->physAttr = flags; // just update physics attributes
else if ((nIndex = debrisGetFreeIndex()) < 0)
if (nIndex != -1) pXSprite->physAttr = flags; // just update physics attributes
else if ((nIndex = debrisGetFreeIndex()) < 0)
viewSetSystemMessage("Max (%d) Physics affected sprites reached!", kMaxSuperXSprites);
else {
@ -1581,8 +1581,8 @@ void useEffectGen(XSPRITE * pXSource, spritetype * pSprite) {
int top, bottom; GetSpriteExtents(pSprite, &top, &bottom); spritetype * pEffect = NULL;
if (fxId > 0 && fxId < 57 && (pEffect = gFX.fxSpawn((FX_ID) fxId, pSprite->sectnum, pSprite->x, pSprite->y, top, 0)) != NULL) {
if ((pEffect->cstat & CSTAT_SPRITE_ALIGNMENT_WALL) && (pEffect->cstat & CSTAT_SPRITE_ONE_SIDED))
pEffect->cstat &= ~CSTAT_SPRITE_ONE_SIDED;
if ((pEffect->cstat & CSTAT_SPRITE_ALIGNMENT_WALL) && (pEffect->cstat & CSTAT_SPRITE_ONE_SIDED))
pEffect->cstat &= ~CSTAT_SPRITE_ONE_SIDED;
if (pSprite->flags & kModernTypeFlag1) {
if (pEffect->pal <= 0) pEffect->pal = pSprite->pal;
@ -3732,7 +3732,7 @@ void pastePropertiesInObj(int type, int nDest, EVENT event) {
} else if (pSource->type == kModernObjPropertiesChanger) {
/* - properties changer can change various properties - */
usePropertiesChanger(pXSource, type, nDest);
}
}
}
// By NoOne: the following functions required for kModernDudeTargetChanger

View file

@ -52,6 +52,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
BEGIN_BLD_NS
#define kQAVEnd 125
void FirePitchfork(int, PLAYER *pPlayer);
void FireSpray(int, PLAYER *pPlayer);
void ThrowCan(int, PLAYER *pPlayer);

View file

@ -29,6 +29,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
BEGIN_BLD_NS
QAV* weaponQAV[];
void WeaponInit(void);
void WeaponDraw(PLAYER *pPlayer, int a2, int a3, int a4, int a5);
void WeaponRaise(PLAYER *pPlayer);