Commit graph

3857 commits

Author SHA1 Message Date
Fabian Greffrath
80ed045444 doc: update the HACKING document with a rule for casts
Fixes #1032
2018-05-06 13:44:01 +02:00
Fabian Greffrath
9a8f5dc9d9 w_merge.c: replace strncpy() with memcpy() in FindSpriteFrame()
The sprname field of struct sprite_frame_t is supposed to contain the
four byte prefix for the sprite names, not an actual string with a
NULL byte delimiter.

This fixes a new compiler warning detected by @turol, fixes #1031.

Thanks @turol and @AXDOOMER for the discussion!
2018-05-06 13:23:02 +02:00
Turo Lamminen
00311e89f5 heretic: Make MN_TextBWidth parameter const 2018-04-24 20:16:01 +03:00
Turo Lamminen
fe5173fde9 heretic: Make MN_DrTextB text parameter const 2018-04-24 20:16:01 +03:00
Turo Lamminen
c0f32f9923 heretic: Make MN_TextAWidth parameter const 2018-04-24 20:16:01 +03:00
Turo Lamminen
61fe0bfe53 heretic: Make MN_DrTextA text parameter const 2018-04-24 20:16:01 +03:00
Turo Lamminen
475b0601c8 doom: Fix const correctness issue in intermission load/unload callbacks 2018-04-24 20:16:01 +03:00
Turo Lamminen
cd852bc9d2 doom: Fix const correctness issue in graphics load/unload callbacks 2018-04-24 20:16:01 +03:00
Turo Lamminen
d73baa45d9 doom: Make spritename variable const 2018-04-24 20:16:01 +03:00
Turo Lamminen
4fcf2510dc doom: Mark internal menu functions static 2018-04-24 19:32:11 +03:00
Turo Lamminen
85546c0353 doom: Remove unused function M_DrawSelCell 2018-04-24 19:22:28 +03:00
Turo Lamminen
952ed0699f doom: Remove unused function M_DrawEmptyCell 2018-04-24 19:21:05 +03:00
Turo Lamminen
22de9c27b2 doom: Remove unused function M_StopMessage 2018-04-24 19:19:53 +03:00
Turo Lamminen
c4ceefafa0 doom: Remove declaration of nonexistent function M_StartGame 2018-04-24 19:14:41 +03:00
Turo Lamminen
f4474aead4 doom: Fix const correctness issue in R_FillBackScreen 2018-04-24 19:10:30 +03:00
Turo Lamminen
6213afee9f doom: Fix const correctness issue in P_InitPicAnims 2018-04-24 19:08:52 +03:00
Turo Lamminen
c73cc8862a doom: Fix const correctness issue in M_Drawer 2018-04-24 19:04:50 +03:00
Turo Lamminen
e675c26205 doom: Make M_StartMessage string parameter const 2018-04-24 19:02:00 +03:00
Turo Lamminen
e1215041ac doom: Make messageString variable const 2018-04-24 18:57:53 +03:00
Turo Lamminen
f9a3dac3b3 doom: Make M_StringHeight parameter const 2018-04-24 18:51:49 +03:00
Turo Lamminen
f60da3ca34 doom: Make R_TextureNumForName parameter const 2018-04-24 18:45:23 +03:00
Turo Lamminen
4c9a70adf6 doom: Make R_CheckTextureNumForName parameter const 2018-04-24 18:43:31 +03:00
Turo Lamminen
8dd2c9df0f doom: Make R_FlatNumForName parameter const 2018-04-24 18:40:56 +03:00
Turo Lamminen
80c9bb6140 doom: Make F_CastPrint parameter const 2018-04-24 18:39:11 +03:00
Turo Lamminen
31191bbb84 doom: Fix const correctness issue in F_TextWrite 2018-04-24 18:36:02 +03:00
Simon Howard
1dd9288f90
Merge pull request #1019 from turol/const
Fix some const correctness issues in doom-specific code
2018-04-22 16:19:19 -04:00
Simon Howard
41936632e0 Fix broken build caused by previous commit. 2018-04-21 00:38:37 -04:00
Simon Howard
ca93f90c55 net: Improve game mismatch error messages.
If game mode/mission don't match then the client can't connect to the
server. But give some details about the mismatch in the error message
to aid in debugging.

Thanks to AgitationSkeleton and GuyNamedErick for help with this.
2018-04-20 23:00:36 -04:00
Simon Howard
df34acd44e net: Move server reject message into error message.
Since we surface error messages in dialog boxes, it's important that
the full context of why a connection attempt was rejected is shown to
the user, otherwise it just appears as "failed to connect" with no
indication of why or how to fix the problem.

Thanks to AgitationSkeleton and GuyNamedErick for help identifying this
problem.
2018-04-20 22:43:22 -04:00
Jonathan Dowland
ab13474904
Merge pull request #1024 from jmtd/825-delete-swgl-check
Remove the unreliable Software GL check
2018-04-16 23:14:39 +01:00
Jonathan Dowland
3656db4204 Remove the unreliable Software GL check
This check was designed to warn users if they did not have hardware
acceleration that performance might be poor and to suggest toggling
force_software_renderer. However the check is not reliable: it can't
determine whether hardware acceleration is taking place on Linux, as
Mesa front-ends both hardware and software implementations.

We explored alternatives (checking SDL_GL_ACCELERATED_VISUAL) but
these proved similarly unreliable.

On Linux, GLX offers glxIsDirect, but this is of no use where GLX
is not available, including (I think) Linux framebuffer or Wayland.

Rather than continue to mislead people, delete the test and warning.

Fixes #825.
2018-04-16 16:47:51 +01:00
Fabian Greffrath
e59bb5f2e0 video: some more pixel_t consistency 2018-04-09 12:47:21 +02:00
Turo Lamminen
68ed36b2a7 doom: Fix const correctness issue in PrintDehackedBanners 2018-04-03 19:24:51 +03:00
Turo Lamminen
ccafade586 doom: Fix const correctness issue in GetGameName 2018-04-03 19:12:00 +03:00
Turo Lamminen
f7ebac1b3c doom: Make G_DeferedPlayDemo parameter const 2018-04-03 19:09:35 +03:00
Turo Lamminen
1c98a7fd9e doom: Make defdemoname variable static 2018-04-03 19:08:34 +03:00
Turo Lamminen
9048276688 doom: Make defdemoname global variable const 2018-04-03 19:07:57 +03:00
Turo Lamminen
265bd29b9a doom: Make pagename global variable const 2018-04-03 19:04:41 +03:00
Turo Lamminen
ea98dd6d82 doom: Fix const correctness issue in EnableLoadingDisk 2018-04-03 18:59:41 +03:00
Turo Lamminen
1e690ae521 doom: Make player_t message member const 2018-04-03 18:56:10 +03:00
Turo Lamminen
8ea97f6bd6 p_save.g: Make saveg_writep parameter const 2018-04-03 18:55:03 +03:00
Mike Swanson
8d3e982584 Revert "video: allow setting linear filtering via config file"
Due to a misunderstanding of the rendering buffers, the prior commit
was a little pointless.  To achieve the same effect, instead use
`max_scaling_buffer_pixels 64000` in the extra cfg.

This reverts commit f48bc14086.
2018-04-01 00:41:03 -07:00
Mike Swanson
f48bc14086 video: allow setting linear filtering via config file
Suggested by @vanfanel in #1009, nearest filtering can produce poor
results in low resolutions.  Now, in the extra config file, scaling_filter
can be set to "linear" which normally results in Blur-O-Vision, but
might be desirable in low resolutions.
2018-03-31 11:55:10 -07:00
Turo Lamminen
98b86be284 Make DEH_Warning msg parameter const 2018-03-31 17:53:30 +03:00
Turo Lamminen
eb3531a451 Make DEH_Error msg parameter const 2018-03-31 17:52:33 +03:00
Turo Lamminen
b9107f377c Make DEH_LoadFile parameter const 2018-03-31 17:51:38 +03:00
Turo Lamminen
904f70c076 Make DEH_OpenFile parameter const 2018-03-31 17:51:08 +03:00
Turo Lamminen
1b1b07dab2 Make D_FindWADByName parameter const 2018-03-31 17:47:00 +03:00
Turo Lamminen
bafe7eb1b9 d_iwad: Make DirIsFile filename parameter const 2018-03-31 17:45:07 +03:00
Turo Lamminen
b1af844e71 d_iwad: Make DirIsFile path parameter const 2018-03-31 17:44:32 +03:00