Browse Source

Semantically get the first item instead of the array

pull/691/head
Anders Jenbo 6 years ago
parent
commit
e8454376d3
  1. 2
      Source/control.cpp
  2. 24
      Source/pack.cpp

2
Source/control.cpp

@ -261,7 +261,7 @@ void DrawSpellCel(int xp, int yp, BYTE *Trans, int nCel, int w)
assert(gpBuffer);
dst = &gpBuffer[xp + PitchTbl[yp]];
tbl = SplTransTbl;
tbl = &SplTransTbl[0];
#ifdef USE_ASM
__asm {

24
Source/pack.cpp

@ -67,8 +67,8 @@ void PackPlayer(PkPlayerStruct *pPack, int pnum, BOOL manashield)
for (i = 0; i < MAX_SPELLS; i++)
pPack->pSplLvl[i] = pPlayer->_pSplLvl[i];
pki = pPack->InvBody;
pi = pPlayer->InvBody;
pki = &pPack->InvBody[0];
pi = &pPlayer->InvBody[0];
for (i = 0; i < NUM_INVLOC; i++) {
PackItem(pki, pi);
@ -76,8 +76,8 @@ void PackPlayer(PkPlayerStruct *pPack, int pnum, BOOL manashield)
pi++;
}
pki = pPack->InvList;
pi = pPlayer->InvList;
pki = &pPack->InvList[0];
pi = &pPlayer->InvList[0];
for (i = 0; i < NUM_INV_GRID_ELEM; i++) {
PackItem(pki, pi);
@ -89,8 +89,8 @@ void PackPlayer(PkPlayerStruct *pPack, int pnum, BOOL manashield)
pPack->InvGrid[i] = pPlayer->InvGrid[i];
pPack->_pNumInv = pPlayer->_pNumInv;
pki = pPack->SpdList;
pi = pPlayer->SpdList;
pki = &pPack->SpdList[0];
pi = &pPlayer->SpdList[0];
for (i = 0; i < MAXBELTITEMS; i++) {
PackItem(pki, pi);
@ -208,8 +208,8 @@ void UnPackPlayer(PkPlayerStruct *pPack, int pnum, BOOL killok)
for (i = 0; i < MAX_SPELLS; i++)
pPlayer->_pSplLvl[i] = pPack->pSplLvl[i];
pki = pPack->InvBody;
pi = pPlayer->InvBody;
pki = &pPack->InvBody[0];
pi = &pPlayer->InvBody[0];
for (i = 0; i < NUM_INVLOC; i++) {
UnPackItem(pki, pi);
@ -217,8 +217,8 @@ void UnPackPlayer(PkPlayerStruct *pPack, int pnum, BOOL killok)
pi++;
}
pki = pPack->InvList;
pi = pPlayer->InvList;
pki = &pPack->InvList[0];
pi = &pPlayer->InvList[0];
for (i = 0; i < NUM_INV_GRID_ELEM; i++) {
UnPackItem(pki, pi);
@ -232,8 +232,8 @@ void UnPackPlayer(PkPlayerStruct *pPack, int pnum, BOOL killok)
pPlayer->_pNumInv = pPack->_pNumInv;
VerifyGoldSeeds(pPlayer);
pki = pPack->SpdList;
pi = pPlayer->SpdList;
pki = &pPack->SpdList[0];
pi = &pPlayer->SpdList[0];
for (i = 0; i < MAXBELTITEMS; i++) {
UnPackItem(pki, pi);

Loading…
Cancel
Save