Skip to content

Commit

Permalink
Minor bits
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyPtn committed Oct 18, 2024
1 parent 99a3468 commit e70f842
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 16 deletions.
6 changes: 2 additions & 4 deletions linuxdoom-1.10/r_bsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,10 +425,8 @@ void R_Subsector(int num) {
seg_t *line;
subsector_t *sub;

#ifdef RANGECHECK
if (num >= numsubsectors)
I_Error("R_Subsector: ss {} with numss = {}", num, numsubsectors);
#endif
if (num >= subsectors.size())
I_Error("R_Subsector: ss {} with numss = {}", num, subsectors.size());

sscount++;
sub = &subsectors[num];
Expand Down
4 changes: 2 additions & 2 deletions linuxdoom-1.10/r_things.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ import wad;
import doomstat;
import tables;

#define MINZ (FRACUNIT * 4)
#define BASEYCENTER 100
constexpr auto MINZ = (FRACUNIT * 4);
constexpr auto BASEYCENTER = 100;

// void R_DrawColumn (void);
// void R_DrawFuzzColumn (void);
Expand Down
16 changes: 6 additions & 10 deletions src/status_bar.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ typedef struct {
} st_percent_t;

// Multiple Icon widget
typedef struct {
struct st_multicon_t{
// center-justified location of icons
int x;
int y;
Expand All @@ -140,7 +140,7 @@ typedef struct {
// user data
int data;

} st_multicon_t;
};

// Binary Icon widget

Expand Down Expand Up @@ -1156,17 +1156,13 @@ void STlib_updateBinIcon(st_binicon_t *bi, bool refresh) {
}

void STlib_updateMultIcon(st_multicon_t *mi, bool refresh) {
int w;
int h;
int x;
int y;

if (*mi->on && (mi->oldinum != *mi->inum || refresh) && (*mi->inum != -1)) {
if (mi->oldinum != -1) {
x = mi->x - SHORT(mi->p[mi->oldinum]->leftoffset);
y = mi->y - SHORT(mi->p[mi->oldinum]->topoffset);
w = SHORT(mi->p[mi->oldinum]->width);
h = SHORT(mi->p[mi->oldinum]->height);
auto x = mi->x - SHORT(mi->p[mi->oldinum]->leftoffset);
auto y = mi->y - SHORT(mi->p[mi->oldinum]->topoffset);
auto w = SHORT(mi->p[mi->oldinum]->width);
auto h = SHORT(mi->p[mi->oldinum]->height);

if (y - ST_Y < 0)
I_Error("updateMultIcon: y - ST_Y < 0");
Expand Down

0 comments on commit e70f842

Please sign in to comment.