This will be an ongoing thread related to engine code in Xonotic/DarkPlaces.
(I don't see a issue report ability on the github for Xonotic. I engine code a lot and will be maintaining a modified DarkPlaces for the foreseabe future. If there is a number like "1008", I used that as personal tracking # in the code. I wish to thank the Xonotic team for their years of advancement and hardening of DarkPlaces
x. darkplaces-wgl.vcproj has 2 errors upon compile on 0.8.5 (prior version did not).
vid_shared.c The fix is simply 1.0 ---> 1.0f
x. Intel Integrated video -- DarkPlaces spams "Fragment shader compile log: No errors." Now perhaps the video driver is at fault for returning "No errors." as the result of a shader compile, but this is Intel Integrated video and there are probably 200,000,000 computers with them. Anyway, the fix ...
gl_backend.c
x. darkplaces-wgl.vcproj should have /LARGEADDRESSAWARE in linker options. When compiled without this, memory allocations can fail when crossing the 2 GB mark.
x. I have never seen this in occur in Xonotic because uses the viewzoom field, but DarkPlaces has a very odd zoom effect starting a map in Quake.
The fix is initializing the viewzoom field.
cl_main.c - CL_ClearState
x. On a Windows 10 computer, I have experienced a situation where video restart from windowed mode to fullscreen while the engine has the mouse captured causes the mouse to forever more move the player and never mouselook. This does not occur if the mouse is not captured. This applies to 0.8.3 for sure, I have not tested 0.8.5. If I think of what I want to look for, I'll find out the issue, solve it and post the solution here.
x.The official DarkPlaces engine download does not have a "DarkPlaces" icon in the top left corner of the engine window and instead has the "missing icon" icon. Xonotic does have a window icon in the top left corner.
x. DarkPlaces: The Mac version download does not have a valid digital signature. If you set the Mac to allow it anyway,, where is DarkPlaces looking for the data? I have not actually been able to get DarkPlaces to work on a Mac. This is compounded by Mac not really allowing command line parameters for a gui application, so I can't -nohome it or do -basedir <something>.
x. In both Xonotic and DarkPlaces, if you are holding down +attack (like mouse 1) and ALT TAB out of the window in Windows, you will be firing forever until you quit the engine and restart it.
Solve: vid_wgl.c
(I don't see a issue report ability on the github for Xonotic. I engine code a lot and will be maintaining a modified DarkPlaces for the foreseabe future. If there is a number like "1008", I used that as personal tracking # in the code. I wish to thank the Xonotic team for their years of advancement and hardening of DarkPlaces
x. darkplaces-wgl.vcproj has 2 errors upon compile on 0.8.5 (prior version did not).
vid_shared.c The fix is simply 1.0 ---> 1.0f
Code:
void VID_ApplyGammaToColor(const float *rgb, float *out)
{
int i;
if (cachecolorenable)
{
for (i = 0; i < 3; i++)
out[i] = pow(cachecontrastboost * rgb[i] / ((cachecontrastboost - 1) * rgb[i] + 1), 1.0f / invpow(0.5f, 1 - cachegrey[i])) * cachewhite[i] + cacheblack[i];
}
else
{
for (i = 0; i < 3; i++)
out[i] = pow(cachecontrastboost * rgb[i] / ((cachecontrastboost - 1) * rgb[i] + 1), 1.0f / cachegamma) * cachecontrast + cachebrightness;
}
}
x. Intel Integrated video -- DarkPlaces spams "Fragment shader compile log: No errors." Now perhaps the video driver is at fault for returning "No errors." as the result of a shader compile, but this is Intel Integrated video and there are probably 200,000,000 computers with them. Anyway, the fix ...
gl_backend.c
Code:
if (compilelog[0]) { // Baker 1008 - fix when it reports "no error" and the next line only sees that it contains "error" and prints a false warning.
if (developer_extra.integer || (developer.integer && strcasecmp(compilelog,"No errors.") !=0 )) {
if (strstr(compilelog, "error") || strstr(compilelog, "ERROR") || strstr(compilelog, "Error") || strstr(compilelog, "WARNING") || strstr(compilelog, "warning") || strstr(compilelog, "Warning"))
{
int i, j, pretextlines = 0;
for (i = 0;i < numstrings - 1;i++)
for (j = 0;strings[i][j];j++)
if (strings[i][j] == '\n')
pretextlines++;
Con_Printf("%s shader compile log:\n%s\n(line offset for any above warnings/errors: %i)\n", shadertype, compilelog, pretextlines);
}
}
}
x. darkplaces-wgl.vcproj should have /LARGEADDRESSAWARE in linker options. When compiled without this, memory allocations can fail when crossing the 2 GB mark.
x. I have never seen this in occur in Xonotic because uses the viewzoom field, but DarkPlaces has a very odd zoom effect starting a map in Quake.
The fix is initializing the viewzoom field.
cl_main.c - CL_ClearState
Code:
// set up the float version of the stats array for easier access to float stats
cl.statsf = (float *)cl.stats;
cl.num_entities = 0;
cl.num_static_entities = 0;
cl.num_brushmodel_entities = 0;
cl.stats[STAT_VIEWZOOM] = 255; // Baker 1006
x. On a Windows 10 computer, I have experienced a situation where video restart from windowed mode to fullscreen while the engine has the mouse captured causes the mouse to forever more move the player and never mouselook. This does not occur if the mouse is not captured. This applies to 0.8.3 for sure, I have not tested 0.8.5. If I think of what I want to look for, I'll find out the issue, solve it and post the solution here.
x.The official DarkPlaces engine download does not have a "DarkPlaces" icon in the top left corner of the engine window and instead has the "missing icon" icon. Xonotic does have a window icon in the top left corner.
x. DarkPlaces: The Mac version download does not have a valid digital signature. If you set the Mac to allow it anyway,, where is DarkPlaces looking for the data? I have not actually been able to get DarkPlaces to work on a Mac. This is compounded by Mac not really allowing command line parameters for a gui application, so I can't -nohome it or do -basedir <something>.
x. In both Xonotic and DarkPlaces, if you are holding down +attack (like mouse 1) and ALT TAB out of the window in Windows, you will be firing forever until you quit the engine and restart it.
Solve: vid_wgl.c
Code:
// Baker 1002.2
void Key_Release_Keys (void)
{
int keynum;
for (keynum = 0 ; keynum < MAX_KEYS /*1024 in dp*/; keynum++) {
if (keydown[keynum])
Key_Event (keynum, /*ascii*/ 0, /*down*/ false);
}
}
Code:
if (!fActive)
{
VID_SetMouse(false, false, false);
Key_Release_Keys (); // Baker 1002
if (vid_isfullscreen)
{
if (gldll)
ChangeDisplaySettings (NULL, CDS_FULLSCREEN);
vid_wassuspended = true;
}
VID_RestoreSystemGamma();
}