Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Give names to dword_12345678 idents #1591

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Source/gamemenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void gamemenu_enable_multi(TMenuItem *pMenuItems)

void gamemenu_off()
{
gmenu_call_proc(0, NULL);
gmenu_call_proc(NULL, NULL);
}

void gamemenu_handle_previous()
Expand Down
12 changes: 6 additions & 6 deletions Source/gendung.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ BYTE *pDungeonCels;
int SpeedFrameTbl[128][16];
THEME_LOC themeLoc[MAXTHEMES];
char dPlayer[MAXDUNX][MAXDUNY];
int dword_5C2FF8;
int dword_5C2FFC;
int game_world_width;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe screen_chunks and screen_blocks. Since it's screen size and not world size.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

game_view_chunks, game_view_blocks

int game_world_height;
int scr_pix_width;
int scr_pix_height;
char dArch[MAXDUNX][MAXDUNY];
Expand Down Expand Up @@ -542,13 +542,13 @@ void SetDungeonMicros()
if (zoomflag) {
scr_pix_width = SCREEN_WIDTH;
scr_pix_height = VIEWPORT_HEIGHT;
dword_5C2FF8 = SCREEN_WIDTH / 64;
dword_5C2FFC = VIEWPORT_HEIGHT / 32;
game_world_width = SCREEN_WIDTH / 64;
game_world_height = VIEWPORT_HEIGHT / 32;
} else {
scr_pix_width = ZOOM_WIDTH;
scr_pix_height = ZOOM_HEIGHT;
dword_5C2FF8 = ZOOM_WIDTH / 64;
dword_5C2FFC = ZOOM_HEIGHT / 32;
game_world_width = ZOOM_WIDTH / 64;
game_world_height = ZOOM_HEIGHT / 32;
}
}

Expand Down
4 changes: 2 additions & 2 deletions Source/gendung.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ extern BYTE *pDungeonCels;
extern int SpeedFrameTbl[128][16];
extern THEME_LOC themeLoc[MAXTHEMES];
extern char dPlayer[MAXDUNX][MAXDUNY];
extern int dword_5C2FF8;
extern int dword_5C2FFC;
extern int game_world_width;
extern int game_world_height;
extern int scr_pix_width;
extern int scr_pix_height;
extern char dArch[MAXDUNX][MAXDUNY];
Expand Down
14 changes: 7 additions & 7 deletions Source/gmenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ TMenuItem *sgpCurrItem;
BYTE *BigTGold_cel;
int PentSpin_tick;
BYTE PentSpin_frame;
void (*dword_63447C)(TMenuItem *);
void (*gmenu_enable_func)(TMenuItem *);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gmenu_current_option?

TMenuItem *sgpCurrentMenu;
BYTE *option_cel;
BYTE *sgpLogo;
Expand Down Expand Up @@ -74,7 +74,7 @@ void gmenu_init_menu()
PentSpin_frame = 1;
sgpCurrentMenu = 0;
sgpCurrItem = 0;
dword_63447C = 0;
gmenu_enable_func = NULL;
sgCurrentMenuIdx = 0;
mouseNavigation = FALSE;
sgpLogo = LoadFileInMem("Data\\Diabsmal.CEL", NULL);
Expand All @@ -96,9 +96,9 @@ void gmenu_call_proc(TMenuItem *pItem, void (*gmFunc)(TMenuItem *))
PauseMode = 0;
mouseNavigation = FALSE;
sgpCurrentMenu = pItem;
dword_63447C = gmFunc;
gmenu_enable_func = gmFunc;
if (gmFunc) {
dword_63447C(sgpCurrentMenu);
gmenu_enable_func(sgpCurrentMenu);
pItem = sgpCurrentMenu;
}
sgCurrentMenuIdx = 0;
Expand Down Expand Up @@ -148,8 +148,8 @@ void gmenu_draw()
DWORD ticks;

if (sgpCurrentMenu) {
if (dword_63447C)
dword_63447C(sgpCurrentMenu);
if (gmenu_enable_func)
gmenu_enable_func(sgpCurrentMenu);
CelDecodeOnly((SCREEN_WIDTH - 296) / 2 + SCREEN_X, 102 + SCREEN_Y, sgpLogo, 1, 296);
y = 160 + SCREEN_Y;
i = sgpCurrentMenu;
Expand Down Expand Up @@ -236,7 +236,7 @@ BOOL gmenu_presskeys(int vkey)
break;
case VK_ESCAPE:
PlaySFX(IS_TITLEMOV);
gmenu_call_proc(0, 0);
gmenu_call_proc(NULL, NULL);
break;
case VK_SPACE:
return FALSE;
Expand Down
6 changes: 3 additions & 3 deletions Source/gmenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ extern BYTE *optbar_cel;
extern BOOLEAN mouseNavigation;
extern BYTE *PentSpin_cel;
extern BYTE *BigTGold_cel;
extern int dword_634474;
extern char byte_634478;
extern void (*dword_63447C)(TMenuItem *);
extern int PentSpin_tick;
extern BYTE PentSpin_frame;
extern void (*gmenu_enable_func)(TMenuItem *);
extern TMenuItem *sgpCurrentMenu;
extern BYTE *option_cel;
extern int sgCurrentMenuIdx;
Expand Down
4 changes: 2 additions & 2 deletions Source/help.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "diablo.h"

int help_select_line;
int dword_634494;
int unused_help;
int helpflag;
int displayinghelp[22]; /* check, does nothing? */
int HelpTop;
Expand Down Expand Up @@ -438,7 +438,7 @@ const char gszHelpText[] = {
void InitHelp()
{
helpflag = 0;
dword_634494 = 0;
unused_help = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could call it unhelpful :P

displayinghelp[0] = 0;
}

Expand Down
2 changes: 1 addition & 1 deletion Source/help.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define __HELP_H__

extern int help_select_line;
extern int dword_634494;
extern int unused_help;
extern int helpflag;
extern int displayinghelp[22];
extern int HelpTop;
Expand Down
8 changes: 4 additions & 4 deletions Source/scrollrt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,8 @@ void DrawGame(int x, int y)

scr_pix_width = SCREEN_WIDTH;
scr_pix_height = VIEWPORT_HEIGHT;
dword_5C2FF8 = SCREEN_WIDTH / 64;
dword_5C2FFC = VIEWPORT_HEIGHT / 32;
game_world_width = SCREEN_WIDTH / 64;
game_world_height = VIEWPORT_HEIGHT / 32;

sx = ScrollInfo._sxoff + 64;
sy = ScrollInfo._syoff + 175;
Expand Down Expand Up @@ -1940,8 +1940,8 @@ void DrawZoom(int x, int y)

scr_pix_width = ZOOM_WIDTH;
scr_pix_height = 192;
dword_5C2FF8 = ZOOM_WIDTH / 64;
dword_5C2FFC = 192 / 32;
game_world_width = ZOOM_WIDTH / 64;
game_world_height = 192 / 32;

sx = ScrollInfo._sxoff + 64;
sy = ScrollInfo._syoff + 143;
Expand Down
16 changes: 8 additions & 8 deletions Source/town.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -932,8 +932,8 @@ void T_DrawGame(int x, int y)

scr_pix_width = SCREEN_WIDTH;
scr_pix_height = VIEWPORT_HEIGHT;
dword_5C2FF8 = SCREEN_WIDTH / 64;
dword_5C2FFC = VIEWPORT_HEIGHT / 32;
game_world_width = SCREEN_WIDTH / 64;
game_world_height = VIEWPORT_HEIGHT / 32;

sx = ScrollInfo._sxoff + 64;
sy = ScrollInfo._syoff + 175;
Expand Down Expand Up @@ -1046,8 +1046,8 @@ void T_DrawZoom(int x, int y)

scr_pix_width = ZOOM_WIDTH;
scr_pix_height = 192;
dword_5C2FF8 = ZOOM_WIDTH / 64;
dword_5C2FFC = 192 / 32;
game_world_width = ZOOM_WIDTH / 64;
game_world_height = 192 / 32;

sx = ScrollInfo._sxoff + 64;
sy = ScrollInfo._syoff + 143;
Expand Down Expand Up @@ -1293,13 +1293,13 @@ void SetTownMicros()
if (zoomflag) {
scr_pix_width = SCREEN_WIDTH;
scr_pix_height = VIEWPORT_HEIGHT;
dword_5C2FF8 = SCREEN_WIDTH / 64;
dword_5C2FFC = VIEWPORT_HEIGHT / 32;
game_world_width = SCREEN_WIDTH / 64;
game_world_height = VIEWPORT_HEIGHT / 32;
} else {
scr_pix_width = ZOOM_WIDTH;
scr_pix_height = ZOOM_HEIGHT;
dword_5C2FF8 = ZOOM_WIDTH / 64;
dword_5C2FFC = ZOOM_HEIGHT / 32;
game_world_width = ZOOM_WIDTH / 64;
game_world_height = ZOOM_HEIGHT / 32;
}
}

Expand Down