Browse Source

Clean up automap.cpp

pull/100/head
Anders Jenbo 7 years ago
parent
commit
abeaa75c5f
  1. 46
      Source/automap.cpp
  2. 18
      Source/automap.h

46
Source/automap.cpp

@ -4,17 +4,17 @@
WORD automaptype[512];
static int MapX;
static int MapY;
BOOL automapflag; // idb
BOOL automapflag;
char AmShiftTab[32]; // [31]?
unsigned char automapview[DMAXX][DMAXY];
int AutoMapScale; // idb
int AutoMapXOfs; // weak
int AutoMapYOfs; // weak
int AutoMapPosBits; // weak
int AutoMapXPos; // weak
int AutoMapYPos; // weak
int AMPlayerX; // weak
int AMPlayerY; // weak
int AutoMapScale;
int AutoMapXOfs;
int AutoMapYOfs;
int AutoMapPosBits;
int AutoMapXPos;
int AutoMapYPos;
int AMPlayerX;
int AMPlayerY;
// color used to draw the player's arrow
#define COLOR_PLAYER (PAL8_ORANGE + 1)
@ -47,10 +47,10 @@ void InitAutomapOnce()
void InitAutomap()
{
unsigned char b1, b2;
unsigned int dwTiles;
BYTE b1, b2;
DWORD dwTiles;
int x, y;
unsigned char *pAFile, *pTmp;
BYTE *pAFile, *pTmp;
int i, j;
int d;
@ -115,26 +115,26 @@ void StartAutomap()
void AutomapUp()
{
--AutoMapXOfs;
--AutoMapYOfs;
AutoMapXOfs--;
AutoMapYOfs--;
}
void AutomapDown()
{
++AutoMapXOfs;
++AutoMapYOfs;
AutoMapXOfs++;
AutoMapYOfs++;
}
void AutomapLeft()
{
--AutoMapXOfs;
++AutoMapYOfs;
AutoMapXOfs--;
AutoMapYOfs++;
}
void AutomapRight()
{
++AutoMapXOfs;
--AutoMapYOfs;
AutoMapXOfs++;
AutoMapYOfs--;
}
void AutomapZoomIn()
@ -245,8 +245,6 @@ void DrawAutomap()
DrawAutomapPlr();
DrawAutomapGame();
}
// 4B8968: using guessed type int sbookflag;
// 69CF0C: using guessed type int gpBufEnd;
void DrawAutomapType(int sx, int sy, WORD automap_type)
{
@ -536,8 +534,8 @@ WORD GetAutomapType(int x, int y, BOOL view)
rv = automaptype[(BYTE)dungeon[x][y]];
if (rv == 7
&& GetAutomapType(x - 1, y, FALSE) & (MAPFLAG_HORZARCH << 8)
&& GetAutomapType(x, y - 1, FALSE) & (MAPFLAG_VERTARCH << 8)) {
&& GetAutomapType(x - 1, y, FALSE) & (MAPFLAG_HORZARCH << 8)
&& GetAutomapType(x, y - 1, FALSE) & (MAPFLAG_VERTARCH << 8)) {
rv = 1;
}
return rv;

18
Source/automap.h

@ -3,17 +3,17 @@
#define __AUTOMAP_H__
extern WORD automaptype[512];
extern BOOL automapflag; // idb
extern BOOL automapflag;
extern char AmShiftTab[32];
extern unsigned char automapview[DMAXX][DMAXY];
extern int AutoMapScale; // idb
extern int AutoMapXOfs; // weak
extern int AutoMapYOfs; // weak
extern int AutoMapPosBits; // weak
extern int AutoMapXPos; // weak
extern int AutoMapYPos; // weak
extern int AMPlayerX; // weak
extern int AMPlayerY; // weak
extern int AutoMapScale;
extern int AutoMapXOfs;
extern int AutoMapYOfs;
extern int AutoMapPosBits;
extern int AutoMapXPos;
extern int AutoMapYPos;
extern int AMPlayerX;
extern int AMPlayerY;
void InitAutomapOnce();
void InitAutomap();

Loading…
Cancel
Save