Skip to content

Commit

Permalink
Format source
Browse files Browse the repository at this point in the history
  • Loading branch information
AJenbo committed Dec 1, 2020
1 parent d5c52d2 commit 38dbcf7
Show file tree
Hide file tree
Showing 32 changed files with 1,132 additions and 1,136 deletions.
16 changes: 8 additions & 8 deletions Source/_render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ __declspec(naked) void drawTopArchesUpperScreen(BYTE *pBuff)
mov edx, esi
and edx, 2
add esi, edx
// loc_4637C0:
// loc_4637C0:
sub edi, 320h
add edi, ebp
sub ebp, 2
Expand Down Expand Up @@ -876,7 +876,7 @@ __declspec(naked) void drawTopArchesUpperScreen(BYTE *pBuff)
mov edx, esi
and edx, 2
add esi, edx
// loc_4638F1:
// loc_4638F1:
sub edi, 320h
add edi, ebp
add ebp, 2
Expand Down Expand Up @@ -1198,7 +1198,7 @@ __declspec(naked) void drawTopArchesUpperScreen(BYTE *pBuff)
mov edx, esi
and edx, 2
add esi, edx
// loc_463BDB:
// loc_463BDB:
sub edi, 320h
add edi, ebp
sub ebp, 2
Expand Down Expand Up @@ -5465,7 +5465,7 @@ __declspec(naked) void drawTopArchesLowerScreen(BYTE *pBuff)
mov edx, esi
and edx, 2
add esi, edx
// loc_466780:
// loc_466780:
sub edi, 320h
add edi, ebp
sub ebp, 2
Expand Down Expand Up @@ -5623,7 +5623,7 @@ __declspec(naked) void drawTopArchesLowerScreen(BYTE *pBuff)
mov edx, esi
and edx, 2
add esi, edx
// loc_4668F8:
// loc_4668F8:
sub edi, 320h
add edi, ebp
add ebp, 2
Expand Down Expand Up @@ -5999,7 +5999,7 @@ __declspec(naked) void drawTopArchesLowerScreen(BYTE *pBuff)
mov edx, esi
and edx, 2
add esi, edx
// loc_466C80:
// loc_466C80:
sub edi, 320h
add edi, ebp
sub ebp, 2
Expand Down Expand Up @@ -6289,7 +6289,7 @@ __declspec(naked) void drawTopArchesLowerScreen(BYTE *pBuff)
sub edi, 320h
sub edx, 2
jge loc_466EC1
// loc_466F3F:
// loc_466F3F:
mov edx, 2
mov eax, edi
sub eax, gpBufEnd
Expand Down Expand Up @@ -6630,7 +6630,7 @@ __declspec(naked) void drawTopArchesLowerScreen(BYTE *pBuff)
sub edi, 320h
sub edx, 2
jge loc_467240
// loc_4672BE:
// loc_4672BE:
mov edx, 8
loc_4672C3:
cmp edi, gpBufEnd
Expand Down
2 changes: 1 addition & 1 deletion Source/appfat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ static void FreeDlg()
#ifdef HELLFIRE
__declspec(naked)
#endif
void __cdecl app_fatal(const char *pszFmt, ...)
void __cdecl app_fatal(const char *pszFmt, ...)
{
va_list va;

Expand Down
2 changes: 1 addition & 1 deletion Source/automap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ void SearchAutomapItem()

for (i = x1; i < x2; i++) {
for (j = y1; j < y2; j++) {
if (dItem[i][j] != 0){
if (dItem[i][j] != 0) {
px = i - 2 * AutoMapXOfs - ViewX;
py = j - 2 * AutoMapYOfs - ViewY;

Expand Down
34 changes: 15 additions & 19 deletions Source/diablo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ static BOOL LeftMouseDown(int wParam)
if (doomflag) {
doom_close();
return FALSE;
}
}

if (spselflag) {
SetSpell();
Expand Down Expand Up @@ -919,7 +919,6 @@ static BOOL LeftMouseDown(int wParam)
if (pcurs > CURSOR_HAND && pcurs < CURSOR_FIRSTITEM)
NewCursor(CURSOR_HAND);
}


return FALSE;
}
Expand Down Expand Up @@ -1686,7 +1685,7 @@ LRESULT CALLBACK GM_Game(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)

void LoadLvlGFX()
{
assert(! pDungeonCels);
assert(!pDungeonCels);

switch (leveltype) {
case DTYPE_TOWN:
Expand Down Expand Up @@ -1756,7 +1755,7 @@ void LoadLvlGFX()

void LoadAllGFX()
{
assert(! pSpeedCels);
assert(!pSpeedCels);
pSpeedCels = DiabloAllocPtr(0x100000);
IncProgress();
IncProgress();
Expand All @@ -1782,7 +1781,7 @@ void CreateLevel(int lvldir)
InitL1Triggers();
Freeupstairs();
#ifdef HELLFIRE
if(currlevel < 21) {
if (currlevel < 21) {
LoadRndLvlPal(1);
} else {
LoadRndLvlPal(5);
Expand All @@ -1803,7 +1802,7 @@ void CreateLevel(int lvldir)
InitL3Triggers();
Freeupstairs();
#ifdef HELLFIRE
if(currlevel < 17) {
if (currlevel < 17) {
LoadRndLvlPal(3);
} else {
LoadRndLvlPal(6);
Expand Down Expand Up @@ -1922,7 +1921,7 @@ void LoadGameLevel(BOOL firstflag, int lvldir)
InitObjects();
InitItems();
#ifdef HELLFIRE
if ( currlevel < 17 )
if (currlevel < 17)
#endif
CreateThemeRooms();
glMid3Seed[currlevel] = GetRndSeed();
Expand Down Expand Up @@ -1967,7 +1966,7 @@ void LoadGameLevel(BOOL firstflag, int lvldir)
ResyncMPQuests();
#ifndef SPAWN
} else {
assert(! pSpeedCels);
assert(!pSpeedCels);
pSpeedCels = DiabloAllocPtr(0x100000);
LoadSetMap();
IncProgress();
Expand Down Expand Up @@ -2036,21 +2035,18 @@ void LoadGameLevel(BOOL firstflag, int lvldir)
}

#ifdef HELLFIRE
if ( currlevel >= 21 )
{
if ( currlevel == 21 )
{
if (currlevel >= 21) {
if (currlevel == 21) {
items_427ABA(CornerStone.x, CornerStone.y);
}
if ( quests[Q_NAKRUL]._qactive == QUEST_DONE && currlevel == 24 )
{
if (quests[Q_NAKRUL]._qactive == QUEST_DONE && currlevel == 24) {
objects_454BA8();
}
}
#endif

#ifdef HELLFIRE
if ( currlevel >= 17 )
if (currlevel >= 17)
music_start(currlevel > 20 ? TMUSIC_L5 : TMUSIC_L6);
else
music_start(leveltype);
Expand Down Expand Up @@ -2189,13 +2185,13 @@ static PlayerStruct *get_plr_mem(PlayerStruct *p)
r = malloc(rand() & 0x7FFF);
pPlayer = (PlayerStruct *)malloc(sizeof(PlayerStruct) * MAX_PLRS);

if(r != NULL) {
if (r != NULL) {
free(r);
}
if(pPlayer == NULL) {
if (pPlayer == NULL) {
return p;
}
if(p != NULL) {
if (p != NULL) {
memcpy(pPlayer, p, sizeof(PlayerStruct) * MAX_PLRS);
free(p);
}
Expand All @@ -2207,7 +2203,7 @@ void alloc_plr()
{
plr = get_plr_mem(NULL);

if(plr == NULL) {
if (plr == NULL) {
app_fatal("Unable to initialize memory");
}

Expand Down
Loading

0 comments on commit 38dbcf7

Please sign in to comment.