Skip to content

Commit

Permalink
Merge remote-tracking branch 'eduke32/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Hendricks266 committed Sep 3, 2023
2 parents a170f92 + 25fa3ca commit 7e3541f
Show file tree
Hide file tree
Showing 23 changed files with 813 additions and 546 deletions.
3 changes: 3 additions & 0 deletions source/build/include/build.h
Expand Up @@ -589,6 +589,7 @@ enum
TSPR_FLAGS_NO_SHADOW = 1u<<2u,
TSPR_FLAGS_INVISIBLE_WITH_SHADOW = 1u<<3u,
TSPR_FLAGS_SLAB = 1u<<4u,
TSPR_FLAGS_NO_GLOW = 1u<<5u,
};

EXTERN int32_t guniqhudid;
Expand Down Expand Up @@ -1019,6 +1020,8 @@ EXTERN char faketile[bitmap_size(MAXTILES)];
EXTERN char *faketiledata[MAXTILES];
EXTERN int faketilesize[MAXTILES];

EXTERN uint8_t tilefilenum[MAXTILES];

EXTERN char spritecol2d[MAXTILES][2];
EXTERN uint8_t tilecols[MAXTILES];

Expand Down
18 changes: 14 additions & 4 deletions source/build/src/2d.cpp
Expand Up @@ -1477,7 +1477,7 @@ void editorDraw2dScreen(const vec3_t *pos, int16_t cursectnum, int16_t ange, int
if (!m32_sideview)
{
#ifndef YAX_ENABLE
for (i=numwalls-1; i>=0; i--)
for (int32_t i = numwalls-1; i >= 0; i--)
editorDraw2dWall(i, posxe, posye, posze, zoome, 0);
#else
if (alwaysshowgray)
Expand Down Expand Up @@ -1552,22 +1552,32 @@ void editorDraw2dScreen(const vec3_t *pos, int16_t cursectnum, int16_t ange, int

for (int32_t i = 0; i < m32_swcnt; i++) // shouldn't it go the other way around?
{
int32_t skipSector;
int32_t j = m32_wallsprite[i];
if (j<MAXWALLS)
{
if (skipgraysectors)
YAX_SKIPSECTOR(sectorofwall(j));
{
skipSector = sectorofwall(j);
YAX_SKIPSECTOR(skipSector);
}

if (alwaysshowgray || !bitmap_test(graybitmap, j))
editorDraw2dWall(j, posxe, posye, posze, zoome, !!bitmap_test(graybitmap, j));
}
else
{
if (skipgraysectors)
YAX_SKIPSECTOR(sectorofwall(sprite[j-MAXWALLS].sectnum));
{
skipSector = sectorofwall(sprite[j-MAXWALLS].sectnum);
YAX_SKIPSECTOR(skipSector);
}

if (!alwaysshowgray && sprite[j-MAXWALLS].sectnum>=0)
YAX_SKIPSECTOR(sprite[j-MAXWALLS].sectnum);
{
skipSector = sprite[j-MAXWALLS].sectnum;
YAX_SKIPSECTOR(skipSector);
}

editorDraw2dSprite(j-MAXWALLS, posxe, posye, posze, zoome);
}
Expand Down
2 changes: 1 addition & 1 deletion source/build/src/baselayer.cpp
Expand Up @@ -237,7 +237,7 @@ void engineSetupLogging(int &argc, char **argv)
});
loguru::Options initopts;
initopts.verbosity_flag = nullptr;
initopts.signal_options.unsafe_signal_handler = true;
initopts.signal_options.unsafe_signal_handler = false;
loguru::init(argc, argv, initopts);
}

Expand Down
18 changes: 13 additions & 5 deletions source/build/src/build.cpp
Expand Up @@ -2899,6 +2899,8 @@ void SetFirstWall(int32_t sectnum, int32_t wallnum, int32_t alsoynw)
{
#ifdef YAX_ENABLE
int32_t i, j, k=0;
#else
UNREFERENCED_PARAMETER(alsoynw);
#endif
const sectortype *sec = &sector[sectnum];

Expand Down Expand Up @@ -3153,6 +3155,8 @@ static int32_t M32_InsertPoint(int32_t thewall, int32_t dax, int32_t day, int16_
return m|(j<<16);
}
else
#else
UNREFERENCED_PARAMETER(onewnumwalls);
#endif
{
insertpoint(thewall, dax,day, mapwallnum);
Expand Down Expand Up @@ -6704,8 +6708,8 @@ end_yax: ;
joinsector[1] = i;

const int s1to0wall = find_nextwall(i, joinsector[0]);
const int s0to1wall = s1to0wall == -1 ? -1 : wall[s1to0wall].nextwall;
#ifdef YAX_ENABLE
const int s0to1wall = s1to0wall == -1 ? -1 : wall[s1to0wall].nextwall;
int16_t jbn[2][2]; // [join index][c/f]

for (k=0; k<2; k++)
Expand Down Expand Up @@ -7770,7 +7774,11 @@ check_next_sector: ;

if (numwalls==expectedNumwalls)
{
#ifdef YAX_ENABLE
if (doSectorSplit && cb<0 && fb<0)
#else
if (doSectorSplit)
#endif
{
if (firstwallflag)
{
Expand Down Expand Up @@ -11287,7 +11295,7 @@ void test_map(int32_t mode)
// and a possible extra space not in testplay_addparam,
// the length should be Bstrlen(game_executable)+Bstrlen(param)+(slen+1)+2+1.

char *fullparam = (char *)Xmalloc(Bstrlen(game_executable)+Bstrlen(param)+slen+4);
char *fullparam = (char *)Xmalloc(Bstrlen(game_executable)+Bstrlen(param)+slen+8);
Bsprintf(fullparam,"\"%s\"",game_executable);

if (testplay_addparam)
Expand Down Expand Up @@ -11319,19 +11327,19 @@ void test_map(int32_t mode)

if (!CreateProcess(NULL,fullparam,NULL,NULL,0,0,NULL,NULL,&si,&pi))
message("Error launching the game!");
else WaitForSingleObject(pi.hProcess,INFINITE);
}
#else
Bstrcat(fullparam, " &");
if (current_cwd[0] != '\0')
{
buildvfs_chdir(program_origcwd);
if (system(fullparam))
message("Error launching the game!");
buildvfs_chdir(current_cwd);
}
else system(fullparam);
else if (system(fullparam))
message("Error launching the game!");
#endif
printmessage16("Game process exited");
// mouseInit();
clearkeys();

Expand Down

0 comments on commit 7e3541f

Please sign in to comment.