Skip to content

Commit 5098111

Browse files
committed
Merge branch 'stable' into protobreak
2 parents ff1a747 + c7a80e0 commit 5098111

22 files changed

+951
-563
lines changed

ci/fedora.Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ WORKDIR odamex
44

55
COPY . .
66

7+
RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
8+
RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
9+
710
# Packages
811
RUN set -x && \
912
dnf -y install gcc-c++ alsa-lib-devel libcurl-devel \

client/src/am_map.cpp

+39-28
Original file line numberDiff line numberDiff line change
@@ -1832,7 +1832,7 @@ void AM_Drawer()
18321832

18331833
if (!(viewactive && am_overlay < 2) && !hu_font[0].empty())
18341834
{
1835-
char line[64 + 10];
1835+
std::string line;
18361836
const int time = level.time / TICRATE;
18371837

18381838
const int text_height = (W_ResolvePatchHandle(hu_font[0])->height() + 1) * CleanYfac;
@@ -1842,12 +1842,12 @@ void AM_Drawer()
18421842
{
18431843
if (am_showmonsters)
18441844
{
1845-
sprintf(line, TEXTCOLOR_RED "MONSTERS:" TEXTCOLOR_NORMAL " %d / %d",
1845+
StrFormat(line, TEXTCOLOR_RED "MONSTERS:" TEXTCOLOR_NORMAL " %d / %d",
18461846
level.killed_monsters,
18471847
(level.total_monsters + level.respawned_monsters));
18481848

18491849
int x, y;
1850-
const int text_width = V_StringWidth(line) * CleanXfac;
1850+
const int text_width = V_StringWidth(line.c_str()) * CleanXfac;
18511851

18521852
if (AM_OverlayAutomapVisible())
18531853
{
@@ -1860,17 +1860,17 @@ void AM_Drawer()
18601860
y = OV_Y - (text_height * 2) + 1;
18611861
}
18621862

1863-
screen->DrawTextClean(CR_GREY, x, y, line);
1863+
screen->DrawTextClean(CR_GREY, x, y, line.c_str());
18641864
}
18651865

18661866
if (am_showitems)
18671867
{
1868-
sprintf(line, TEXTCOLOR_RED "ITEMS:" TEXTCOLOR_NORMAL " %d / %d",
1868+
StrFormat(line, TEXTCOLOR_RED "ITEMS:" TEXTCOLOR_NORMAL " %d / %d",
18691869
level.found_items,
18701870
level.total_items);
18711871

18721872
int x, y;
1873-
const int text_width = V_StringWidth(line) * CleanXfac;
1873+
const int text_width = V_StringWidth(line.c_str()) * CleanXfac;
18741874

18751875
if (AM_OverlayAutomapVisible())
18761876
{
@@ -1883,15 +1883,15 @@ void AM_Drawer()
18831883
y = OV_Y - (text_height * 3) + 1;
18841884
}
18851885

1886-
screen->DrawTextClean(CR_GREY, x, y, line);
1886+
screen->DrawTextClean(CR_GREY, x, y, line.c_str());
18871887
}
18881888

18891889
if (am_showsecrets)
18901890
{
1891-
sprintf(line, TEXTCOLOR_RED "SECRETS:" TEXTCOLOR_NORMAL " %d / %d",
1891+
StrFormat(line, TEXTCOLOR_RED "SECRETS:" TEXTCOLOR_NORMAL " %d / %d",
18921892
level.found_secrets, level.total_secrets);
18931893
int x, y;
1894-
const int text_width = V_StringWidth(line) * CleanXfac;
1894+
const int text_width = V_StringWidth(line.c_str()) * CleanXfac;
18951895

18961896
if (AM_OverlayAutomapVisible())
18971897
{
@@ -1904,7 +1904,7 @@ void AM_Drawer()
19041904
y = OV_Y - (text_height * 2) + 1;
19051905
}
19061906

1907-
screen->DrawTextClean(CR_GREY, x, y, line);
1907+
screen->DrawTextClean(CR_GREY, x, y, line.c_str());
19081908
}
19091909
}
19101910

@@ -1931,11 +1931,10 @@ void AM_Drawer()
19311931
break;
19321932
}
19331933

1934-
strncpy(line, GStrings.getIndex(firstmap + level.levelnum - mapoffset),
1935-
ARRAY_LENGTH(line) - 1);
1934+
line += GStrings.getIndex(firstmap + level.levelnum - mapoffset);
19361935

19371936
int x, y;
1938-
const int text_width = V_StringWidth(line) * CleanXfac;
1937+
const int text_width = V_StringWidth(line.c_str()) * CleanXfac;
19391938

19401939
if (AM_OverlayAutomapVisible())
19411940
{
@@ -1948,23 +1947,35 @@ void AM_Drawer()
19481947
y = OV_Y - (text_height * 1) + 1;
19491948
}
19501949

1951-
screen->DrawTextClean(CR_RED, x, y, line);
1950+
screen->DrawTextClean(CR_RED, x, y, line.c_str());
19521951
}
19531952
else
19541953
{
1955-
strcpy(line, TEXTCOLOR_RED);
1956-
int pos = strlen(line);
1957-
for (int i = 0; i < 8 && level.mapname[i]; i++, pos++)
1958-
line[pos] = level.mapname[i];
1954+
if (level.clearlabel)
1955+
{
1956+
line.clear();
1957+
}
1958+
else
1959+
{
1960+
line = TEXTCOLOR_RED;
1961+
1962+
// use user provided label if one exists
1963+
if (!level.label.empty())
1964+
{
1965+
line += level.label + TEXTCOLOR_NORMAL;
1966+
}
1967+
else
1968+
{
1969+
for (int i = 0; i < 8 && level.mapname[i]; i++)
1970+
line += level.mapname[i];
1971+
line += ":" TEXTCOLOR_NORMAL " ";
1972+
}
1973+
}
19591974

1960-
line[pos++] = ':';
1961-
strcpy(line + pos, TEXTCOLOR_NORMAL);
1962-
pos = strlen(line);
1963-
line[pos++] = ' ';
1964-
strcpy(&line[pos], level.level_name);
1975+
line += level.level_name;
19651976

19661977
int x, y;
1967-
const int text_width = V_StringWidth(line) * CleanXfac;
1978+
const int text_width = V_StringWidth(line.c_str()) * CleanXfac;
19681979

19691980
if (AM_OverlayAutomapVisible())
19701981
{
@@ -1977,16 +1988,16 @@ void AM_Drawer()
19771988
y = OV_Y - (text_height * 1) + 1;
19781989
}
19791990

1980-
screen->DrawTextClean(CR_GREY, x, y, line);
1991+
screen->DrawTextClean(CR_GREY, x, y, line.c_str());
19811992
}
19821993

19831994
if (am_showtime)
19841995
{
1985-
sprintf(line, " %02d:%02d:%02d", time / 3600, (time % 3600) / 60,
1996+
StrFormat(line, " %02d:%02d:%02d", time / 3600, (time % 3600) / 60,
19861997
time % 60); // Time
19871998

19881999
int x, y;
1989-
const int text_width = V_StringWidth(line) * CleanXfac;
2000+
const int text_width = V_StringWidth(line.c_str()) * CleanXfac;
19902001

19912002
if (AM_OverlayAutomapVisible())
19922003
{
@@ -1999,7 +2010,7 @@ void AM_Drawer()
19992010
y = OV_Y - (text_height * 1) + 1;
20002011
}
20012012

2002-
screen->DrawTextClean(CR_GREY, x, y, line);
2013+
screen->DrawTextClean(CR_GREY, x, y, line.c_str());
20032014
}
20042015
}
20052016
}

client/src/cl_level.cpp

+10-1
Original file line numberDiff line numberDiff line change
@@ -545,10 +545,19 @@ void G_DoLoadLevel (int position)
545545
// [ML] 5/11/06 - remove sky2 remenants
546546
// [SL] 2012-03-19 - Add sky2 back
547547
sky1texture = R_TextureNumForName (level.skypic.c_str());
548+
sky1scrolldelta = level.sky1ScrollDelta;
549+
sky1columnoffset = 0;
550+
sky2columnoffset = 0;
548551
if (!level.skypic2.empty())
549-
sky2texture = R_TextureNumForName (level.skypic2.c_str());
552+
{
553+
sky2texture = R_TextureNumForName(level.skypic2.c_str());
554+
sky2scrolldelta = level.sky2ScrollDelta;
555+
}
550556
else
557+
{
551558
sky2texture = 0;
559+
sky2scrolldelta = 0;
560+
}
552561

553562
// [RH] Set up details about sky rendering
554563
R_InitSkyMap ();

client/src/m_menu.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -1504,14 +1504,14 @@ static void M_PlayerSetupDrawer()
15041504
R_BuildPlayerTranslation(0, player_color);
15051505
V_ColorMap = translationref_t(translationtables, 0);
15061506

1507+
// Draw box surrounding fire and player:
1508+
screen->DrawPatchClean(W_CachePatch("M_PBOX"), 320 - 88 - 32 + 36,
1509+
PSetupDef.y + LINEHEIGHT * 3 + 22);
1510+
15071511
screen->DrawTranslatedPatchClean (W_CachePatch (sprframe->lump[0]),
15081512
320 - 52 - 32, PSetupDef.y + LINEHEIGHT*3 + 46);
15091513
}
15101514

1511-
// Draw box surrounding fire and player:
1512-
screen->DrawPatchClean (W_CachePatch ("M_PBOX"),
1513-
320 - 88 - 32 + 36, PSetupDef.y + LINEHEIGHT*3 + 22);
1514-
15151515
// Draw team setting
15161516
{
15171517
const team_t team = D_TeamByName(cl_team.cstring());

0 commit comments

Comments
 (0)