Browse Source

Merge branch 'master' of github.com:diasurgical/devilution into hellfire

pull/876/head
Anders Jenbo 7 years ago
parent
commit
0502ba70ea
  1. 46
      Source/control.cpp
  2. 3
      Source/doom.cpp
  3. 2228
      Source/drlg_l1.cpp
  4. 42
      Source/drlg_l1.h
  5. 2090
      Source/drlg_l3.cpp
  6. 24
      Source/drlg_l3.h
  7. 1144
      Source/drlg_l4.cpp
  8. 24
      Source/drlg_l4.h
  9. 150
      Source/engine.cpp
  10. 72
      Source/engine.h
  11. 16
      Source/error.cpp
  12. 18
      Source/gmenu.cpp
  13. 2
      Source/interfac.cpp
  14. 136
      Source/inv.cpp
  15. 2
      Source/items.cpp
  16. 2
      Source/minitext.cpp
  17. 6
      Source/quests.cpp
  18. 144
      Source/scrollrt.cpp
  19. 18
      Source/stores.cpp
  20. 60
      Source/town.cpp
  21. 76
      comparer-config/diablo.toml
  22. 72
      comparer-config/spawn.toml

46
Source/control.cpp

@ -1211,16 +1211,16 @@ void InitControlPan()
pSpellCels = LoadFileInMem("CtrlPan\\SpelIcon.CEL", NULL);
SetSpellTrans(RSPLTYPE_SKILL);
pStatusPanel = LoadFileInMem("CtrlPan\\Panel8.CEL", NULL);
CelDecodeRect(pBtmBuff, 0, (PANEL_HEIGHT + 16) - 1, PANEL_WIDTH, pStatusPanel, 1, PANEL_WIDTH);
CelBlitWidth(pBtmBuff, 0, (PANEL_HEIGHT + 16) - 1, PANEL_WIDTH, pStatusPanel, 1, PANEL_WIDTH);
MemFreeDbg(pStatusPanel);
pStatusPanel = LoadFileInMem("CtrlPan\\P8Bulbs.CEL", NULL);
CelDecodeRect(pLifeBuff, 0, 87, 88, pStatusPanel, 1, 88);
CelDecodeRect(pManaBuff, 0, 87, 88, pStatusPanel, 2, 88);
CelBlitWidth(pLifeBuff, 0, 87, 88, pStatusPanel, 1, 88);
CelBlitWidth(pManaBuff, 0, 87, 88, pStatusPanel, 2, 88);
MemFreeDbg(pStatusPanel);
talkflag = FALSE;
if (gbMaxPlayers != 1) {
pTalkPanel = LoadFileInMem("CtrlPan\\TalkPanl.CEL", NULL);
CelDecodeRect(pBtmBuff, 0, (PANEL_HEIGHT + 16) * 2 - 1, PANEL_WIDTH, pTalkPanel, 1, PANEL_WIDTH);
CelBlitWidth(pBtmBuff, 0, (PANEL_HEIGHT + 16) * 2 - 1, PANEL_WIDTH, pTalkPanel, 1, PANEL_WIDTH);
MemFreeDbg(pTalkPanel);
pMultiBtns = LoadFileInMem("CtrlPan\\P8But2.CEL", NULL);
pTalkBtns = LoadFileInMem("CtrlPan\\TalkButt.CEL", NULL);
@ -1297,14 +1297,14 @@ void DrawCtrlPan()
if (!panbtn[i])
DrawPanelBox(PanBtnPos[i][0], PanBtnPos[i][1] - 336, 71, 20, PanBtnPos[i][0] + SCREEN_X, PanBtnPos[i][1] + SCREEN_Y);
else
CelDecodeOnly(PanBtnPos[i][0] + SCREEN_X, PanBtnPos[i][1] + SCREEN_Y + 18, pPanelButtons, i + 1, 71);
CelDraw(PanBtnPos[i][0] + SCREEN_X, PanBtnPos[i][1] + SCREEN_Y + 18, pPanelButtons, i + 1, 71);
}
if (numpanbtns == 8) {
CelDecodeOnly(87 + SCREEN_X, 474 + SCREEN_Y, pMultiBtns, panbtn[6] + 1, 33);
CelDraw(87 + SCREEN_X, 474 + SCREEN_Y, pMultiBtns, panbtn[6] + 1, 33);
if (FriendlyMode)
CelDecodeOnly(527 + SCREEN_X, 474 + SCREEN_Y, pMultiBtns, panbtn[7] + 3, 33);
CelDraw(527 + SCREEN_X, 474 + SCREEN_Y, pMultiBtns, panbtn[7] + 3, 33);
else
CelDecodeOnly(527 + SCREEN_X, 474 + SCREEN_Y, pMultiBtns, panbtn[7] + 5, 33);
CelDraw(527 + SCREEN_X, 474 + SCREEN_Y, pMultiBtns, panbtn[7] + 5, 33);
}
}
@ -1760,7 +1760,7 @@ void DrawChr()
char chrstr[64];
int pc, mindam, maxdam;
CelDecodeOnly(SCREEN_X, 351 + SCREEN_Y, pChrPanel, 1, 320);
CelDraw(SCREEN_X, 351 + SCREEN_Y, pChrPanel, 1, 320);
ADD_PlrStringXY(20, 32, 151, plr[myplr]._pName, COL_WHITE);
if (plr[myplr]._pClass == PC_WARRIOR) {
@ -1933,13 +1933,13 @@ void DrawChr()
ADD_PlrStringXY(95, 266, 126, chrstr, COL_RED);
pc = plr[myplr]._pClass;
if (plr[myplr]._pBaseStr < MaxStats[pc][ATTRIB_STR])
CelDecodeOnly(137 + SCREEN_X, 159 + SCREEN_Y, pChrButtons, chrbtn[ATTRIB_STR] + 2, 41);
CelDraw(137 + SCREEN_X, 159 + SCREEN_Y, pChrButtons, chrbtn[ATTRIB_STR] + 2, 41);
if (plr[myplr]._pBaseMag < MaxStats[pc][ATTRIB_MAG])
CelDecodeOnly(137 + SCREEN_X, 187 + SCREEN_Y, pChrButtons, chrbtn[ATTRIB_MAG] + 4, 41);
CelDraw(137 + SCREEN_X, 187 + SCREEN_Y, pChrButtons, chrbtn[ATTRIB_MAG] + 4, 41);
if (plr[myplr]._pBaseDex < MaxStats[pc][ATTRIB_DEX])
CelDecodeOnly(137 + SCREEN_X, 216 + SCREEN_Y, pChrButtons, chrbtn[ATTRIB_DEX] + 6, 41);
CelDraw(137 + SCREEN_X, 216 + SCREEN_Y, pChrButtons, chrbtn[ATTRIB_DEX] + 6, 41);
if (plr[myplr]._pBaseVit < MaxStats[pc][ATTRIB_VIT])
CelDecodeOnly(137 + SCREEN_X, 244 + SCREEN_Y, pChrButtons, chrbtn[ATTRIB_VIT] + 8, 41);
CelDraw(137 + SCREEN_X, 244 + SCREEN_Y, pChrButtons, chrbtn[ATTRIB_VIT] + 8, 41);
}
col = plr[myplr]._pMaxHP <= plr[myplr]._pMaxHPBase ? COL_WHITE : COL_BLUE;
@ -2042,7 +2042,7 @@ void DrawLevelUpIcon()
if (!stextflag) {
nCel = lvlbtndown ? 3 : 2;
ADD_PlrStringXY(0, 303, 120, "Level Up", COL_WHITE);
CelDecodeOnly(40 + SCREEN_X, 335 + SCREEN_Y, pChrButtons, nCel, 41);
CelDraw(40 + SCREEN_X, 335 + SCREEN_Y, pChrButtons, nCel, 41);
}
}
@ -2167,7 +2167,7 @@ int DrawDurIcon4Item(ItemStruct *pItem, int x, int c)
}
if (pItem->_iDurability > 2)
c += 8;
CelDecodeOnly(x, 335 + SCREEN_Y, pDurIcons, c, 32);
CelDraw(x, 335 + SCREEN_Y, pDurIcons, c, 32);
return x - 40;
}
@ -2279,12 +2279,12 @@ void DrawSpellBook()
char st;
unsigned __int64 spl;
CelDecodeOnly(PANEL_RIGHT, 351 + SCREEN_Y, pSpellBkCel, 1, 320);
CelDraw(PANEL_RIGHT, 351 + SCREEN_Y, pSpellBkCel, 1, 320);
#ifdef HELLFIRE
if (sbooktab < 5)
CelDecodeOnly(61 * sbooktab + 391, 508, pSBkBtnCel, sbooktab + 1, 61);
CelDraw(61 * sbooktab + 391, 508, pSBkBtnCel, sbooktab + 1, 61);
#else
CelDecodeOnly(PANEL_RIGHT + 76 * sbooktab + 7, 348 + SCREEN_Y, pSBkBtnCel, sbooktab + 1, 76);
CelDraw(PANEL_RIGHT + 76 * sbooktab + 7, 348 + SCREEN_Y, pSBkBtnCel, sbooktab + 1, 76);
#endif
spl = plr[myplr]._pMemSpells | plr[myplr]._pISpells | plr[myplr]._pAblSpells;
@ -2420,7 +2420,7 @@ void DrawGoldSplit(int amount)
int screen_x, i;
screen_x = 0;
CelDecodeOnly(351 + SCREEN_X, 178 + SCREEN_Y, pGBoxBuff, 1, 261);
CelDraw(351 + SCREEN_X, 178 + SCREEN_Y, pGBoxBuff, 1, 261);
sprintf(tempstr, "You have %u gold", initialDropGoldValue);
ADD_PlrStringXY(366, 87, 600, tempstr, COL_GOLD);
sprintf(tempstr, "%s. How many do", get_pieces_str(initialDropGoldValue));
@ -2436,7 +2436,7 @@ void DrawGoldSplit(int amount)
} else {
screen_x = 450;
}
CelDecodeOnly(screen_x, 140 + SCREEN_Y, pSPentSpn2Cels, nGoldFrame, 12);
CelDraw(screen_x, 140 + SCREEN_Y, pSPentSpn2Cels, nGoldFrame, 12);
nGoldFrame = (nGoldFrame & 7) + 1;
}
@ -2543,7 +2543,7 @@ void DrawTalkPan()
}
if (msg)
*msg = '\0';
CelDecDatOnly(gpBuffer + x, pSPentSpn2Cels, frame, 12);
CelBlitFrame(gpBuffer + x, pSPentSpn2Cels, frame, 12);
frame = (frame & 7) + 1;
talk_btn = 0;
for (i = 0; i < 4; i++) {
@ -2556,7 +2556,7 @@ void DrawTalkPan()
nCel = 4;
else
nCel = 3;
CelDecodeOnly(172 + SCREEN_X, 436 + 18 * talk_btn + SCREEN_Y, pTalkBtns, nCel, 61);
CelDraw(172 + SCREEN_X, 436 + 18 * talk_btn + SCREEN_Y, pTalkBtns, nCel, 61);
}
} else {
color = COL_RED;
@ -2566,7 +2566,7 @@ void DrawTalkPan()
nCel = 1;
if (talkbtndown[talk_btn])
nCel += 4;
CelDecodeOnly(172 + SCREEN_X, 436 + 18 * talk_btn + SCREEN_Y, pTalkBtns, nCel, 61);
CelDraw(172 + SCREEN_X, 436 + 18 * talk_btn + SCREEN_Y, pTalkBtns, nCel, 61);
}
if (plr[i].plractive) {
control_print_talk_msg(plr[i]._pName, 46, 60 + talk_btn * 18, &x, color);

3
Source/doom.cpp

@ -137,5 +137,6 @@ void doom_draw()
}
}
#endif
CelDecodeOnly(SCREEN_X, PANEL_Y - 1, pDoomCel, 1, SCREEN_WIDTH);
CelDraw(SCREEN_X, PANEL_Y - 1, pDoomCel, 1, SCREEN_WIDTH);
}

2228
Source/drlg_l1.cpp

File diff suppressed because it is too large Load Diff

42
Source/drlg_l1.h

@ -25,56 +25,14 @@ extern BYTE *pSetPiece;
void DRLG_Init_Globals();
void LoadL1Dungeon(char *sFileName, int vx, int vy);
void DRLG_L1Floor();
void DRLG_L1Pass3();
void DRLG_InitL1Vals();
void LoadPreL1Dungeon(char *sFileName, int vx, int vy);
void CreateL5Dungeon(DWORD rseed, int entry);
void DRLG_LoadL1SP();
void DRLG_FreeL1SP();
#ifdef HELLFIRE
void DRLG_InitL5Vals();
#endif
void DRLG_L5(int entry);
void DRLG_PlaceDoor(int x, int y);
#ifdef HELLFIRE
void drlg_l1_crypt_lavafloor();
#endif
void DRLG_L1Shadows();
int DRLG_PlaceMiniSet(const BYTE *miniset, int tmin, int tmax, int cx, int cy, BOOL setview, int noquad, int ldir);
void InitL5Dungeon();
void L5ClearFlags();
void L5firstRoom();
void L5drawRoom(int x, int y, int w, int h);
void L5roomGen(int x, int y, int w, int h, int dir);
BOOL L5checkRoom(int x, int y, int width, int height);
int L5GetArea();
void L5makeDungeon();
void L5makeDmt();
void L5AddWall();
int L5HWallOk(int i, int j);
int L5VWallOk(int i, int j);
void L5HorizWall(int i, int j, char p, int dx);
void L5VertWall(int i, int j, char p, int dy);
void L5tileFix();
#ifdef HELLFIRE
void drlg_l1_crypt_rndset(const BYTE *miniset, int rndper);
#endif
void DRLG_L5Subs();
void L5FillChambers();
void DRLG_L5GChamber(int sx, int sy, BOOL topflag, BOOL bottomflag, BOOL leftflag, BOOL rightflag);
void DRLG_L5GHall(int x1, int y1, int x2, int y2);
void DRLG_L5SetRoom(int rx1, int ry1);
#ifdef HELLFIRE
void drlg_l1_set_crypt_room(int rx1, int ry1);
void drlg_l1_set_corner_room(int rx1, int ry1);
#endif
void DRLG_L5FloodTVal();
void DRLG_L5FTVR(int i, int j, int x, int y, int d);
void DRLG_L5TransFix();
void DRLG_L5DirtFix();
void DRLG_L5CornerFix();
#ifdef HELLFIRE
void drlg_l1_crypt_pattern1(int rndper);
void drlg_l1_crypt_pattern2(int rndper);
void drlg_l1_crypt_pattern3(int rndper);

2090
Source/drlg_l3.cpp

File diff suppressed because it is too large Load Diff

24
Source/drlg_l3.h

@ -15,33 +15,9 @@ void FixL3HallofHeroes();
void DRLG_L3LockRec(int x, int y);
BOOL DRLG_L3Lockout();
void CreateL3Dungeon(DWORD rseed, int entry);
void DRLG_L3(int entry);
void InitL3Dungeon();
BOOL DRLG_L3FillRoom(int x1, int y1, int x2, int y2);
void DRLG_L3CreateBlock(int x, int y, int obs, int dir);
void DRLG_L3FloorArea(int x1, int y1, int x2, int y2);
void DRLG_L3FillDiags();
void DRLG_L3FillSingles();
void DRLG_L3FillStraights();
void DRLG_L3Edges();
int DRLG_L3GetFloorArea();
void DRLG_L3MakeMegas();
void DRLG_L3River();
void DRLG_L3Pool();
BOOL DRLG_L3SpawnEdge(int x, int y, int *totarea);
BOOL DRLG_L3Spawn(int x, int y, int *totarea);
void DRLG_L3PoolFix();
BOOL DRLG_L3PlaceMiniSet(const BYTE *miniset, int tmin, int tmax, int cx, int cy, BOOL setview, int ldir);
void DRLG_L3PlaceRndSet(const BYTE *miniset, int rndper);
#ifdef HELLFIRE
BOOLEAN drlg_l3_hive_rnd_piece(const BYTE *miniset, int rndper);
#endif
void DRLG_L3Wood();
BOOL WoodVertU(int i, int y);
BOOL WoodVertD(int i, int y);
BOOL WoodHorizL(int x, int j);
BOOL WoodHorizR(int x, int j);
void DRLG_L3Pass3();
void LoadL3Dungeon(char *sFileName, int vx, int vy);
void LoadPreL3Dungeon(char *sFileName, int vx, int vy);

1144
Source/drlg_l4.cpp

File diff suppressed because it is too large Load Diff

24
Source/drlg_l4.h

@ -32,30 +32,6 @@ BOOL IsDLLWall(char dd);
void L4FixRim();
void DRLG_L4GeneralFix();
void CreateL4Dungeon(DWORD rseed, int entry);
void DRLG_L4(int entry);
void DRLG_L4Shadows();
void InitL4Dungeon();
void L4makeDmt();
void L4AddWall();
int L4HWallOk(int i, int j);
int L4VWallOk(int i, int j);
void L4HorizWall(int i, int j, int dx);
void L4VertWall(int i, int j, int dy);
void L4tileFix();
void DRLG_L4Subs();
void L4makeDungeon();
void uShape();
long GetArea();
void L4firstRoom();
void L4drawRoom(int x, int y, int width, int height);
void L4roomGen(int x, int y, int w, int h, int dir);
BOOL L4checkRoom(int x, int y, int width, int height);
BOOL DRLG_L4PlaceMiniSet(const BYTE *miniset, int tmin, int tmax, int cx, int cy, BOOL setview, int ldir);
void DRLG_L4FloodTVal();
void DRLG_L4FTVR(int i, int j, int x, int y, int d);
void DRLG_L4TransFix();
void DRLG_L4Corners();
void DRLG_L4Pass3();
/* rdata */
extern const BYTE L4ConvTbl[16];

150
Source/engine.cpp

@ -40,7 +40,7 @@ __FINLINE int CelGetFrameSize(BYTE *pCelBuff, int nCel)
return SwapLE32(pFrameTable[nCel + 1]) - SwapLE32(pFrameTable[nCel]);
}
void CelDrawDatOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth)
void CelBlit(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth)
{
int w;
@ -139,7 +139,7 @@ void CelDrawDatOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth)
#endif
}
void CelDecodeOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth)
void CelDraw(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth)
{
int nDataSize;
BYTE *pRLEBytes;
@ -152,10 +152,10 @@ void CelDecodeOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth)
return;
pRLEBytes = CelGetFrame(pCelBuff, nCel, &nDataSize);
CelDrawDatOnly(&gpBuffer[sx + PitchTbl[sy]], pRLEBytes, nDataSize, nWidth);
CelBlit(&gpBuffer[sx + PitchTbl[sy]], pRLEBytes, nDataSize, nWidth);
}
void CelDecDatOnly(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth)
void CelBlitFrame(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth)
{
int nDataSize;
BYTE *pRLEBytes;
@ -168,14 +168,14 @@ void CelDecDatOnly(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth)
return;
pRLEBytes = CelGetFrame(pCelBuff, nCel, &nDataSize);
CelDrawDatOnly(pBuff, pRLEBytes, nDataSize, nWidth);
CelBlit(pBuff, pRLEBytes, nDataSize, nWidth);
}
/**
* @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8
* @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8
*/
void CelDrawHdrOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
void CelClippedDraw(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
{
BYTE *pRLEBytes;
DWORD *pFrameTable;
@ -205,7 +205,7 @@ void CelDrawHdrOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int Ce
else
nDataSize -= nDataStart;
CelDrawDatOnly(
CelBlit(
&gpBuffer[sx + PitchTbl[sy - 16 * CelSkip]],
pRLEBytes + nDataStart,
nDataSize,
@ -216,7 +216,7 @@ void CelDrawHdrOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int Ce
* @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8
* @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8
*/
void CelDecodeHdrOnly(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
void CelClippedBlit(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
{
BYTE *pRLEBytes;
DWORD *pFrameTable;
@ -246,10 +246,10 @@ void CelDecodeHdrOnly(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int Cel
else
nDataSize -= nDataStart;
CelDrawDatOnly(pBuff, pRLEBytes + nDataStart, nDataSize, nWidth);
CelBlit(pBuff, pRLEBytes + nDataStart, nDataSize, nWidth);
}
void CelDecDatLightOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth)
void CelBlitLight(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth)
{
int w;
BYTE *tbl;
@ -286,7 +286,7 @@ void CelDecDatLightOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWi
sub edx, eax
mov ecx, eax
push edx
call CelDecDatLightEntry
call CelBlitLightEntry
pop edx
pop ebx
or edx, edx
@ -307,7 +307,7 @@ void CelDecDatLightOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWi
/* Assembly Macro */
// clang-format off
__asm {
CelDecDatLightEntry:
CelBlitLightEntry:
shr cl, 1
jnb label5
mov dl, [esi]
@ -402,7 +402,7 @@ void CelDecDatLightOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWi
#endif
}
void CelDecDatLightTrans(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth)
void CelBlitLightTrans(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth)
{
int w;
BOOL shift;
@ -589,7 +589,7 @@ void CelDecDatLightTrans(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nW
#endif
}
void CelDecodeLightOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth)
void CelDrawLight(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth)
{
int nDataSize;
BYTE *pDecodeTo, *pRLEBytes;
@ -605,16 +605,16 @@ void CelDecodeLightOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth)
pDecodeTo = &gpBuffer[sx + PitchTbl[sy]];
if (light_table_index)
CelDecDatLightOnly(pDecodeTo, pRLEBytes, nDataSize, nWidth);
CelBlitLight(pDecodeTo, pRLEBytes, nDataSize, nWidth);
else
CelDrawDatOnly(pDecodeTo, pRLEBytes, nDataSize, nWidth);
CelBlit(pDecodeTo, pRLEBytes, nDataSize, nWidth);
}
/**
* @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8
* @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8
*/
void CelDecodeHdrLightOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
void CelClippedDrawLight(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
{
int nDataStart, nDataSize, nDataCap;
BYTE *pRLEBytes, *pDecodeTo;
@ -648,16 +648,16 @@ void CelDecodeHdrLightOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth,
pDecodeTo = &gpBuffer[sx + PitchTbl[sy - 16 * CelSkip]];
if (light_table_index)
CelDecDatLightOnly(pDecodeTo, pRLEBytes, nDataSize, nWidth);
CelBlitLight(pDecodeTo, pRLEBytes, nDataSize, nWidth);
else
CelDrawDatOnly(pDecodeTo, pRLEBytes, nDataSize, nWidth);
CelBlit(pDecodeTo, pRLEBytes, nDataSize, nWidth);
}
/**
* @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8
* @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8
*/
void CelDecodeHdrLightTrans(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
void CelClippedBlitLightTrans(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
{
int nDataStart, nDataSize, nDataCap;
BYTE *pRLEBytes;
@ -690,18 +690,18 @@ void CelDecodeHdrLightTrans(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, i
pRLEBytes += nDataStart;
if (cel_transparency_active)
CelDecDatLightTrans(pBuff, pRLEBytes, nDataSize, nWidth);
CelBlitLightTrans(pBuff, pRLEBytes, nDataSize, nWidth);
else if (light_table_index)
CelDecDatLightOnly(pBuff, pRLEBytes, nDataSize, nWidth);
CelBlitLight(pBuff, pRLEBytes, nDataSize, nWidth);
else
CelDrawDatOnly(pBuff, pRLEBytes, nDataSize, nWidth);
CelBlit(pBuff, pRLEBytes, nDataSize, nWidth);
}
/**
* @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8
* @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8
*/
void CelDrawHdrLightRed(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light)
void CelDrawLightRed(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light)
{
int nDataStart, nDataSize, nDataCap, w, idx;
BYTE *pRLEBytes, *dst, *tbl;
@ -814,7 +814,10 @@ void CelDrawHdrLightRed(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, in
#endif
}
void Cel2DecDatOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth)
/**
* @brief Same as CelBlit but checks for drawing outside the buffer
*/
void CelBlitSafe(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth)
{
int w;
@ -931,7 +934,7 @@ void Cel2DecDatOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth)
* @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8
* @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8
*/
void Cel2DrawHdrOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
void CelClippedDrawSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
{
BYTE *pRLEBytes;
DWORD *pFrameTable;
@ -961,7 +964,7 @@ void Cel2DrawHdrOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int C
else
nDataSize -= nDataStart;
Cel2DecDatOnly(
CelBlitSafe(
&gpBuffer[sx + PitchTbl[sy - 16 * CelSkip]],
pRLEBytes + nDataStart,
nDataSize,
@ -972,7 +975,7 @@ void Cel2DrawHdrOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int C
* @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8
* @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8
*/
void Cel2DecodeHdrOnly(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
void CelClippedBlitSafe(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
{
BYTE *pRLEBytes;
DWORD *pFrameTable;
@ -1002,10 +1005,13 @@ void Cel2DecodeHdrOnly(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int Ce
else
nDataSize -= nDataStart;
Cel2DecDatOnly(pBuff, pRLEBytes + nDataStart, nDataSize, nWidth);
CelBlitSafe(pBuff, pRLEBytes + nDataStart, nDataSize, nWidth);
}
void Cel2DecDatLightOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth)
/**
* @brief Same as CelBlitLight but checks for drawing outside the buffer
*/
void CelBlitLightSafe(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth)
{
int w;
BYTE *tbl;
@ -1173,7 +1179,10 @@ void Cel2DecDatLightOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nW
#endif
}
void Cel2DecDatLightTrans(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth)
/**
* @brief Same as CelBlitLightTrans but checks for drawing outside the buffer
*/
void CelBlitLightTransSafe(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth)
{
int w;
BOOL shift;
@ -1378,7 +1387,7 @@ void Cel2DecDatLightTrans(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int n
* @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8
* @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8
*/
void Cel2DecodeHdrLight(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
void CelDrawLightSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
{
int nDataStart, nDataSize, nDataCap;
BYTE *pRLEBytes, *pDecodeTo;
@ -1412,16 +1421,16 @@ void Cel2DecodeHdrLight(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, in
pDecodeTo = &gpBuffer[sx + PitchTbl[sy - 16 * CelSkip]];
if (light_table_index)
Cel2DecDatLightOnly(pDecodeTo, pRLEBytes, nDataSize, nWidth);
CelBlitLightSafe(pDecodeTo, pRLEBytes, nDataSize, nWidth);
else
Cel2DecDatOnly(pDecodeTo, pRLEBytes, nDataSize, nWidth);
CelBlitSafe(pDecodeTo, pRLEBytes, nDataSize, nWidth);
}
/**
* @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8
* @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8
*/
void Cel2DecodeLightTrans(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
void CelClippedBlitLightTransSafe(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
{
int nDataStart, nDataSize, nDataCap;
BYTE *pRLEBytes;
@ -1451,18 +1460,19 @@ void Cel2DecodeLightTrans(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int
pRLEBytes += nDataStart;
if (cel_transparency_active)
Cel2DecDatLightTrans(pBuff, pRLEBytes, nDataSize, nWidth);
CelBlitLightTransSafe(pBuff, pRLEBytes, nDataSize, nWidth);
else if (light_table_index)
Cel2DecDatLightOnly(pBuff, pRLEBytes, nDataSize, nWidth);
CelBlitLightSafe(pBuff, pRLEBytes, nDataSize, nWidth);
else
Cel2DecDatOnly(pBuff, pRLEBytes, nDataSize, nWidth);
CelBlitSafe(pBuff, pRLEBytes, nDataSize, nWidth);
}
/**
* @brief Same as CelDrawLightRed but checks for drawing outside the buffer
* @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8
* @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8
*/
void Cel2DrawHdrLightRed(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light)
void CelDrawLightRedSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light)
{
int nDataStart, nDataSize, nDataCap, w, idx;
BYTE *pRLEBytes, *dst, *tbl;
@ -1476,6 +1486,7 @@ void Cel2DrawHdrLightRed(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, i
return;
pFrameTable = (DWORD *)pCelBuff;
pRLEBytes = &pCelBuff[pFrameTable[nCel]];
nDataStart = *(WORD *)&pRLEBytes[CelSkip];
if (!nDataStart)
@ -1582,7 +1593,10 @@ void Cel2DrawHdrLightRed(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, i
#endif
}
void CelDecodeRect(BYTE *pBuff, int CelSkip, int hgt, int wdt, BYTE *pCelBuff, int nCel, int nWidth)
/**
* @brief Same as CelBlit but cropped to given width
*/
void CelBlitWidth(BYTE *pBuff, int CelSkip, int hgt, int wdt, BYTE *pCelBuff, int nCel, int nWidth)
{
BYTE *pRLEBytes, *dst, *end;
@ -1700,7 +1714,7 @@ void CelDecodeRect(BYTE *pBuff, int CelSkip, int hgt, int wdt, BYTE *pCelBuff, i
* @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8
* @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8
*/
void CelDecodeClr(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
void CelBlitOutline(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
{
int nDataStart, nDataSize, nDataCap, w;
BYTE *pRLEBytes, *dst;
@ -1838,10 +1852,11 @@ void CelDecodeClr(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth
}
/**
* @brief Same as CelBlitOutline but checks for drawing outside the buffer
* @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8
* @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8
*/
void CelDrawHdrClrHL(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
void CelBlitOutlineSafe(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
{
int nDataStart, nDataSize, nDataCap, w;
BYTE *pRLEBytes, *dst;
@ -2443,6 +2458,9 @@ DWORD LoadFileWithMem(const char *pszName, void *p)
return dwFileLen;
}
/**
* @brief Apply the color swaps to a CL2 sprite
*/
void Cl2ApplyTrans(BYTE *p, BYTE *ttbl, int nCel)
{
int i, nDataSize;
@ -2486,7 +2504,7 @@ void Cl2ApplyTrans(BYTE *p, BYTE *ttbl, int nCel)
* @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8
* @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8
*/
void Cl2DecodeFrm1(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
void Cl2Draw(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
{
BYTE *pRLEBytes;
DWORD *pFrameTable;
@ -2516,14 +2534,14 @@ void Cl2DecodeFrm1(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int Cel
if (!nDataSize)
nDataSize = pFrameTable[nCel + 1] - pFrameTable[nCel];
Cl2DecDatFrm1(
Cl2Blit(
&gpBuffer[sx + PitchTbl[sy - 16 * CelSkip]],
pRLEBytes + nDataStart,
nDataSize - nDataStart,
nWidth);
}
void Cl2DecDatFrm1(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth)
void Cl2Blit(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth)
{
#ifdef USE_ASM
__asm {
@ -2668,7 +2686,7 @@ void Cl2DecDatFrm1(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth)
* @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8
* @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8
*/
void Cl2DecodeFrm2(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
void Cl2DrawOutline(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
{
int nDataStart, nDataSize;
BYTE *pRLEBytes;
@ -2698,7 +2716,7 @@ void Cl2DecodeFrm2(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidt
if (!nDataSize)
nDataSize = pFrameTable[nCel + 1] - pFrameTable[nCel];
Cl2DecDatFrm2(
Cl2BlitOutline(
&gpBuffer[sx + PitchTbl[sy - 16 * CelSkip]],
pRLEBytes + nDataStart,
nDataSize - nDataStart,
@ -2706,7 +2724,7 @@ void Cl2DecodeFrm2(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidt
col);
}
void Cl2DecDatFrm2(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, char col)
void Cl2BlitOutline(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, char col)
{
#ifdef USE_ASM
__asm {
@ -2872,7 +2890,7 @@ void Cl2DecDatFrm2(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth,
* @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8
* @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8
*/
void Cl2DecodeFrm3(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light)
void Cl2DrawLightTbl(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light)
{
int nDataStart, nDataSize, idx, nSize;
BYTE *pRLEBytes, *pDecodeTo;
@ -2912,7 +2930,7 @@ void Cl2DecodeFrm3(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int Cel
if (light >= 4)
idx += (light - 1) << 8;
Cl2DecDatLightTbl1(
Cl2BlitLight(
pDecodeTo,
pRLEBytes,
nSize,
@ -2920,7 +2938,7 @@ void Cl2DecodeFrm3(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int Cel
&pLightTbl[idx]);
}
void Cl2DecDatLightTbl1(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, BYTE *pTable)
void Cl2BlitLight(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, BYTE *pTable)
{
#ifdef USE_ASM
__asm {
@ -3074,7 +3092,7 @@ void Cl2DecDatLightTbl1(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWi
* @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8
* @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8
*/
void Cl2DecodeLightTbl(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
void Cl2DrawLight(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
{
int nDataStart, nDataSize, nSize;
BYTE *pRLEBytes, *pDecodeTo;
@ -3109,16 +3127,16 @@ void Cl2DecodeLightTbl(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int
pDecodeTo = &gpBuffer[sx + PitchTbl[sy - 16 * CelSkip]];
if (light_table_index)
Cl2DecDatLightTbl1(pDecodeTo, pRLEBytes, nSize, nWidth, &pLightTbl[light_table_index * 256]);
Cl2BlitLight(pDecodeTo, pRLEBytes, nSize, nWidth, &pLightTbl[light_table_index * 256]);
else
Cl2DecDatFrm1(pDecodeTo, pRLEBytes, nSize, nWidth);
Cl2Blit(pDecodeTo, pRLEBytes, nSize, nWidth);
}
/**
* @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8
* @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8
*/
void Cl2DecodeFrm4(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
void Cl2DrawSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
{
BYTE *pRLEBytes;
DWORD *pFrameTable;
@ -3148,14 +3166,14 @@ void Cl2DecodeFrm4(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int Cel
if (!nDataSize)
nDataSize = pFrameTable[nCel + 1] - pFrameTable[nCel];
Cl2DecDatFrm4(
Cl2BlitSafe(
&gpBuffer[sx + PitchTbl[sy - 16 * CelSkip]],
pRLEBytes + nDataStart,
nDataSize - nDataStart,
nWidth);
}
void Cl2DecDatFrm4(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth)
void Cl2BlitSafe(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth)
{
#ifdef USE_ASM
__asm {
@ -3313,7 +3331,7 @@ void Cl2DecDatFrm4(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth)
* @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8
* @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8
*/
void Cl2DecodeClrHL(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
void Cl2DrawOutlineSafe(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
{
int nDataStart, nDataSize;
BYTE *pRLEBytes;
@ -3344,7 +3362,7 @@ void Cl2DecodeClrHL(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWid
nDataSize = pFrameTable[nCel + 1] - pFrameTable[nCel];
gpBufEnd -= BUFFER_WIDTH;
Cl2DecDatClrHL(
Cl2BlitOutlineSafe(
&gpBuffer[sx + PitchTbl[sy - 16 * CelSkip]],
pRLEBytes + nDataStart,
nDataSize - nDataStart,
@ -3353,7 +3371,7 @@ void Cl2DecodeClrHL(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWid
gpBufEnd += BUFFER_WIDTH;
}
void Cl2DecDatClrHL(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, char col)
void Cl2BlitOutlineSafe(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, char col)
{
#ifdef USE_ASM
__asm {
@ -3530,7 +3548,7 @@ void Cl2DecDatClrHL(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth,
* @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8
* @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8
*/
void Cl2DecodeFrm5(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light)
void Cl2DrawLightTblSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light)
{
int nDataStart, nDataSize, idx, nSize;
BYTE *pRLEBytes, *pDecodeTo;
@ -3570,7 +3588,7 @@ void Cl2DecodeFrm5(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int Cel
if (light >= 4)
idx += (light - 1) << 8;
Cl2DecDatLightTbl2(
Cl2BlitLightSafe(
pDecodeTo,
pRLEBytes,
nSize,
@ -3578,7 +3596,7 @@ void Cl2DecodeFrm5(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int Cel
&pLightTbl[idx]);
}
void Cl2DecDatLightTbl2(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, BYTE *pTable)
void Cl2BlitLightSafe(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, BYTE *pTable)
{
#ifdef USE_ASM
__asm {
@ -3745,7 +3763,7 @@ void Cl2DecDatLightTbl2(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWi
* @param CelSkip Skip lower parts of sprite, must be multiple of 2, max 8
* @param CelCap Amount of sprite to render from lower to upper, must be multiple of 2, max 8
*/
void Cl2DecodeFrm6(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
void Cl2DrawLightSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap)
{
int nDataStart, nDataSize, nSize;
BYTE *pRLEBytes, *pDecodeTo;
@ -3780,9 +3798,9 @@ void Cl2DecodeFrm6(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int Cel
pDecodeTo = &gpBuffer[sx + PitchTbl[sy - 16 * CelSkip]];
if (light_table_index)
Cl2DecDatLightTbl2(pDecodeTo, pRLEBytes, nSize, nWidth, &pLightTbl[light_table_index * 256]);
Cl2BlitLightSafe(pDecodeTo, pRLEBytes, nSize, nWidth, &pLightTbl[light_table_index * 256]);
else
Cl2DecDatFrm4(pDecodeTo, pRLEBytes, nSize, nWidth);
Cl2BlitSafe(pDecodeTo, pRLEBytes, nSize, nWidth);
}
void PlayInGameMovie(char *pszMovie)

72
Source/engine.h

@ -13,28 +13,28 @@ extern BOOL gbNotInView; // valid - if x/y are in bounds
__FINLINE BYTE *CelGetFrame(BYTE *pCelBuff, int nCel, int *nDataSize);
void CelDrawDatOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth);
void CelDecodeOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth);
void CelDecDatOnly(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth);
void CelDrawHdrOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void CelDecodeHdrOnly(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void CelDecDatLightOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth);
void CelDecDatLightTrans(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth);
void CelDecodeLightOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth);
void CelDecodeHdrLightOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void CelDecodeHdrLightTrans(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void CelDrawHdrLightRed(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light);
void Cel2DecDatOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth);
void Cel2DrawHdrOnly(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void Cel2DecodeHdrOnly(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void Cel2DecDatLightOnly(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth);
void Cel2DecDatLightTrans(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth);
void Cel2DecodeHdrLight(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void Cel2DecodeLightTrans(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void Cel2DrawHdrLightRed(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light);
void CelDecodeRect(BYTE *pBuff, int always_0, int hgt, int wdt, BYTE *pCelBuff, int nCel, int nWidth);
void CelDecodeClr(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void CelDrawHdrClrHL(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void CelBlit(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth);
void CelDraw(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth);
void CelBlitFrame(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth);
void CelClippedDraw(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void CelClippedBlit(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void CelBlitLight(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth);
void CelBlitLightTrans(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth);
void CelDrawLight(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth);
void CelClippedDrawLight(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void CelClippedBlitLightTrans(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void CelDrawLightRed(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light);
void CelBlitSafe(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth);
void CelClippedDrawSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void CelClippedBlitSafe(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void CelBlitLightSafe(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth);
void CelBlitLightTransSafe(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth);
void CelDrawLightSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void CelClippedBlitLightTransSafe(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void CelDrawLightRedSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light);
void CelBlitWidth(BYTE *pBuff, int always_0, int hgt, int wdt, BYTE *pCelBuff, int nCel, int nWidth);
void CelBlitOutline(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void CelBlitOutlineSafe(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void ENG_set_pixel(int sx, int sy, BYTE col);
void engine_draw_pixel(int sx, int sy);
void DrawLine(int x0, int y0, int x1, int y1, BYTE col);
@ -48,20 +48,20 @@ void mem_free_dbg(void *p);
BYTE *LoadFileInMem(char *pszName, DWORD *pdwFileLen);
DWORD LoadFileWithMem(const char *pszName, void *p);
void Cl2ApplyTrans(BYTE *p, BYTE *ttbl, int nCel);
void Cl2DecodeFrm1(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void Cl2DecDatFrm1(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth);
void Cl2DecodeFrm2(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void Cl2DecDatFrm2(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, char col);
void Cl2DecodeFrm3(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light);
void Cl2DecDatLightTbl1(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, BYTE *pTable);
void Cl2DecodeLightTbl(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void Cl2DecodeFrm4(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void Cl2DecDatFrm4(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth);
void Cl2DecodeClrHL(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void Cl2DecDatClrHL(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, char col);
void Cl2DecodeFrm5(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light);
void Cl2DecDatLightTbl2(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, BYTE *pTable);
void Cl2DecodeFrm6(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void Cl2Draw(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void Cl2Blit(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth);
void Cl2DrawOutline(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void Cl2BlitOutline(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, char col);
void Cl2DrawLightTbl(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light);
void Cl2BlitLight(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, BYTE *pTable);
void Cl2DrawLight(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void Cl2DrawSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void Cl2BlitSafe(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth);
void Cl2DrawOutlineSafe(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void Cl2BlitOutlineSafe(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, char col);
void Cl2DrawLightTblSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap, char light);
void Cl2BlitLightSafe(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, BYTE *pTable);
void Cl2DrawLightSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap);
void PlayInGameMovie(char *pszMovie);
/* rdata */

16
Source/error.cpp

@ -85,21 +85,21 @@ void DrawDiabloMsg()
int i, len, off, width, sx, sy;
BYTE c;
CelDecodeOnly(165, 318, pSTextSlidCels, 1, 12);
CelDecodeOnly(591, 318, pSTextSlidCels, 4, 12);
CelDecodeOnly(165, 366, pSTextSlidCels, 2, 12);
CelDecodeOnly(591, 366, pSTextSlidCels, 3, 12);
CelDraw(165, 318, pSTextSlidCels, 1, 12);
CelDraw(591, 318, pSTextSlidCels, 4, 12);
CelDraw(165, 366, pSTextSlidCels, 2, 12);
CelDraw(591, 366, pSTextSlidCels, 3, 12);
sx = 173;
for (i = 0; i < 35; i++) {
CelDecodeOnly(sx, 318, pSTextSlidCels, 5, 12);
CelDecodeOnly(sx, 366, pSTextSlidCels, 7, 12);
CelDraw(sx, 318, pSTextSlidCels, 5, 12);
CelDraw(sx, 366, pSTextSlidCels, 7, 12);
sx += 12;
}
sy = 330;
for (i = 0; i < 3; i++) {
CelDecodeOnly(165, sy, pSTextSlidCels, 6, 12);
CelDecodeOnly(591, sy, pSTextSlidCels, 8, 12);
CelDraw(165, sy, pSTextSlidCels, 6, 12);
CelDraw(591, sy, pSTextSlidCels, 8, 12);
sy += 12;
}

18
Source/gmenu.cpp

@ -59,7 +59,7 @@ void gmenu_print_text(int x, int y, char *pszStr)
c = gbFontTransTbl[(BYTE)*pszStr++];
c = lfontframe[c];
if (c)
CelDecodeLightOnly(x, y, BigTGold_cel, c, 46);
CelDrawLight(x, y, BigTGold_cel, c, 46);
x += lfontkern[c] + 2;
}
}
@ -118,6 +118,7 @@ void gmenu_call_proc(TMenuItem *pItem, void (*gmFunc)(TMenuItem *))
sgCurrentMenuIdx++;
}
}
// BUGFIX: OOB access when sgCurrentMenuIdx is 0; should be set to NULL instead.
sgpCurrItem = &sgpCurrentMenu[sgCurrentMenuIdx - 1];
gmenu_up_down(TRUE);
}
@ -161,7 +162,6 @@ void gmenu_draw()
if (sgpCurrentMenu) {
if (dword_63447C)
dword_63447C(sgpCurrentMenu);
#ifdef HELLFIRE
ticks = GetTickCount();
if ((int)(ticks - LogoAnim_tick) > 25) {
@ -170,9 +170,9 @@ void gmenu_draw()
LogoAnim_frame = 1;
LogoAnim_tick = ticks;
}
CelDecodeOnly((SCREEN_WIDTH - 430) / 2 + SCREEN_X, 102 + SCREEN_Y, sgpLogo, LogoAnim_frame, 430);
CelDraw((SCREEN_WIDTH - 430) / 2 + SCREEN_X, 102 + SCREEN_Y, sgpLogo, LogoAnim_frame, 430);
#else
CelDecodeOnly((SCREEN_WIDTH - 296) / 2 + SCREEN_X, 102 + SCREEN_Y, sgpLogo, 1, 296);
CelDraw((SCREEN_WIDTH - 296) / 2 + SCREEN_X, 102 + SCREEN_Y, sgpLogo, 1, 296);
#endif
y = 160 + SCREEN_Y;
i = sgpCurrentMenu;
@ -206,9 +206,9 @@ void gmenu_draw_menu_item(TMenuItem *pItem, int y)
if (pItem->dwFlags & GMENU_SLIDER) {
x = 16 + w / 2 + SCREEN_X;
#ifdef HELLFIRE
CelDecodeOnly(x, y - 10, optbar_cel, 1, 287);
CelDraw(x, y - 10, optbar_cel, 1, 287);
#else
CelDecodeOnly(x, t - 8, optbar_cel, 1, 287);
CelDraw(x, t - 8, optbar_cel, 1, 287);
#endif
step = pItem->dwFlags & 0xFFF;
nSteps = (pItem->dwFlags & 0xFFF000) >> 12;
@ -220,14 +220,14 @@ void gmenu_draw_menu_item(TMenuItem *pItem, int y)
#else
gmenu_clear_buffer(x + 2, t - 10, pos + 13, 28);
#endif
CelDecodeOnly(x + 2 + pos, y - 12, option_cel, 1, 27);
CelDraw(x + 2 + pos, y - 12, option_cel, 1, 27);
}
x = SCREEN_WIDTH / 2 - w / 2 + SCREEN_X;
light_table_index = (pItem->dwFlags & GMENU_ENABLED) ? 0 : 15;
gmenu_print_text(x, y, pItem->pszStr);
if (pItem == sgpCurrItem) {
CelDecodeOnly(x - 54, y + 1, PentSpin_cel, PentSpin_frame, 48);
CelDecodeOnly(x + 4 + w, y + 1, PentSpin_cel, PentSpin_frame, 48);
CelDraw(x - 54, y + 1, PentSpin_cel, PentSpin_frame, 48);
CelDraw(x + 4 + w, y + 1, PentSpin_cel, PentSpin_frame, 48);
}
}

2
Source/interfac.cpp

@ -36,7 +36,7 @@ void DrawCutscene()
DWORD i;
lock_buf(1);
CelDecodeOnly(SCREEN_X, 480 + SCREEN_Y - 1, (BYTE *)sgpBackCel, 1, 640);
CelDraw(SCREEN_X, 480 + SCREEN_Y - 1, (BYTE *)sgpBackCel, 1, 640);
for (i = 0; i < sgdwProgress; i++) {
DrawProgress(

136
Source/inv.cpp

@ -181,7 +181,7 @@ void DrawInv()
int frame, frame_width, colour, screen_x, screen_y, i, j, ii;
BYTE *pBuff;
CelDecodeOnly(PANEL_RIGHT, 351 + SCREEN_Y, pInvCels, 1, 320);
CelDraw(PANEL_RIGHT, 351 + SCREEN_Y, pInvCels, 1, 320);
if (plr[myplr].InvBody[INVLOC_HEAD]._itype != ITYPE_NONE) {
InvDrawSlotBack(PANEL_RIGHT + 133, 59 + SCREEN_Y, 2 * INV_SLOT_SIZE_PX, 2 * INV_SLOT_SIZE_PX);
@ -200,32 +200,32 @@ void DrawInv()
#ifdef HELLFIRE
if (frame <= 179) {
#endif
CelDecodeClr(colour, PANEL_RIGHT + 133, 59 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8);
CelBlitOutline(colour, PANEL_RIGHT + 133, 59 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8);
#ifdef HELLFIRE
} else {
CelDecodeClr(colour, PANEL_RIGHT + 133, 59 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8);
CelBlitOutline(colour, PANEL_RIGHT + 133, 59 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8);
}
#endif
}
if (plr[myplr].InvBody[INVLOC_HEAD]._iStatFlag) {
#ifdef HELLFIRE
if (frame <= 179) {
#endif
CelDrawHdrOnly(PANEL_RIGHT + 133, 59 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8);
if (frame <= 179) {
CelClippedDraw(PANEL_RIGHT + 133, 59 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8);
#ifdef HELLFIRE
} else {
CelDrawHdrOnly(PANEL_RIGHT + 133, 59 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8);
CelClippedDraw(PANEL_RIGHT + 133, 59 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8);
}
#endif
} else {
#ifdef HELLFIRE
if (frame <= 179) {
#endif
CelDrawHdrLightRed(PANEL_RIGHT + 133, 59 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8, 1);
CelDrawLightRed(PANEL_RIGHT + 133, 59 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8, 1);
#ifdef HELLFIRE
} else {
CelDrawHdrLightRed(PANEL_RIGHT + 133, 59 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8, 1);
CelDrawLightRed(PANEL_RIGHT + 133, 59 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8, 1);
}
#endif
}
@ -248,10 +248,10 @@ void DrawInv()
#ifdef HELLFIRE
if (frame <= 179) {
#endif
CelDecodeClr(colour, PANEL_RIGHT + 48, 205 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8);
CelBlitOutline(colour, PANEL_RIGHT + 48, 205 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8);
#ifdef HELLFIRE
} else {
CelDecodeClr(colour, PANEL_RIGHT + 48, 205 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8);
CelBlitOutline(colour, PANEL_RIGHT + 48, 205 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8);
}
#endif
}
@ -260,20 +260,20 @@ void DrawInv()
#ifdef HELLFIRE
if (frame <= 179) {
#endif
CelDrawHdrOnly(PANEL_RIGHT + 48, 205 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8);
CelClippedDraw(PANEL_RIGHT + 48, 205 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8);
#ifdef HELLFIRE
} else {
CelDrawHdrOnly(PANEL_RIGHT + 48, 205 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8);
CelClippedDraw(PANEL_RIGHT + 48, 205 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8);
}
#endif
} else {
#ifdef HELLFIRE
if (frame <= 179) {
#endif
CelDrawHdrLightRed(PANEL_RIGHT + 48, 205 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8, 1);
CelDrawLightRed(PANEL_RIGHT + 48, 205 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8, 1);
#ifdef HELLFIRE
CelDrawLightRed(PANEL_RIGHT + 48, 205 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8, 1);
} else {
CelDrawHdrLightRed(PANEL_RIGHT + 48, 205 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8, 1);
}
#endif
}
@ -296,10 +296,10 @@ void DrawInv()
#ifdef HELLFIRE
if (frame <= 179) {
#endif
CelDecodeClr(colour, PANEL_RIGHT + 249, 205 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8);
CelBlitOutline(colour, PANEL_RIGHT + 249, 205 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8);
#ifdef HELLFIRE
} else {
CelDecodeClr(colour, PANEL_RIGHT + 249, 205 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8);
CelBlitOutline(colour, PANEL_RIGHT + 249, 205 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8);
}
#endif
}
@ -308,20 +308,20 @@ void DrawInv()
#ifdef HELLFIRE
if (frame <= 179) {
#endif
CelDrawHdrOnly(PANEL_RIGHT + 249, 205 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8);
CelClippedDraw(PANEL_RIGHT + 249, 205 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8);
#ifdef HELLFIRE
} else {
CelDrawHdrOnly(PANEL_RIGHT + 249, 205 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8);
CelClippedDraw(PANEL_RIGHT + 249, 205 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8);
}
#endif
} else {
#ifdef HELLFIRE
if (frame <= 179) {
#endif
CelDrawHdrLightRed(PANEL_RIGHT + 249, 205 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8, 1);
CelDrawLightRed(PANEL_RIGHT + 249, 205 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8, 1);
#ifdef HELLFIRE
} else {
CelDrawHdrLightRed(PANEL_RIGHT + 249, 205 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8, 1);
CelDrawLightRed(PANEL_RIGHT + 249, 205 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8, 1);
}
#endif
}
@ -344,10 +344,10 @@ void DrawInv()
#ifdef HELLFIRE
if (frame <= 179) {
#endif
CelDecodeClr(colour, PANEL_RIGHT + 205, 60 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8);
CelBlitOutline(colour, PANEL_RIGHT + 205, 60 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8);
#ifdef HELLFIRE
} else {
CelDecodeClr(colour, PANEL_RIGHT + 205, 60 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8);
CelBlitOutline(colour, PANEL_RIGHT + 205, 60 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8);
}
#endif
}
@ -356,20 +356,20 @@ void DrawInv()
#ifdef HELLFIRE
if (frame <= 179) {
#endif
CelDrawHdrOnly(PANEL_RIGHT + 205, 60 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8);
CelClippedDraw(PANEL_RIGHT + 205, 60 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8);
#ifdef HELLFIRE
} else {
CelDrawHdrOnly(PANEL_RIGHT + 205, 60 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8);
CelClippedDraw(PANEL_RIGHT + 205, 60 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8);
}
#endif
} else {
#ifdef HELLFIRE
if (frame <= 179) {
#endif
CelDrawHdrLightRed(PANEL_RIGHT + 205, 60 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8, 1);
CelDrawLightRed(PANEL_RIGHT + 205, 60 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8, 1);
#ifdef HELLFIRE
} else {
CelDrawHdrLightRed(PANEL_RIGHT + 205, 60 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8, 1);
CelDrawLightRed(PANEL_RIGHT + 205, 60 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8, 1);
}
#endif
}
@ -395,10 +395,10 @@ void DrawInv()
#ifdef HELLFIRE
if (frame <= 179) {
#endif
CelDecodeClr(colour, screen_x, screen_y, pCursCels, frame, frame_width, 0, 8);
CelBlitOutline(colour, screen_x, screen_y, pCursCels, frame, frame_width, 0, 8);
#ifdef HELLFIRE
} else {
CelDecodeClr(colour, screen_x, screen_y, pCursCels2, frame - 179, frame_width, 0, 8);
CelBlitOutline(colour, screen_x, screen_y, pCursCels2, frame - 179, frame_width, 0, 8);
}
#endif
}
@ -407,20 +407,20 @@ void DrawInv()
#ifdef HELLFIRE
if (frame <= 179) {
#endif
CelDrawHdrOnly(screen_x, screen_y, pCursCels, frame, frame_width, 0, 8);
CelClippedDraw(screen_x, screen_y, pCursCels, frame, frame_width, 0, 8);
#ifdef HELLFIRE
} else {
CelDrawHdrOnly(screen_x, screen_y, pCursCels2, frame - 179, frame_width, 0, 8);
CelClippedDraw(screen_x, screen_y, pCursCels2, frame - 179, frame_width, 0, 8);
}
#endif
} else {
#ifdef HELLFIRE
if (frame <= 179) {
#endif
CelDrawHdrLightRed(screen_x, screen_y, pCursCels, frame, frame_width, 0, 8, 1);
CelDrawLightRed(screen_x, screen_y, pCursCels, frame, frame_width, 0, 8, 1);
#ifdef HELLFIRE
} else {
CelDrawHdrLightRed(screen_x, screen_y, pCursCels2, frame - 179, frame_width, 0, 8, 1);
CelDrawLightRed(screen_x, screen_y, pCursCels2, frame - 179, frame_width, 0, 8, 1);
}
#endif
}
@ -441,10 +441,10 @@ void DrawInv()
#ifdef HELLFIRE
if (frame <= 179) {
#endif
CelDecodeHdrLightTrans(pBuff, pCursCels, frame, frame_width, 0, 8);
CelClippedBlitLightTrans(pBuff, pCursCels, frame, frame_width, 0, 8);
#ifdef HELLFIRE
} else {
CelDecodeHdrLightTrans(pBuff, pCursCels2, frame - 179, frame_width, 0, 8);
CelClippedBlitLightTrans(pBuff, pCursCels2, frame - 179, frame_width, 0, 8);
}
#endif
@ -474,10 +474,10 @@ void DrawInv()
#ifdef HELLFIRE
if (frame <= 179) {
#endif
CelDecodeClr(colour, screen_x, screen_y, pCursCels, frame, frame_width, 0, 8);
CelBlitOutline(colour, screen_x, screen_y, pCursCels, frame, frame_width, 0, 8);
#ifdef HELLFIRE
} else {
CelDecodeClr(colour, screen_x, screen_y, pCursCels2, frame - 179, frame_width, 0, 8);
CelBlitOutline(colour, screen_x, screen_y, pCursCels2, frame - 179, frame_width, 0, 8);
}
#endif
}
@ -486,20 +486,20 @@ void DrawInv()
#ifdef HELLFIRE
if (frame <= 179) {
#endif
CelDrawHdrOnly(screen_x, screen_y, pCursCels, frame, frame_width, 0, 8);
CelClippedDraw(screen_x, screen_y, pCursCels, frame, frame_width, 0, 8);
#ifdef HELLFIRE
} else {
CelDrawHdrOnly(screen_x, screen_y, pCursCels2, frame - 179, frame_width, 0, 8);
CelClippedDraw(screen_x, screen_y, pCursCels2, frame - 179, frame_width, 0, 8);
}
#endif
} else {
#ifdef HELLFIRE
if (frame <= 179) {
#endif
CelDrawHdrLightRed(screen_x, screen_y, pCursCels, frame, frame_width, 0, 8, 1);
CelDrawLightRed(screen_x, screen_y, pCursCels, frame, frame_width, 0, 8, 1);
#ifdef HELLFIRE
} else {
CelDrawHdrLightRed(screen_x, screen_y, pCursCels2, frame - 179, frame_width, 0, 8, 1);
CelDrawLightRed(screen_x, screen_y, pCursCels2, frame - 179, frame_width, 0, 8, 1);
}
#endif
}
@ -522,10 +522,10 @@ void DrawInv()
#ifdef HELLFIRE
if (frame <= 179) {
#endif
CelDecodeClr(colour, PANEL_RIGHT + 133, 160 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8);
CelBlitOutline(colour, PANEL_RIGHT + 133, 160 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8);
#ifdef HELLFIRE
} else {
CelDecodeClr(colour, PANEL_RIGHT + 133, 160 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8);
CelBlitOutline(colour, PANEL_RIGHT + 133, 160 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8);
}
#endif
}
@ -534,20 +534,20 @@ void DrawInv()
#ifdef HELLFIRE
if (frame <= 179) {
#endif
CelDrawHdrOnly(PANEL_RIGHT + 133, 160 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8);
CelClippedDraw(PANEL_RIGHT + 133, 160 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8);
#ifdef HELLFIRE
} else {
CelDrawHdrOnly(PANEL_RIGHT + 133, 160 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8);
CelClippedDraw(PANEL_RIGHT + 133, 160 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8);
}
#endif
} else {
#ifdef HELLFIRE
if (frame <= 179) {
#endif
CelDrawHdrLightRed(PANEL_RIGHT + 133, 160 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8, 1);
CelDrawLightRed(PANEL_RIGHT + 133, 160 + SCREEN_Y, pCursCels, frame, frame_width, 0, 8, 1);
#ifdef HELLFIRE
} else {
CelDrawHdrLightRed(PANEL_RIGHT + 133, 160 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8, 1);
CelDrawLightRed(PANEL_RIGHT + 133, 160 + SCREEN_Y, pCursCels2, frame - 179, frame_width, 0, 8, 1);
}
#endif
}
@ -584,14 +584,14 @@ void DrawInv()
#ifdef HELLFIRE
if (frame <= 179) {
#endif
CelDecodeClr(
colour,
InvRect[j + SLOTXY_INV_FIRST].X + SCREEN_X,
InvRect[j + SLOTXY_INV_FIRST].Y + SCREEN_Y - 1,
pCursCels, frame, frame_width, 0, 8);
CelBlitOutline(
colour,
InvRect[j + SLOTXY_INV_FIRST].X + SCREEN_X,
InvRect[j + SLOTXY_INV_FIRST].Y + SCREEN_Y - 1,
pCursCels, frame, frame_width, 0, 8);
#ifdef HELLFIRE
} else {
CelDecodeClr(
CelBlitOutline(
colour,
InvRect[j + SLOTXY_INV_FIRST].X + SCREEN_Y,
InvRect[j + SLOTXY_INV_FIRST].Y + SCREEN_Y - 1,
@ -604,13 +604,13 @@ void DrawInv()
#ifdef HELLFIRE
if (frame <= 179) {
#endif
CelDrawHdrOnly(
InvRect[j + SLOTXY_INV_FIRST].X + SCREEN_X,
InvRect[j + SLOTXY_INV_FIRST].Y + SCREEN_Y - 1,
pCursCels, frame, frame_width, 0, 8);
CelClippedDraw(
InvRect[j + SLOTXY_INV_FIRST].X + SCREEN_X,
InvRect[j + SLOTXY_INV_FIRST].Y + SCREEN_Y - 1,
pCursCels, frame, frame_width, 0, 8);
#ifdef HELLFIRE
} else {
CelDrawHdrOnly(
CelClippedDraw(
InvRect[j + SLOTXY_INV_FIRST].X + SCREEN_Y,
InvRect[j + SLOTXY_INV_FIRST].Y + SCREEN_Y - 1,
pCursCels2, frame - 179, frame_width, 0, 8);
@ -620,13 +620,13 @@ void DrawInv()
#ifdef HELLFIRE
if (frame <= 179) {
#endif
CelDrawHdrLightRed(
InvRect[j + SLOTXY_INV_FIRST].X + SCREEN_X,
InvRect[j + SLOTXY_INV_FIRST].Y + SCREEN_Y - 1,
pCursCels, frame, frame_width, 0, 8, 1);
CelDrawLightRed(
InvRect[j + SLOTXY_INV_FIRST].X + SCREEN_X,
InvRect[j + SLOTXY_INV_FIRST].Y + SCREEN_Y - 1,
pCursCels, frame, frame_width, 0, 8, 1);
#ifdef HELLFIRE
} else {
CelDrawHdrLightRed(
CelDrawLightRed(
InvRect[j + SLOTXY_INV_FIRST].X + SCREEN_Y,
InvRect[j + SLOTXY_INV_FIRST].Y + SCREEN_Y - 1,
pCursCels2, frame - 179, frame_width, 0, 8, 1);
@ -666,10 +666,10 @@ void DrawInvBelt()
#ifdef HELLFIRE
if (frame <= 179)
#endif
CelDecodeClr(colour, InvRect[i + 65].X + 64, InvRect[i + 65].Y + 159, pCursCels, frame, frame_width, 0, 8);
CelBlitOutline(colour, InvRect[i + 65].X + 64, InvRect[i + 65].Y + 159, pCursCels, frame, frame_width, 0, 8);
#ifdef HELLFIRE
else
CelDecodeClr(colour, InvRect[i + 65].X + 64, InvRect[i + 65].Y + 159, pCursCels2, frame - 179, frame_width, 0, 8);
CelBlitOutline(colour, InvRect[i + 65].X + 64, InvRect[i + 65].Y + 159, pCursCels2, frame - 179, frame_width, 0, 8);
#endif
}
@ -677,19 +677,19 @@ void DrawInvBelt()
#ifdef HELLFIRE
if (frame <= 179)
#endif
CelDrawHdrOnly(InvRect[i + 65].X + 64, InvRect[i + 65].Y + 159, pCursCels, frame, frame_width, 0, 8);
CelClippedDraw(InvRect[i + 65].X + 64, InvRect[i + 65].Y + 159, pCursCels, frame, frame_width, 0, 8);
#ifdef HELLFIRE
else
CelDrawHdrOnly(InvRect[i + 65].X + 64, InvRect[i + 65].Y + 159, pCursCels2, frame - 179, frame_width, 0, 8);
CelClippedDraw(InvRect[i + 65].X + 64, InvRect[i + 65].Y + 159, pCursCels2, frame - 179, frame_width, 0, 8);
#endif
} else {
#ifdef HELLFIRE
if (frame <= 179)
#endif
CelDrawHdrLightRed(InvRect[i + 65].X + 64, InvRect[i + 65].Y + 159, pCursCels, frame, frame_width, 0, 8, 1);
CelDrawLightRed(InvRect[i + 65].X + 64, InvRect[i + 65].Y + 159, pCursCels, frame, frame_width, 0, 8, 1);
#ifdef HELLFIRE
else
CelDrawHdrLightRed(InvRect[i + 65].X + 64, InvRect[i + 65].Y + 159, pCursCels2, frame - 179, frame_width, 0, 8, 1);
CelDrawLightRed(InvRect[i + 65].X + 64, InvRect[i + 65].Y + 159, pCursCels2, frame - 179, frame_width, 0, 8, 1);
#endif
}

2
Source/items.cpp

@ -3520,7 +3520,7 @@ void PrintItemPower(char plidx, ItemStruct *x)
void DrawUTextBack()
{
CelDecodeOnly(88, 487, pSTextBoxCels, 1, 271);
CelDraw(88, 487, pSTextBoxCels, 1, 271);
#define TRANS_RECT_X 27
#define TRANS_RECT_Y 28

2
Source/minitext.cpp

@ -66,7 +66,7 @@ void InitQTextMsg(int m)
void DrawQTextBack()
{
CelDecodeOnly(88, 487, pTextBoxCels, 1, 591);
CelDraw(88, 487, pTextBoxCels, 1, 591);
#define TRANS_RECT_X 27
#define TRANS_RECT_Y 28

6
Source/quests.cpp

@ -806,7 +806,7 @@ void PrintQLString(int x, int y, BOOL cjustflag, char *str, int col)
off += k;
}
if (qline == y) {
CelDecodeOnly(cjustflag ? x + k + 76 : x + 76, s + 205, pSPentSpn2Cels, ALLQUESTS, 12);
CelDraw(cjustflag ? x + k + 76 : x + 76, s + 205, pSPentSpn2Cels, ALLQUESTS, 12);
}
for (i = 0; i < len; i++) {
c = fontframe[gbFontTransTbl[(BYTE)str[i]]];
@ -817,7 +817,7 @@ void PrintQLString(int x, int y, BOOL cjustflag, char *str, int col)
off += fontkern[c] + 1;
}
if (qline == y) {
CelDecodeOnly(cjustflag ? x + k + 100 : 340 - x, s + 205, pSPentSpn2Cels, ALLQUESTS, 12);
CelDraw(cjustflag ? x + k + 100 : 340 - x, s + 205, pSPentSpn2Cels, ALLQUESTS, 12);
}
}
@ -826,7 +826,7 @@ void DrawQuestLog()
int y, i;
PrintQLString(0, 2, TRUE, "Quest Log", 3);
CelDecodeOnly(64, 511, pQLogCel, 1, 320);
CelDraw(64, 511, pQLogCel, 1, 320);
y = qtopline;
for (i = 0; i < numqlines; i++) {
PrintQLString(0, y, TRUE, questlist[qlist[i]]._qlstr, 0);

144
Source/scrollrt.cpp

@ -156,14 +156,14 @@ static void scrollrt_draw_cursor_item()
if (!plr[myplr].HoldItem._iStatFlag) {
col = PAL16_RED + 5;
}
CelDrawHdrClrHL(col, mx + SCREEN_X, my + cursH + SCREEN_Y - 1, pCursCels, pcurs, cursW, 0, 8);
CelBlitOutlineSafe(col, mx + SCREEN_X, my + cursH + SCREEN_Y - 1, pCursCels, pcurs, cursW, 0, 8);
if (col != PAL16_RED + 5) {
Cel2DrawHdrOnly(mx + SCREEN_X, my + cursH + SCREEN_Y - 1, pCursCels, pcurs, cursW, 0, 8);
CelClippedDrawSafe(mx + SCREEN_X, my + cursH + SCREEN_Y - 1, pCursCels, pcurs, cursW, 0, 8);
} else {
Cel2DrawHdrLightRed(mx + SCREEN_X, my + cursH + SCREEN_Y - 1, pCursCels, pcurs, cursW, 0, 8, 1);
CelDrawLightRedSafe(mx + SCREEN_X, my + cursH + SCREEN_Y - 1, pCursCels, pcurs, cursW, 0, 8, 1);
}
} else {
Cel2DrawHdrOnly(mx + SCREEN_X, my + cursH + SCREEN_Y - 1, pCursCels, pcurs, cursW, 0, 8);
CelClippedDrawSafe(mx + SCREEN_X, my + cursH + SCREEN_Y - 1, pCursCels, pcurs, cursW, 0, 8);
}
}
@ -199,11 +199,11 @@ void DrawMissile(int x, int y, int sx, int sy, int CelSkip, int CelCap, BOOL pre
mx = sx + m->_mixoff - m->_miAnimWidth2;
my = sy + m->_miyoff;
if (m->_miUniqTrans)
Cl2DecodeFrm3(mx, my, m->_miAnimData, m->_miAnimFrame, m->_miAnimWidth, CelSkip, CelCap, m->_miUniqTrans + 3);
Cl2DrawLightTbl(mx, my, m->_miAnimData, m->_miAnimFrame, m->_miAnimWidth, CelSkip, CelCap, m->_miUniqTrans + 3);
else if (m->_miLightFlag)
Cl2DecodeLightTbl(mx, my, m->_miAnimData, m->_miAnimFrame, m->_miAnimWidth, CelSkip, CelCap);
Cl2DrawLight(mx, my, m->_miAnimData, m->_miAnimFrame, m->_miAnimWidth, CelSkip, CelCap);
else
Cl2DecodeFrm1(mx, my, m->_miAnimData, m->_miAnimFrame, m->_miAnimWidth, CelSkip, CelCap);
Cl2Draw(mx, my, m->_miAnimData, m->_miAnimFrame, m->_miAnimWidth, CelSkip, CelCap);
}
}
} else {
@ -227,11 +227,11 @@ void DrawMissile(int x, int y, int sx, int sy, int CelSkip, int CelCap, BOOL pre
mx = sx + m->_mixoff - m->_miAnimWidth2;
my = sy + m->_miyoff;
if (m->_miUniqTrans)
Cl2DecodeFrm3(mx, my, m->_miAnimData, m->_miAnimFrame, m->_miAnimWidth, CelSkip, CelCap, m->_miUniqTrans + 3);
Cl2DrawLightTbl(mx, my, m->_miAnimData, m->_miAnimFrame, m->_miAnimWidth, CelSkip, CelCap, m->_miUniqTrans + 3);
else if (m->_miLightFlag)
Cl2DecodeLightTbl(mx, my, m->_miAnimData, m->_miAnimFrame, m->_miAnimWidth, CelSkip, CelCap);
Cl2DrawLight(mx, my, m->_miAnimData, m->_miAnimFrame, m->_miAnimWidth, CelSkip, CelCap);
else
Cl2DecodeFrm1(mx, my, m->_miAnimData, m->_miAnimFrame, m->_miAnimWidth, CelSkip, CelCap);
Cl2Draw(mx, my, m->_miAnimData, m->_miAnimFrame, m->_miAnimWidth, CelSkip, CelCap);
}
}
}
@ -268,11 +268,11 @@ void DrawClippedMissile(int x, int y, int sx, int sy, int CelSkip, int CelCap, B
mx = sx + m->_mixoff - m->_miAnimWidth2;
my = sy + m->_miyoff;
if (m->_miUniqTrans)
Cl2DecodeFrm5(mx, my, m->_miAnimData, m->_miAnimFrame, m->_miAnimWidth, CelSkip, CelCap, m->_miUniqTrans + 3);
Cl2DrawLightTblSafe(mx, my, m->_miAnimData, m->_miAnimFrame, m->_miAnimWidth, CelSkip, CelCap, m->_miUniqTrans + 3);
else if (m->_miLightFlag)
Cl2DecodeFrm6(mx, my, m->_miAnimData, m->_miAnimFrame, m->_miAnimWidth, CelSkip, CelCap);
Cl2DrawLightSafe(mx, my, m->_miAnimData, m->_miAnimFrame, m->_miAnimWidth, CelSkip, CelCap);
else
Cl2DecodeFrm4(mx, my, m->_miAnimData, m->_miAnimFrame, m->_miAnimWidth, CelSkip, CelCap);
Cl2DrawSafe(mx, my, m->_miAnimData, m->_miAnimFrame, m->_miAnimWidth, CelSkip, CelCap);
}
}
} else {
@ -296,11 +296,11 @@ void DrawClippedMissile(int x, int y, int sx, int sy, int CelSkip, int CelCap, B
mx = sx + m->_mixoff - m->_miAnimWidth2;
my = sy + m->_miyoff;
if (m->_miUniqTrans)
Cl2DecodeFrm5(mx, my, m->_miAnimData, m->_miAnimFrame, m->_miAnimWidth, CelSkip, CelCap, m->_miUniqTrans + 3);
Cl2DrawLightTblSafe(mx, my, m->_miAnimData, m->_miAnimFrame, m->_miAnimWidth, CelSkip, CelCap, m->_miUniqTrans + 3);
else if (m->_miLightFlag)
Cl2DecodeFrm6(mx, my, m->_miAnimData, m->_miAnimFrame, m->_miAnimWidth, CelSkip, CelCap);
Cl2DrawLightSafe(mx, my, m->_miAnimData, m->_miAnimFrame, m->_miAnimWidth, CelSkip, CelCap);
else
Cl2DecodeFrm4(mx, my, m->_miAnimData, m->_miAnimFrame, m->_miAnimWidth, CelSkip, CelCap);
Cl2DrawSafe(mx, my, m->_miAnimData, m->_miAnimFrame, m->_miAnimWidth, CelSkip, CelCap);
}
}
}
@ -342,7 +342,7 @@ static void DrawMonster(int x, int y, int mx, int my, int m, int CelSkip, int Ce
}
if (!(dFlags[x][y] & BFLAG_LIT)) {
Cl2DecodeFrm3(mx, my, monster[m]._mAnimData, monster[m]._mAnimFrame, monster[m].MType->width, CelSkip, CelCap, 1);
Cl2DrawLightTbl(mx, my, monster[m]._mAnimData, monster[m]._mAnimFrame, monster[m].MType->width, CelSkip, CelCap, 1);
} else {
trans = 0;
if (monster[m]._uniqtype)
@ -352,9 +352,9 @@ static void DrawMonster(int x, int y, int mx, int my, int m, int CelSkip, int Ce
if (plr[myplr]._pInfraFlag && light_table_index > 8)
trans = 1;
if (trans)
Cl2DecodeFrm3(mx, my, monster[m]._mAnimData, monster[m]._mAnimFrame, monster[m].MType->width, CelSkip, CelCap, trans);
Cl2DrawLightTbl(mx, my, monster[m]._mAnimData, monster[m]._mAnimFrame, monster[m].MType->width, CelSkip, CelCap, trans);
else
Cl2DecodeLightTbl(mx, my, monster[m]._mAnimData, monster[m]._mAnimFrame, monster[m].MType->width, CelSkip, CelCap);
Cl2DrawLight(mx, my, monster[m]._mAnimData, monster[m]._mAnimFrame, monster[m].MType->width, CelSkip, CelCap);
}
}
@ -395,7 +395,7 @@ static void DrawClippedMonster(int x, int y, int mx, int my, int m, int CelSkip,
}
if (!(dFlags[x][y] & BFLAG_LIT)) {
Cl2DecodeFrm5(mx, my, monster[m]._mAnimData, monster[m]._mAnimFrame, monster[m].MType->width, CelSkip, CelCap, 1);
Cl2DrawLightTblSafe(mx, my, monster[m]._mAnimData, monster[m]._mAnimFrame, monster[m].MType->width, CelSkip, CelCap, 1);
} else {
trans = 0;
if (monster[m]._uniqtype)
@ -405,9 +405,9 @@ static void DrawClippedMonster(int x, int y, int mx, int my, int m, int CelSkip,
if (plr[myplr]._pInfraFlag && light_table_index > 8)
trans = 1;
if (trans)
Cl2DecodeFrm5(mx, my, monster[m]._mAnimData, monster[m]._mAnimFrame, monster[m].MType->width, CelSkip, CelCap, trans);
Cl2DrawLightTblSafe(mx, my, monster[m]._mAnimData, monster[m]._mAnimFrame, monster[m].MType->width, CelSkip, CelCap, trans);
else
Cl2DecodeFrm6(mx, my, monster[m]._mAnimData, monster[m]._mAnimFrame, monster[m].MType->width, CelSkip, CelCap);
Cl2DrawLightSafe(mx, my, monster[m]._mAnimData, monster[m]._mAnimFrame, monster[m].MType->width, CelSkip, CelCap);
}
}
@ -439,12 +439,12 @@ static void DrawPlayer(int pnum, int x, int y, int px, int py, BYTE *pCelBuff, i
return;
}
if (pnum == pcursplr)
Cl2DecodeFrm2(165, px, py, pCelBuff, nCel, nWidth, CelSkip, CelCap);
Cl2DrawOutline(165, px, py, pCelBuff, nCel, nWidth, CelSkip, CelCap);
if (pnum == myplr) {
Cl2DecodeFrm1(px, py, pCelBuff, nCel, nWidth, CelSkip, CelCap);
Cl2Draw(px, py, pCelBuff, nCel, nWidth, CelSkip, CelCap);
#ifndef HELLFIRE
if (plr[pnum].pManaShield)
Cl2DecodeFrm1(
Cl2Draw(
px + plr[pnum]._pAnimWidth2 - misfiledata[MFILE_MANASHLD].mAnimWidth2[0],
py,
misfiledata[MFILE_MANASHLD].mAnimData[0],
@ -454,10 +454,10 @@ static void DrawPlayer(int pnum, int x, int y, int px, int py, BYTE *pCelBuff, i
CelCap);
#endif
} else if (!(dFlags[x][y] & BFLAG_LIT) || plr[myplr]._pInfraFlag && light_table_index > 8) {
Cl2DecodeFrm3(px, py, pCelBuff, nCel, nWidth, CelSkip, CelCap, 1);
Cl2DrawLightTbl(px, py, pCelBuff, nCel, nWidth, CelSkip, CelCap, 1);
#ifndef HELLFIRE
if (plr[pnum].pManaShield)
Cl2DecodeFrm3(
Cl2DrawLightTbl(
px + plr[pnum]._pAnimWidth2 - misfiledata[MFILE_MANASHLD].mAnimWidth2[0],
py,
misfiledata[MFILE_MANASHLD].mAnimData[0],
@ -473,10 +473,10 @@ static void DrawPlayer(int pnum, int x, int y, int px, int py, BYTE *pCelBuff, i
light_table_index = 0;
else
light_table_index -= 5;
Cl2DecodeLightTbl(px, py, pCelBuff, nCel, nWidth, CelSkip, CelCap);
Cl2DrawLight(px, py, pCelBuff, nCel, nWidth, CelSkip, CelCap);
#ifndef HELLFIRE
if (plr[pnum].pManaShield)
Cl2DecodeLightTbl(
Cl2DrawLight(
px + plr[pnum]._pAnimWidth2 - misfiledata[MFILE_MANASHLD].mAnimWidth2[0],
py,
misfiledata[MFILE_MANASHLD].mAnimData[0],
@ -518,12 +518,12 @@ static void DrawClippedPlayer(int pnum, int x, int y, int px, int py, BYTE *pCel
return;
}
if (pnum == pcursplr)
Cl2DecodeClrHL(165, px, py, pCelBuff, nCel, nWidth, CelSkip, CelCap);
Cl2DrawOutlineSafe(165, px, py, pCelBuff, nCel, nWidth, CelSkip, CelCap);
if (pnum == myplr) {
Cl2DecodeFrm4(px, py, pCelBuff, nCel, nWidth, CelSkip, CelCap);
Cl2DrawSafe(px, py, pCelBuff, nCel, nWidth, CelSkip, CelCap);
#ifndef HELLFIRE
if (plr[pnum].pManaShield)
Cl2DecodeFrm4(
Cl2DrawSafe(
px + plr[pnum]._pAnimWidth2 - misfiledata[MFILE_MANASHLD].mAnimWidth2[0],
py,
misfiledata[MFILE_MANASHLD].mAnimData[0],
@ -533,10 +533,10 @@ static void DrawClippedPlayer(int pnum, int x, int y, int px, int py, BYTE *pCel
CelCap);
#endif
} else if (!(dFlags[x][y] & BFLAG_LIT) || plr[myplr]._pInfraFlag && light_table_index > 8) {
Cl2DecodeFrm5(px, py, pCelBuff, nCel, nWidth, CelSkip, CelCap, 1);
Cl2DrawLightTblSafe(px, py, pCelBuff, nCel, nWidth, CelSkip, CelCap, 1);
#ifndef HELLFIRE
if (plr[pnum].pManaShield)
Cl2DecodeFrm5(
Cl2DrawLightTblSafe(
px + plr[pnum]._pAnimWidth2 - misfiledata[MFILE_MANASHLD].mAnimWidth2[0],
py,
misfiledata[MFILE_MANASHLD].mAnimData[0],
@ -552,10 +552,10 @@ static void DrawClippedPlayer(int pnum, int x, int y, int px, int py, BYTE *pCel
light_table_index = 0;
else
light_table_index -= 5;
Cl2DecodeFrm6(px, py, pCelBuff, nCel, nWidth, CelSkip, CelCap);
Cl2DrawLightSafe(px, py, pCelBuff, nCel, nWidth, CelSkip, CelCap);
#ifndef HELLFIRE
if (plr[pnum].pManaShield)
Cl2DecodeFrm6(
Cl2DrawLightSafe(
px + plr[pnum]._pAnimWidth2 - misfiledata[MFILE_MANASHLD].mAnimWidth2[0],
py,
misfiledata[MFILE_MANASHLD].mAnimData[0],
@ -655,13 +655,13 @@ static void DrawObject(int x, int y, int ox, int oy, BOOL pre, int CelSkip, int
}
if (bv == pcursobj)
CelDecodeClr(194, sx, sy, object[bv]._oAnimData, object[bv]._oAnimFrame, object[bv]._oAnimWidth, CelSkip, CelCap);
CelBlitOutline(194, sx, sy, object[bv]._oAnimData, object[bv]._oAnimFrame, object[bv]._oAnimWidth, CelSkip, CelCap);
if (object[bv]._oLight) {
CelDecodeHdrLightOnly(sx, sy, object[bv]._oAnimData, object[bv]._oAnimFrame, object[bv]._oAnimWidth, CelSkip, CelCap);
CelClippedDrawLight(sx, sy, object[bv]._oAnimData, object[bv]._oAnimFrame, object[bv]._oAnimWidth, CelSkip, CelCap);
} else {
/// ASSERT: assert(object[bv]._oAnimData);
if (object[bv]._oAnimData) // BUGFIX: _oAnimData was already checked, this is redundant
CelDrawHdrOnly(sx, sy, object[bv]._oAnimData, object[bv]._oAnimFrame, object[bv]._oAnimWidth, CelSkip, CelCap);
CelClippedDraw(sx, sy, object[bv]._oAnimData, object[bv]._oAnimFrame, object[bv]._oAnimWidth, CelSkip, CelCap);
}
}
@ -712,11 +712,11 @@ static void DrawClippedObject(int x, int y, int ox, int oy, BOOL pre, int CelSki
}
if (bv == pcursobj)
CelDrawHdrClrHL(194, sx, sy, object[bv]._oAnimData, object[bv]._oAnimFrame, object[bv]._oAnimWidth, CelSkip, CelCap);
CelBlitOutlineSafe(194, sx, sy, object[bv]._oAnimData, object[bv]._oAnimFrame, object[bv]._oAnimWidth, CelSkip, CelCap);
if (object[bv]._oLight)
Cel2DecodeHdrLight(sx, sy, object[bv]._oAnimData, object[bv]._oAnimFrame, object[bv]._oAnimWidth, CelSkip, CelCap);
CelDrawLightSafe(sx, sy, object[bv]._oAnimData, object[bv]._oAnimFrame, object[bv]._oAnimWidth, CelSkip, CelCap);
else
Cel2DrawHdrOnly(sx, sy, object[bv]._oAnimData, object[bv]._oAnimFrame, object[bv]._oAnimWidth, CelSkip, CelCap);
CelClippedDrawSafe(sx, sy, object[bv]._oAnimData, object[bv]._oAnimFrame, object[bv]._oAnimWidth, CelSkip, CelCap);
}
static void scrollrt_draw_clipped_dungeon(BYTE *pBuff, int sx, int sy, int dx, int dy, int eflag);
@ -796,7 +796,7 @@ static void scrollrt_draw_clipped_dungeon(BYTE *pBuff, int sx, int sy, int dx, i
negMon = dMonster[sx][sy - 1];
if (visiondebug && bFlag & BFLAG_LIT) {
Cel2DecodeHdrOnly(pBuff, pSquareCel, 1, 64, 0, 8);
CelClippedBlitSafe(pBuff, pSquareCel, 1, 64, 0, 8);
}
if (MissilePreFlag && bFlag & BFLAG_MISSILE) {
DrawClippedMissile(sx, sy, dx, dy, 0, 8, 1);
@ -813,9 +813,9 @@ static void scrollrt_draw_clipped_dungeon(BYTE *pBuff, int sx, int sy, int dx, i
nCel = pDeadGuy->_deadFrame;
if (nCel >= 1 && pFrameTable[0] <= 50 && nCel <= (int)pFrameTable[0]) {
if (pDeadGuy->_deadtrans != 0) {
Cl2DecodeFrm5(px, dy, pCelBuff, nCel, pDeadGuy->_deadWidth, 0, 8, pDeadGuy->_deadtrans);
Cl2DrawLightTblSafe(px, dy, pCelBuff, nCel, pDeadGuy->_deadWidth, 0, 8, pDeadGuy->_deadtrans);
} else {
Cl2DecodeFrm6(px, dy, pCelBuff, pDeadGuy->_deadFrame, pDeadGuy->_deadWidth, 0, 8);
Cl2DrawLightSafe(px, dy, pCelBuff, pDeadGuy->_deadFrame, pDeadGuy->_deadWidth, 0, 8);
}
} else {
// app_fatal("Clipped dead sub: frame %d of %d, deadnum==%d", nCel, pFrameTable[0], (bDead & 0x1F) - 1);
@ -838,9 +838,9 @@ static void scrollrt_draw_clipped_dungeon(BYTE *pBuff, int sx, int sy, int dx, i
if (nCel >= 1 && pFrameTable[0] <= 50 && nCel <= (int)pFrameTable[0]) {
px = dx - pItem->_iAnimWidth2;
if (bItem - 1 == pcursitem) {
CelDrawHdrClrHL(181, px, dy, pCelBuff, nCel, pItem->_iAnimWidth, 0, 8);
CelBlitOutlineSafe(181, px, dy, pCelBuff, nCel, pItem->_iAnimWidth, 0, 8);
}
Cel2DecodeHdrLight(px, dy, pItem->_iAnimData, pItem->_iAnimFrame, pItem->_iAnimWidth, 0, 8);
CelDrawLightSafe(px, dy, pItem->_iAnimData, pItem->_iAnimFrame, pItem->_iAnimWidth, 0, 8);
} else {
/*
app_fatal(
@ -883,7 +883,7 @@ static void scrollrt_draw_clipped_dungeon(BYTE *pBuff, int sx, int sy, int dx, i
px = dx + pMonster->_mxoff - pMonster->MType->width2;
py = dy + pMonster->_myoff;
if (draw_monster_num == pcursmonst) {
Cl2DecodeClrHL(233, px, py, pMonster->_mAnimData, pMonster->_mAnimFrame, pMonster->MType->width, 0, 8);
Cl2DrawOutlineSafe(233, px, py, pMonster->_mAnimData, pMonster->_mAnimFrame, pMonster->MType->width, 0, 8);
}
DrawClippedMonster(sx, sy, px, py, draw_monster_num, 0, 8);
if (eflag && pMonster->_meflag) {
@ -926,7 +926,7 @@ static void scrollrt_draw_clipped_dungeon(BYTE *pBuff, int sx, int sy, int dx, i
px = dx + pMonster->_mxoff - pMonster->MType->width2;
py = dy + pMonster->_myoff;
if (draw_monster_num == pcursmonst) {
Cl2DecodeClrHL(233, px, py, pMonster->_mAnimData, pMonster->_mAnimFrame, pMonster->MType->width, 0, 8);
Cl2DrawOutlineSafe(233, px, py, pMonster->_mAnimData, pMonster->_mAnimFrame, pMonster->MType->width, 0, 8);
}
DrawClippedMonster(sx, sy, px, py, draw_monster_num, 0, 8);
if (eflag && pMonster->_meflag) {
@ -958,9 +958,9 @@ static void scrollrt_draw_clipped_dungeon(BYTE *pBuff, int sx, int sy, int dx, i
if (nCel >= 1 && pFrameTable[0] <= 50 && nCel <= (int)pFrameTable[0]) {
px = dx - pItem->_iAnimWidth2;
if (bItem - 1 == pcursitem) {
CelDrawHdrClrHL(181, px, dy, pCelBuff, nCel, pItem->_iAnimWidth, 0, 8);
CelBlitOutlineSafe(181, px, dy, pCelBuff, nCel, pItem->_iAnimWidth, 0, 8);
}
Cel2DecodeHdrLight(px, dy, pItem->_iAnimData, pItem->_iAnimFrame, pItem->_iAnimWidth, 0, 8);
CelDrawLightSafe(px, dy, pItem->_iAnimData, pItem->_iAnimFrame, pItem->_iAnimWidth, 0, 8);
} else {
/*
app_fatal(
@ -979,7 +979,7 @@ static void scrollrt_draw_clipped_dungeon(BYTE *pBuff, int sx, int sy, int dx, i
}
if (bArch != 0) {
cel_transparency_active = TransList[bMap];
Cel2DecodeLightTrans(pBuff, pSpecialCels, bArch, 64, 0, 8);
CelClippedBlitLightTransSafe(pBuff, pSpecialCels, bArch, 64, 0, 8);
}
}
@ -1228,7 +1228,7 @@ static void scrollrt_draw_clipped_dungeon_2(BYTE *pBuff, int sx, int sy, int ski
negMon = dMonster[sx][sy - 1];
if (visiondebug && bFlag & BFLAG_LIT) {
Cel2DecodeHdrOnly(pBuff, pSquareCel, 1, 64, CelSkip, 8);
CelClippedBlitSafe(pBuff, pSquareCel, 1, 64, CelSkip, 8);
}
if (MissilePreFlag && bFlag & BFLAG_MISSILE) {
DrawClippedMissile(sx, sy, dx, dy, CelSkip, 8, 1);
@ -1245,9 +1245,9 @@ static void scrollrt_draw_clipped_dungeon_2(BYTE *pBuff, int sx, int sy, int ski
nCel = pDeadGuy->_deadFrame;
if (nCel >= 1 && pFrameTable[0] <= 50 && nCel <= (int)pFrameTable[0]) {
if (pDeadGuy->_deadtrans != 0) {
Cl2DecodeFrm5(px, dy, pCelBuff, nCel, pDeadGuy->_deadWidth, CelSkip, 8, pDeadGuy->_deadtrans);
Cl2DrawLightTblSafe(px, dy, pCelBuff, nCel, pDeadGuy->_deadWidth, CelSkip, 8, pDeadGuy->_deadtrans);
} else {
Cl2DecodeFrm6(px, dy, pCelBuff, pDeadGuy->_deadFrame, pDeadGuy->_deadWidth, CelSkip, 8);
Cl2DrawLightSafe(px, dy, pCelBuff, pDeadGuy->_deadFrame, pDeadGuy->_deadWidth, CelSkip, 8);
}
} else {
// app_fatal("Clipped dead sub2: frame %d of %d, deadnum==%d", nCel, pFrameTable[0], (bDead & 0x1F) - 1);
@ -1270,9 +1270,9 @@ static void scrollrt_draw_clipped_dungeon_2(BYTE *pBuff, int sx, int sy, int ski
if (nCel >= 1 && pFrameTable[0] <= 50 && nCel <= (int)pFrameTable[0]) {
px = dx - pItem->_iAnimWidth2;
if (bItem - 1 == pcursitem) {
CelDrawHdrClrHL(181, px, dy, pCelBuff, nCel, pItem->_iAnimWidth, CelSkip, 8);
CelBlitOutlineSafe(181, px, dy, pCelBuff, nCel, pItem->_iAnimWidth, CelSkip, 8);
}
Cel2DecodeHdrLight(px, dy, pItem->_iAnimData, pItem->_iAnimFrame, pItem->_iAnimWidth, CelSkip, 8);
CelDrawLightSafe(px, dy, pItem->_iAnimData, pItem->_iAnimFrame, pItem->_iAnimWidth, CelSkip, 8);
} else {
/*
app_fatal(
@ -1315,7 +1315,7 @@ static void scrollrt_draw_clipped_dungeon_2(BYTE *pBuff, int sx, int sy, int ski
px = dx + pMonster->_mxoff - pMonster->MType->width2;
py = dy + pMonster->_myoff;
if (draw_monster_num == pcursmonst) {
Cl2DecodeClrHL(233, px, py, pMonster->_mAnimData, pMonster->_mAnimFrame, pMonster->MType->width, CelSkip, 8);
Cl2DrawOutlineSafe(233, px, py, pMonster->_mAnimData, pMonster->_mAnimFrame, pMonster->MType->width, CelSkip, 8);
}
DrawClippedMonster(sx, sy, px, py, draw_monster_num, CelSkip, 8);
if (eflag && !pMonster->_meflag) {
@ -1358,7 +1358,7 @@ static void scrollrt_draw_clipped_dungeon_2(BYTE *pBuff, int sx, int sy, int ski
px = dx + pMonster->_mxoff - pMonster->MType->width2;
py = dy + pMonster->_myoff;
if (draw_monster_num == pcursmonst) {
Cl2DecodeClrHL(233, px, py, pMonster->_mAnimData, pMonster->_mAnimFrame, pMonster->MType->width, CelSkip, 8);
Cl2DrawOutlineSafe(233, px, py, pMonster->_mAnimData, pMonster->_mAnimFrame, pMonster->MType->width, CelSkip, 8);
}
DrawClippedMonster(sx, sy, px, py, draw_monster_num, CelSkip, 8);
if (eflag && !pMonster->_meflag) {
@ -1390,9 +1390,9 @@ static void scrollrt_draw_clipped_dungeon_2(BYTE *pBuff, int sx, int sy, int ski
if (nCel >= 1 && pFrameTable[0] <= 50 && nCel <= (int)pFrameTable[0]) {
px = dx - pItem->_iAnimWidth2;
if (bItem - 1 == pcursitem) {
CelDrawHdrClrHL(181, px, dy, pCelBuff, nCel, pItem->_iAnimWidth, CelSkip, 8);
CelBlitOutlineSafe(181, px, dy, pCelBuff, nCel, pItem->_iAnimWidth, CelSkip, 8);
}
Cel2DecodeHdrLight(px, dy, pItem->_iAnimData, pItem->_iAnimFrame, pItem->_iAnimWidth, CelSkip, 8);
CelDrawLightSafe(px, dy, pItem->_iAnimData, pItem->_iAnimFrame, pItem->_iAnimWidth, CelSkip, 8);
} else {
/*
app_fatal(
@ -1411,7 +1411,7 @@ static void scrollrt_draw_clipped_dungeon_2(BYTE *pBuff, int sx, int sy, int ski
}
if (bArch != 0) {
cel_transparency_active = TransList[bMap];
Cel2DecodeLightTrans(pBuff, pSpecialCels, bArch, 64, CelSkip, 8);
CelClippedBlitLightTransSafe(pBuff, pSpecialCels, bArch, 64, CelSkip, 8);
}
}
@ -1593,7 +1593,7 @@ static void scrollrt_draw_dungeon(BYTE *pBuff, int sx, int sy, int capChunks, in
negMon = dMonster[sx][sy - 1];
if (visiondebug && bFlag & BFLAG_LIT) {
CelDecodeHdrOnly(pBuff, pSquareCel, 1, 64, 0, CelCap);
CelClippedBlit(pBuff, pSquareCel, 1, 64, 0, CelCap);
}
tx = dx - 96;
ty = dy - 16;
@ -1614,9 +1614,9 @@ static void scrollrt_draw_dungeon(BYTE *pBuff, int sx, int sy, int capChunks, in
nCel = pDeadGuy->_deadFrame;
if (nCel >= 1 && pFrameTable[0] <= 50 && nCel <= (int)pFrameTable[0]) {
if (pDeadGuy->_deadtrans != 0) {
Cl2DecodeFrm3(px, dy, pCelBuff, nCel, pDeadGuy->_deadWidth, 0, CelCap, pDeadGuy->_deadtrans);
Cl2DrawLightTbl(px, dy, pCelBuff, nCel, pDeadGuy->_deadWidth, 0, CelCap, pDeadGuy->_deadtrans);
} else {
Cl2DecodeLightTbl(px, dy, pCelBuff, pDeadGuy->_deadFrame, pDeadGuy->_deadWidth, 0, CelCap);
Cl2DrawLight(px, dy, pCelBuff, pDeadGuy->_deadFrame, pDeadGuy->_deadWidth, 0, CelCap);
}
} else {
// app_fatal("Unclipped dead: frame %d of %d, deadnum==%d", nCel, pFrameTable[0], (bDead & 0x1F) - 1);
@ -1639,9 +1639,9 @@ static void scrollrt_draw_dungeon(BYTE *pBuff, int sx, int sy, int capChunks, in
if (nCel >= 1 && pFrameTable[0] <= 50 && nCel <= (int)pFrameTable[0]) {
px = dx - pItem->_iAnimWidth2;
if (bItem - 1 == pcursitem) {
CelDecodeClr(181, px, dy, pCelBuff, nCel, pItem->_iAnimWidth, 0, CelCap);
CelBlitOutline(181, px, dy, pCelBuff, nCel, pItem->_iAnimWidth, 0, CelCap);
}
CelDecodeHdrLightOnly(px, dy, pItem->_iAnimData, pItem->_iAnimFrame, pItem->_iAnimWidth, 0, CelCap);
CelClippedDrawLight(px, dy, pItem->_iAnimData, pItem->_iAnimFrame, pItem->_iAnimWidth, 0, CelCap);
} else {
// app_fatal("Draw \"%s\" Item 1: frame %d of %d, item type==%d", pItem->_iIName, nCel, pFrameTable[0], pItem->_itype);
}
@ -1677,7 +1677,7 @@ static void scrollrt_draw_dungeon(BYTE *pBuff, int sx, int sy, int capChunks, in
px = dx + pMonster->_mxoff - pMonster->MType->width2;
py = dy + pMonster->_myoff;
if (draw_monster_num == pcursmonst) {
Cl2DecodeFrm2(233, px, py, pMonster->_mAnimData, pMonster->_mAnimFrame, pMonster->MType->width, 0, CelCap);
Cl2DrawOutline(233, px, py, pMonster->_mAnimData, pMonster->_mAnimFrame, pMonster->MType->width, 0, CelCap);
}
DrawMonster(sx, sy, px, py, draw_monster_num, 0, CelCap);
if (eflag && !pMonster->_meflag) {
@ -1720,7 +1720,7 @@ static void scrollrt_draw_dungeon(BYTE *pBuff, int sx, int sy, int capChunks, in
px = dx + pMonster->_mxoff - pMonster->MType->width2;
py = dy + pMonster->_myoff;
if (draw_monster_num == pcursmonst) {
Cl2DecodeFrm2(233, px, py, pMonster->_mAnimData, pMonster->_mAnimFrame, pMonster->MType->width, 0, CelCap);
Cl2DrawOutline(233, px, py, pMonster->_mAnimData, pMonster->_mAnimFrame, pMonster->MType->width, 0, CelCap);
}
DrawMonster(sx, sy, px, py, draw_monster_num, 0, CelCap);
if (eflag && !pMonster->_meflag) {
@ -1752,9 +1752,9 @@ static void scrollrt_draw_dungeon(BYTE *pBuff, int sx, int sy, int capChunks, in
if (nCel >= 1 && pFrameTable[0] <= 50 && nCel <= (int)pFrameTable[0]) {
px = dx - pItem->_iAnimWidth2;
if (bItem - 1 == pcursitem) {
CelDecodeClr(181, px, dy, pCelBuff, nCel, pItem->_iAnimWidth, 0, CelCap);
CelBlitOutline(181, px, dy, pCelBuff, nCel, pItem->_iAnimWidth, 0, CelCap);
}
CelDecodeHdrLightOnly(px, dy, pItem->_iAnimData, pItem->_iAnimFrame, pItem->_iAnimWidth, 0, CelCap);
CelClippedDrawLight(px, dy, pItem->_iAnimData, pItem->_iAnimFrame, pItem->_iAnimWidth, 0, CelCap);
} else {
// app_fatal("Draw \"%s\" Item 2: frame %d of %d, item type==%d", pItem->_iIName, nCel, pFrameTable[0], pItem->_itype);
}
@ -1766,7 +1766,7 @@ static void scrollrt_draw_dungeon(BYTE *pBuff, int sx, int sy, int capChunks, in
}
if (bArch != 0) {
cel_transparency_active = TransList[bMap];
CelDecodeHdrLightTrans(pBuff, pSpecialCels, bArch, 64, 0, CelCap);
CelClippedBlitLightTrans(pBuff, pSpecialCels, bArch, 64, 0, CelCap);
}
}

18
Source/stores.cpp

@ -134,7 +134,7 @@ void FreeStoreMem()
void DrawSTextBack()
{
CelDecodeOnly(408, 487, pSTextBoxCels, 1, 271);
CelDraw(408, 487, pSTextBoxCels, 1, 271);
#define TRANS_RECT_X 347
#define TRANS_RECT_Y 28
@ -171,7 +171,7 @@ void PrintSString(int x, int y, BOOL cjustflag, char *str, char col, int val)
off += k;
}
if (stextsel == y) {
CelDecodeOnly(cjustflag ? xx + x + k - 20 : xx + x - 20, s + 205, pSPentSpn2Cels, InStoreFlag, 12);
CelDraw(cjustflag ? xx + x + k - 20 : xx + x - 20, s + 205, pSPentSpn2Cels, InStoreFlag, 12);
}
for (i = 0; i < len; i++) {
c = fontframe[gbFontTransTbl[(BYTE)str[i]]];
@ -193,7 +193,7 @@ void PrintSString(int x, int y, BOOL cjustflag, char *str, char col, int val)
}
}
if (stextsel == y) {
CelDecodeOnly(cjustflag ? xx + x + k + 4 : 660 - x, s + 205, pSPentSpn2Cels, InStoreFlag, 12);
CelDraw(cjustflag ? xx + x + k + 4 : 660 - x, s + 205, pSPentSpn2Cels, InStoreFlag, 12);
}
}
@ -252,16 +252,16 @@ void DrawSArrows(int y1, int y2)
yd1 = SStringY[y1] + 204;
yd2 = SStringY[y2] + 204;
if (stextscrlubtn != -1)
CelDecodeOnly(665, yd1, pSTextSlidCels, 12, 12);
CelDraw(665, yd1, pSTextSlidCels, 12, 12);
else
CelDecodeOnly(665, yd1, pSTextSlidCels, 10, 12);
CelDraw(665, yd1, pSTextSlidCels, 10, 12);
if (stextscrldbtn != -1)
CelDecodeOnly(665, yd2, pSTextSlidCels, 11, 12);
CelDraw(665, yd2, pSTextSlidCels, 11, 12);
else
CelDecodeOnly(665, yd2, pSTextSlidCels, 9, 12);
CelDraw(665, yd2, pSTextSlidCels, 9, 12);
yd1 += 12;
for (yd3 = yd1; yd3 < yd2; yd3 += 12) {
CelDecodeOnly(665, yd3, pSTextSlidCels, 14, 12);
CelDraw(665, yd3, pSTextSlidCels, 14, 12);
}
if (stextsel == 22)
yd3 = stextlhold;
@ -271,7 +271,7 @@ void DrawSArrows(int y1, int y2)
yd3 = 1000 * (stextsval + ((yd3 - stextup) >> 2)) / (storenumh - 1) * (SStringY[y2] - SStringY[y1] - 24) / 1000;
else
yd3 = 0;
CelDecodeOnly(665, SStringY[y1 + 1] + 204 + yd3, pSTextSlidCels, 13, 12);
CelDraw(665, SStringY[y1 + 1] + 204 + yd3, pSTextSlidCels, 13, 12);
}
void DrawSTextHelp()

60
Source/town.cpp

@ -399,34 +399,34 @@ void town_draw_clipped_town(BYTE *pBuff, int sx, int sy, int dx, int dy, int efl
bv = dItem[sx][sy] - 1;
px = dx - item[bv]._iAnimWidth2;
if (bv == pcursitem) {
CelDrawHdrClrHL(181, px, dy, item[bv]._iAnimData, item[bv]._iAnimFrame, item[bv]._iAnimWidth, 0, 8);
CelBlitOutlineSafe(181, px, dy, item[bv]._iAnimData, item[bv]._iAnimFrame, item[bv]._iAnimWidth, 0, 8);
}
Cel2DrawHdrOnly(px, dy, item[bv]._iAnimData, item[bv]._iAnimFrame, item[bv]._iAnimWidth, 0, 8);
CelClippedDrawSafe(px, dy, item[bv]._iAnimData, item[bv]._iAnimFrame, item[bv]._iAnimWidth, 0, 8);
}
if (dFlags[sx][sy] & BFLAG_MONSTLR) {
mi = -(dMonster[sx][sy - 1] + 1);
px = dx - towner[mi]._tAnimWidth2;
if (mi == pcursmonst) {
CelDrawHdrClrHL(166, px, dy, towner[mi]._tAnimData, towner[mi]._tAnimFrame, towner[mi]._tAnimWidth, 0, 8);
CelBlitOutlineSafe(166, px, dy, towner[mi]._tAnimData, towner[mi]._tAnimFrame, towner[mi]._tAnimWidth, 0, 8);
}
Cel2DrawHdrOnly(px, dy, towner[mi]._tAnimData, towner[mi]._tAnimFrame, towner[mi]._tAnimWidth, 0, 8);
CelClippedDrawSafe(px, dy, towner[mi]._tAnimData, towner[mi]._tAnimFrame, towner[mi]._tAnimWidth, 0, 8);
}
if (dMonster[sx][sy] > 0) {
mi = dMonster[sx][sy] - 1;
px = dx - towner[mi]._tAnimWidth2;
if (mi == pcursmonst) {
CelDrawHdrClrHL(166, px, dy, towner[mi]._tAnimData, towner[mi]._tAnimFrame, towner[mi]._tAnimWidth, 0, 8);
CelBlitOutlineSafe(166, px, dy, towner[mi]._tAnimData, towner[mi]._tAnimFrame, towner[mi]._tAnimWidth, 0, 8);
}
Cel2DrawHdrOnly(px, dy, towner[mi]._tAnimData, towner[mi]._tAnimFrame, towner[mi]._tAnimWidth, 0, 8);
CelClippedDrawSafe(px, dy, towner[mi]._tAnimData, towner[mi]._tAnimFrame, towner[mi]._tAnimWidth, 0, 8);
}
if (dFlags[sx][sy] & BFLAG_PLAYERLR) {
bv = -(dPlayer[sx][sy - 1] + 1);
px = dx + plr[bv]._pxoff - plr[bv]._pAnimWidth2;
py = dy + plr[bv]._pyoff;
if (bv == pcursplr) {
Cl2DecodeClrHL(165, px, py, plr[bv]._pAnimData, plr[bv]._pAnimFrame, plr[bv]._pAnimWidth, 0, 8);
Cl2DrawOutlineSafe(165, px, py, plr[bv]._pAnimData, plr[bv]._pAnimFrame, plr[bv]._pAnimWidth, 0, 8);
}
Cl2DecodeFrm4(px, py, plr[bv]._pAnimData, plr[bv]._pAnimFrame, plr[bv]._pAnimWidth, 0, 8);
Cl2DrawSafe(px, py, plr[bv]._pAnimData, plr[bv]._pAnimFrame, plr[bv]._pAnimWidth, 0, 8);
if (eflag && plr[bv]._peflag) {
town_draw_clipped_e_flag(pBuff - 64, sx - 1, sy + 1, dx - 64, dy);
}
@ -439,9 +439,9 @@ void town_draw_clipped_town(BYTE *pBuff, int sx, int sy, int dx, int dy, int efl
px = dx + plr[bv]._pxoff - plr[bv]._pAnimWidth2;
py = dy + plr[bv]._pyoff;
if (bv == pcursplr) {
Cl2DecodeClrHL(165, px, py, plr[bv]._pAnimData, plr[bv]._pAnimFrame, plr[bv]._pAnimWidth, 0, 8);
Cl2DrawOutlineSafe(165, px, py, plr[bv]._pAnimData, plr[bv]._pAnimFrame, plr[bv]._pAnimWidth, 0, 8);
}
Cl2DecodeFrm4(px, py, plr[bv]._pAnimData, plr[bv]._pAnimFrame, plr[bv]._pAnimWidth, 0, 8);
Cl2DrawSafe(px, py, plr[bv]._pAnimData, plr[bv]._pAnimFrame, plr[bv]._pAnimWidth, 0, 8);
if (eflag && plr[bv]._peflag) {
town_draw_clipped_e_flag(pBuff - 64, sx - 1, sy + 1, dx - 64, dy);
}
@ -581,34 +581,34 @@ void town_draw_clipped_town_2(BYTE *pBuff, int sx, int sy, int skipChunks, int C
bv = dItem[sx][sy] - 1;
px = dx - item[bv]._iAnimWidth2;
if (bv == pcursitem) {
CelDrawHdrClrHL(181, px, dy, item[bv]._iAnimData, item[bv]._iAnimFrame, item[bv]._iAnimWidth, CelSkip, 8);
CelBlitOutlineSafe(181, px, dy, item[bv]._iAnimData, item[bv]._iAnimFrame, item[bv]._iAnimWidth, CelSkip, 8);
}
Cel2DrawHdrOnly(px, dy, item[bv]._iAnimData, item[bv]._iAnimFrame, item[bv]._iAnimWidth, CelSkip, 8);
CelClippedDrawSafe(px, dy, item[bv]._iAnimData, item[bv]._iAnimFrame, item[bv]._iAnimWidth, CelSkip, 8);
}
if (dFlags[sx][sy] & BFLAG_MONSTLR) {
mi = -(dMonster[sx][sy - 1] + 1);
px = dx - towner[mi]._tAnimWidth2;
if (mi == pcursmonst) {
CelDrawHdrClrHL(166, px, dy, towner[mi]._tAnimData, towner[mi]._tAnimFrame, towner[mi]._tAnimWidth, CelSkip, 8);
CelBlitOutlineSafe(166, px, dy, towner[mi]._tAnimData, towner[mi]._tAnimFrame, towner[mi]._tAnimWidth, CelSkip, 8);
}
Cel2DrawHdrOnly(px, dy, towner[mi]._tAnimData, towner[mi]._tAnimFrame, towner[mi]._tAnimWidth, CelSkip, 8);
CelClippedDrawSafe(px, dy, towner[mi]._tAnimData, towner[mi]._tAnimFrame, towner[mi]._tAnimWidth, CelSkip, 8);
}
if (dMonster[sx][sy] > 0) {
mi = dMonster[sx][sy] - 1;
px = dx - towner[mi]._tAnimWidth2;
if (mi == pcursmonst) {
CelDrawHdrClrHL(166, px, dy, towner[mi]._tAnimData, towner[mi]._tAnimFrame, towner[mi]._tAnimWidth, CelSkip, 8);
CelBlitOutlineSafe(166, px, dy, towner[mi]._tAnimData, towner[mi]._tAnimFrame, towner[mi]._tAnimWidth, CelSkip, 8);
}
Cel2DrawHdrOnly(px, dy, towner[mi]._tAnimData, towner[mi]._tAnimFrame, towner[mi]._tAnimWidth, CelSkip, 8);
CelClippedDrawSafe(px, dy, towner[mi]._tAnimData, towner[mi]._tAnimFrame, towner[mi]._tAnimWidth, CelSkip, 8);
}
if (dFlags[sx][sy] & BFLAG_PLAYERLR) {
bv = -(dPlayer[sx][sy - 1] + 1);
px = dx + plr[bv]._pxoff - plr[bv]._pAnimWidth2;
py = dy + plr[bv]._pyoff;
if (bv == pcursplr) {
Cl2DecodeClrHL(165, px, py, plr[bv]._pAnimData, plr[bv]._pAnimFrame, plr[bv]._pAnimWidth, CelSkip, 8);
Cl2DrawOutlineSafe(165, px, py, plr[bv]._pAnimData, plr[bv]._pAnimFrame, plr[bv]._pAnimWidth, CelSkip, 8);
}
Cl2DecodeFrm4(px, py, plr[bv]._pAnimData, plr[bv]._pAnimFrame, plr[bv]._pAnimWidth, CelSkip, 8);
Cl2DrawSafe(px, py, plr[bv]._pAnimData, plr[bv]._pAnimFrame, plr[bv]._pAnimWidth, CelSkip, 8);
if (eflag && plr[bv]._peflag) {
town_draw_clipped_e_flag_2(pBuff - 64, sx - 1, sy + 1, skipChunks, CelSkip, dx - 64, dy);
}
@ -621,9 +621,9 @@ void town_draw_clipped_town_2(BYTE *pBuff, int sx, int sy, int skipChunks, int C
px = dx + plr[bv]._pxoff - plr[bv]._pAnimWidth2;
py = dy + plr[bv]._pyoff;
if (bv == pcursplr) {
Cl2DecodeClrHL(165, px, py, plr[bv]._pAnimData, plr[bv]._pAnimFrame, plr[bv]._pAnimWidth, CelSkip, 8);
Cl2DrawOutlineSafe(165, px, py, plr[bv]._pAnimData, plr[bv]._pAnimFrame, plr[bv]._pAnimWidth, CelSkip, 8);
}
Cl2DecodeFrm4(px, py, plr[bv]._pAnimData, plr[bv]._pAnimFrame, plr[bv]._pAnimWidth, CelSkip, 8);
Cl2DrawSafe(px, py, plr[bv]._pAnimData, plr[bv]._pAnimFrame, plr[bv]._pAnimWidth, CelSkip, 8);
if (eflag && plr[bv]._peflag) {
town_draw_clipped_e_flag_2(pBuff - 64, sx - 1, sy + 1, skipChunks, CelSkip, dx - 64, dy);
}
@ -770,38 +770,38 @@ void town_draw_town_all(BYTE *pBuff, int x, int y, int capChunks, int CelCap, in
bv = dItem[x][y] - 1;
px = sx - item[bv]._iAnimWidth2;
if (bv == pcursitem) {
CelDecodeClr(181, px, sy, item[bv]._iAnimData, item[bv]._iAnimFrame, item[bv]._iAnimWidth, 0, CelCap);
CelBlitOutline(181, px, sy, item[bv]._iAnimData, item[bv]._iAnimFrame, item[bv]._iAnimWidth, 0, CelCap);
}
/// ASSERT: assert(item[bv]._iAnimData);
CelDrawHdrOnly(px, sy, item[bv]._iAnimData, item[bv]._iAnimFrame, item[bv]._iAnimWidth, 0, CelCap);
CelClippedDraw(px, sy, item[bv]._iAnimData, item[bv]._iAnimFrame, item[bv]._iAnimWidth, 0, CelCap);
}
if (dFlags[x][y] & BFLAG_MONSTLR) {
mi = -(dMonster[x][y - 1] + 1);
px = sx - towner[mi]._tAnimWidth2;
if (mi == pcursmonst) {
CelDecodeClr(166, px, sy, towner[mi]._tAnimData, towner[mi]._tAnimFrame, towner[mi]._tAnimWidth, 0, CelCap);
CelBlitOutline(166, px, sy, towner[mi]._tAnimData, towner[mi]._tAnimFrame, towner[mi]._tAnimWidth, 0, CelCap);
}
/// ASSERT: assert(towner[mi]._tAnimData);
CelDrawHdrOnly(px, sy, towner[mi]._tAnimData, towner[mi]._tAnimFrame, towner[mi]._tAnimWidth, 0, CelCap);
CelClippedDraw(px, sy, towner[mi]._tAnimData, towner[mi]._tAnimFrame, towner[mi]._tAnimWidth, 0, CelCap);
}
if (dMonster[x][y] > 0) {
mi = dMonster[x][y] - 1;
px = sx - towner[mi]._tAnimWidth2;
if (mi == pcursmonst) {
CelDecodeClr(166, px, sy, towner[mi]._tAnimData, towner[mi]._tAnimFrame, towner[mi]._tAnimWidth, 0, CelCap);
CelBlitOutline(166, px, sy, towner[mi]._tAnimData, towner[mi]._tAnimFrame, towner[mi]._tAnimWidth, 0, CelCap);
}
/// ASSERT: assert(towner[mi]._tAnimData);
CelDrawHdrOnly(px, sy, towner[mi]._tAnimData, towner[mi]._tAnimFrame, towner[mi]._tAnimWidth, 0, CelCap);
CelClippedDraw(px, sy, towner[mi]._tAnimData, towner[mi]._tAnimFrame, towner[mi]._tAnimWidth, 0, CelCap);
}
if (dFlags[x][y] & BFLAG_PLAYERLR) {
bv = -(dPlayer[x][y - 1] + 1);
px = sx + plr[bv]._pxoff - plr[bv]._pAnimWidth2;
py = sy + plr[bv]._pyoff;
if (bv == pcursplr) {
Cl2DecodeFrm2(165, px, py, plr[bv]._pAnimData, plr[bv]._pAnimFrame, plr[bv]._pAnimWidth, 0, CelCap);
Cl2DrawOutline(165, px, py, plr[bv]._pAnimData, plr[bv]._pAnimFrame, plr[bv]._pAnimWidth, 0, CelCap);
}
/// ASSERT: assert(plr[bv]._pAnimData);
Cl2DecodeFrm1(px, py, plr[bv]._pAnimData, plr[bv]._pAnimFrame, plr[bv]._pAnimWidth, 0, CelCap);
Cl2Draw(px, py, plr[bv]._pAnimData, plr[bv]._pAnimFrame, plr[bv]._pAnimWidth, 0, CelCap);
if (eflag && plr[bv]._peflag) {
town_draw_e_flag(pBuff - 64, x - 1, y + 1, capChunks, CelCap, sx - 64, sy);
}
@ -814,10 +814,10 @@ void town_draw_town_all(BYTE *pBuff, int x, int y, int capChunks, int CelCap, in
px = sx + plr[bv]._pxoff - plr[bv]._pAnimWidth2;
py = sy + plr[bv]._pyoff;
if (bv == pcursplr) {
Cl2DecodeFrm2(165, px, py, plr[bv]._pAnimData, plr[bv]._pAnimFrame, plr[bv]._pAnimWidth, 0, CelCap);
Cl2DrawOutline(165, px, py, plr[bv]._pAnimData, plr[bv]._pAnimFrame, plr[bv]._pAnimWidth, 0, CelCap);
}
/// ASSERT: assert(plr[bv]._pAnimData);
Cl2DecodeFrm1(px, py, plr[bv]._pAnimData, plr[bv]._pAnimFrame, plr[bv]._pAnimWidth, 0, CelCap);
Cl2Draw(px, py, plr[bv]._pAnimData, plr[bv]._pAnimFrame, plr[bv]._pAnimWidth, 0, CelCap);
if (eflag && plr[bv]._peflag) {
town_draw_e_flag(pBuff - 64, x - 1, y + 1, capChunks, CelCap, sx - 64, sy);
}

76
comparer-config/diablo.toml

@ -1308,12 +1308,12 @@ addr = 0x411614
size = 0x15E
[[func]]
name = "DRLG_L3SpawnEdge"
name = "DRLG_L3Spawn"
addr = 0x411772
size = 0x12A
[[func]]
name = "DRLG_L3Spawn"
name = "DRLG_L3SpawnEdge"
addr = 0x41189C
size = 0x144
@ -1763,112 +1763,112 @@ addr = 0x41618E
size = 0x6E
[[func]]
name = "CelDrawDatOnly"
name = "CelBlit"
addr = 0x41620C
size = 0x68
[[func]]
name = "CelDecodeOnly"
name = "CelDraw"
addr = 0x416274
size = 0x44
[[func]]
name = "CelDecDatOnly"
name = "CelBlitFrame"
addr = 0x4162B8
size = 0x26
[[func]]
name = "CelDrawHdrOnly"
name = "CelClippedDraw"
addr = 0x4162DE
size = 0x7B
[[func]]
name = "CelDecodeHdrOnly"
name = "CelClippedBlit"
addr = 0x416359
size = 0x53
[[func]]
name = "CelDecDatLightOnly"
name = "CelBlitLight"
addr = 0x4163AC
size = 0xDC
[[func]]
name = "CelDecDatLightTrans"
name = "CelBlitLightTrans"
addr = 0x416488
size = 0xDD
[[func]]
name = "CelDecodeLightOnly"
name = "CelDrawLight"
addr = 0x416565
size = 0x58
[[func]]
name = "CelDecodeHdrLightOnly"
name = "CelClippedDrawLight"
addr = 0x4165BD
size = 0x8E
[[func]]
name = "CelDecodeHdrLightTrans"
name = "CelClippedBlitLightTrans"
addr = 0x41664B
size = 0x74
[[func]]
name = "CelDrawHdrLightRed"
name = "CelDrawLightRed"
addr = 0x4166BF
size = 0x11C
[[func]]
name = "Cel2DecDatOnly"
name = "CelBlitSafe"
addr = 0x4167DB
size = 0x7F
[[func]]
name = "Cel2DrawHdrOnly"
name = "CelClippedDrawSafe"
addr = 0x41685A
size = 0x7B
[[func]]
name = "Cel2DecodeHdrOnly"
name = "CelClippedBlitSafe"
addr = 0x4168D5
size = 0x55
[[func]]
name = "Cel2DecDatLightOnly"
name = "CelBlitLightSafe"
addr = 0x41692A
size = 0xF7
[[func]]
name = "Cel2DecDatLightTrans"
name = "CelBlitLightTransSafe"
addr = 0x416A21
size = 0xF8
[[func]]
name = "Cel2DecodeHdrLight"
name = "CelDrawLightSafe"
addr = 0x416B19
size = 0x90
[[func]]
name = "Cel2DecodeLightTrans"
name = "CelClippedBlitLightTransSafe"
addr = 0x416BA9
size = 0x72
[[func]]
name = "Cel2DrawHdrLightRed"
name = "CelDrawLightRedSafe"
addr = 0x416C1B
size = 0x121
[[func]]
name = "CelDecodeRect"
name = "CelBlitWidth"
addr = 0x416D3C
size = 0x8A
[[func]]
name = "CelDecodeClr"
name = "CelBlitOutline"
addr = 0x416DC6
size = 0xFA
[[func]]
name = "CelDrawHdrClrHL"
name = "CelBlitOutlineSafe"
addr = 0x416EC0
size = 0x12F
@ -1933,72 +1933,72 @@ addr = 0x4176D2
size = 0x73
[[func]]
name = "Cl2DecodeFrm1"
name = "Cl2Draw"
addr = 0x417745
size = 0x7A
[[func]]
name = "Cl2DecDatFrm1"
name = "Cl2Blit"
addr = 0x4177BF
size = 0x88
[[func]]
name = "Cl2DecodeFrm2"
name = "Cl2DrawOutline"
addr = 0x417847
size = 0x7E
[[func]]
name = "Cl2DecDatFrm2"
name = "Cl2BlitOutline"
addr = 0x4178C5
size = 0xBC
[[func]]
name = "Cl2DecodeFrm3"
name = "Cl2DrawLightTbl"
addr = 0x417981
size = 0xC3
[[func]]
name = "Cl2DecDatLightTbl1"
name = "Cl2BlitLight"
addr = 0x417A44
size = 0xA5
[[func]]
name = "Cl2DecodeLightTbl"
name = "Cl2DrawLight"
addr = 0x417AE9
size = 0x9A
[[func]]
name = "Cl2DecodeFrm4"
name = "Cl2DrawSafe"
addr = 0x417B83
size = 0x7A
[[func]]
name = "Cl2DecDatFrm4"
name = "Cl2BlitSafe"
addr = 0x417BFD
size = 0x9C
[[func]]
name = "Cl2DecodeClrHL"
name = "Cl2DrawOutlineSafe"
addr = 0x417C99
size = 0x8F
[[func]]
name = "Cl2DecDatClrHL"
name = "Cl2BlitOutlineSafe"
addr = 0x417D28
size = 0xD0
[[func]]
name = "Cl2DecodeFrm5"
name = "Cl2DrawLightTblSafe"
addr = 0x417DF8
size = 0xC3
[[func]]
name = "Cl2DecDatLightTbl2"
name = "Cl2BlitLightSafe"
addr = 0x417EBB
size = 0xBD
[[func]]
name = "Cl2DecodeFrm6"
name = "Cl2DrawLightSafe"
addr = 0x417F78
size = 0x9A

72
comparer-config/spawn.toml

@ -1233,112 +1233,112 @@ addr = 0x40DFFE
size = 0x6E
[[func]]
name = "CelDrawDatOnly"
name = "CelBlit"
addr = 0x40E07C
size = 0x68
[[func]]
name = "CelDecodeOnly"
name = "CelDraw"
addr = 0x40E0E4
size = 0x44
[[func]]
name = "CelDecDatOnly"
name = "CelBlitFrame"
addr = 0x40E128
size = 0x26
[[func]]
name = "CelDrawHdrOnly"
name = "CelClippedDraw"
addr = 0x40E14E
size = 0x7B
[[func]]
name = "CelDecodeHdrOnly"
name = "CelClippedBlit"
addr = 0x40E1C9
size = 0x53
[[func]]
name = "CelDecDatLightOnly"
name = "CelBlitLight"
addr = 0x40E21C
size = 0xDC
[[func]]
name = "CelDecDatLightTrans"
name = "CelBlitLightTrans"
addr = 0x40E2F8
size = 0xDD
[[func]]
name = "CelDecodeLightOnly"
name = "CelDrawLight"
addr = 0x40E3D5
size = 0x58
[[func]]
name = "CelDecodeHdrLightOnly"
name = "CelClippedDrawLight"
addr = 0x40E42D
size = 0x8E
[[func]]
name = "CelDecodeHdrLightTrans"
name = "CelClippedBlitLightTrans"
addr = 0x40E4BB
size = 0x74
[[func]]
name = "CelDrawHdrLightRed"
name = "CelDrawLightRed"
addr = 0x40E52F
size = 0x11C
[[func]]
name = "Cel2DecDatOnly"
name = "CelBlitSafe"
addr = 0x40E64B
size = 0x7F
[[func]]
name = "Cel2DrawHdrOnly"
name = "CelClippedDrawSafe"
addr = 0x40E6CA
size = 0x7B
[[func]]
name = "Cel2DecodeHdrOnly"
name = "CelClippedBlitSafe"
addr = 0x40E745
size = 0x55
[[func]]
name = "Cel2DecDatLightOnly"
name = "CelBlitLightSafe"
addr = 0x40E79A
size = 0xF7
[[func]]
name = "Cel2DecDatLightTrans"
name = "CelBlitLightTransSafe"
addr = 0x40E891
size = 0xF8
[[func]]
name = "Cel2DecodeHdrLight"
name = "CelDrawLightSafe"
addr = 0x40E989
size = 0x90
[[func]]
name = "Cel2DecodeLightTrans"
name = "CelClippedBlitLightTransSafe"
addr = 0x40EA19
size = 0x72
[[func]]
name = "Cel2DrawHdrLightRed"
name = "CelDrawLightRedSafe"
addr = 0x40EA8B
size = 0x121
[[func]]
name = "CelDecodeRect"
name = "CelBlitWidth"
addr = 0x40EBAC
size = 0x8A
[[func]]
name = "CelDecodeClr"
name = "CelBlitOutline"
addr = 0x40EC36
size = 0xFA
[[func]]
name = "CelDrawHdrClrHL"
name = "CelBlitOutlineSafe"
addr = 0x40ED30
size = 0x12F
@ -1403,72 +1403,72 @@ addr = 0x40F542
size = 0x73
[[func]]
name = "Cl2DecodeFrm1"
name = "Cl2Draw"
addr = 0x40F5B5
size = 0x7A
[[func]]
name = "Cl2DecDatFrm1"
name = "Cl2Blit"
addr = 0x40F62F
size = 0x88
[[func]]
name = "Cl2DecodeFrm2"
name = "Cl2DrawOutline"
addr = 0x40F6B7
size = 0x7E
[[func]]
name = "Cl2DecDatFrm2"
name = "Cl2BlitOutline"
addr = 0x40F735
size = 0xBC
[[func]]
name = "Cl2DecodeFrm3"
name = "Cl2DrawLightTbl"
addr = 0x40F7F1
size = 0xC3
[[func]]
name = "Cl2DecDatLightTbl1"
name = "Cl2BlitLight"
addr = 0x40F8B4
size = 0xA5
[[func]]
name = "Cl2DecodeLightTbl"
name = "Cl2DrawLight"
addr = 0x40F959
size = 0x9A
[[func]]
name = "Cl2DecodeFrm4"
name = "Cl2DrawSafe"
addr = 0x40F9F3
size = 0x7A
[[func]]
name = "Cl2DecDatFrm4"
name = "Cl2BlitSafe"
addr = 0x40FA6D
size = 0x9C
[[func]]
name = "Cl2DecodeClrHL"
name = "Cl2DrawOutlineSafe"
addr = 0x40FB09
size = 0x8F
[[func]]
name = "Cl2DecDatClrHL"
name = "Cl2BlitOutlineSafe"
addr = 0x40FB98
size = 0xD0
[[func]]
name = "Cl2DecodeFrm5"
name = "Cl2DrawLightTblSafe"
addr = 0x40FC68
size = 0xC3
[[func]]
name = "Cl2DecDatLightTbl2"
name = "Cl2BlitLightSafe"
addr = 0x40FD2B
size = 0xBD
[[func]]
name = "Cl2DecodeFrm6"
name = "Cl2DrawLightSafe"
addr = 0x40FDE8
size = 0x9A

Loading…
Cancel
Save