LsdlDoom 1.4.4.3
OK, I’ve managed to build and run it under Solaris 2.6. The following
changes were needed:
- must link with -lm. I suppose you get away with this on x86 by pure luck
(probably because the pow() function is in microcode since 8087?). - a bus error in r_data.c had to be changed - there was already
a comment hinting on this. I suppose it is the mad unaligned allocation
going on (and which gcc in some way manages to cope with through the
attribute ((packed))), and which it forgets when optimizing memcpy
(to a single word move) since it appears to be aligned. Technically a
gcc bug, but I can’t blame it when it’s stressed with that amount of
non-standard nonsense. - a completely strange #ifndef I386 in r_draw.h had to be lifted out
and not Solaris-specific but bugs fixed:
4) now searches the directory where it’s supposed to be installed for WADs
5) tries 8bpp first, then falls back on the default depth instead of doing
it backwards (gives 4x faster blit speed under X11).
Not as fast as sundgadoom though (an old doom port that uses undocumented
SUN-DGA), but quite nice anyway. I didn’t test network play.
Cheers,
Mattias.
— d_main.c~ Thu Apr 20 12:40:24 2000
+++ d_main.c Sat Apr 22 01:29:44 2000
@@ -787,6 +787,7 @@
- Searches the standard dirs for a named WAD file
- The dirs are:
- .
-
- $DOOMWADDIR
- DOOMWADDIR
- ~/doom
- /usr/share/games/doom
@@ -800,7 +801,7 @@
/* Precalculate a length we will need in the loop */
size_t pl = strlen(wfname) + strlen(ext) + 4;
- for (i=0; i<7; i++) {
- for (i=0; i<8; i++) {
char * p;
const char * d = NULL;
const char * s = NULL;
@@ -811,17 +812,20 @@
if (!(d = getenv(“DOOMWADDIR”))) continue;
case 0:
break;
- case 3:
-
d = "/usr/share/games/doom";
- case 2:
-
case 4:d = DOOMWADDIR; break;
-
d = "/usr/local/share/games/doom";
-
case 5:d = "/usr/share/games/doom"; break;
-
d = "/usr/local/share/games/doom";
-
break;
- case 6:
d = D_DoomExeDir();
- case 2:
- case 3:
s = “doom”;
- case 6:
- case 7:
if (!(d = getenv(“HOME”))) continue;
break;
#ifdef SIMPLECHECKS
— l_video_sdl.c~ Sat Apr 8 18:46:39 2000
+++ l_video_sdl.c Sat Apr 22 02:44:10 2000
@@ -424,7 +424,6 @@
void I_InitGraphics(void)
{
- const int depth_list[] = { 0, 8 };
int w, h;
int n;
Uint32 init_flags;
@@ -459,19 +458,15 @@
if ( M_CheckParm("-fullscreen") ) {
init_flags |= SDL_FULLSCREEN;
} - for ( n=0; n<(sizeof(depth_list)/sizeof(depth_list[0])); ++n ) {
- screen = SDL_SetVideoMode(w, h, depth_list[n], init_flags);
- if ( screen ) {
-
dest_bpp = screen->format->BitsPerPixel;
-
if (I_QueryImageTranslation())
-
break;
-
else
-
screen = NULL;
- }
- if(SDL_VideoModeOK(w, h, 8, init_flags) == 8) {
- screen = SDL_SetVideoMode(w, h, 8, init_flags);
- } else {
- screen = SDL_SetVideoMode(w, h, 0, init_flags);
}
- if ( screen == NULL ) {
-
if(screen == NULL || !I_QueryImageTranslation()) {
I_Error(“Couldn’t set %dx%d video mode [%s]”, w, h, SDL_GetError());
} -
dest_bpp = screen->format->BitsPerPixel;
SDL_WM_SetCaption(lcase_lxdoom, ucase_lxdoom);I_InitImageTranslation();
— r_data.c~ Sat Apr 8 17:00:19 2000
+++ r_data.c Sat Apr 22 01:37:11 2000
@@ -519,7 +519,7 @@
texture->height = SHORT(mtexture->height);
texture->patchcount = SHORT(mtexture->patchcount);
-#if 1
+#if 0
/* The above was #ifndef SPARC, but i got a mail from
* Putera Joseph F NPRI containing:
* I had to use the memcpy function on a sparc machine. The
— r_draw.h~ Sat Apr 8 17:00:19 2000
+++ r_draw.h Sat Apr 22 00:39:09 2000
@@ -52,10 +52,12 @@
// The span blitting interface.
// Hook in assembler or system specific BLT here.
-#ifndef I386
+//#ifndef I386
+#if 0
void R_DrawColumn(void);
void R_DrawTLColumn(void); // drawing translucent textures // phares
-#else
+//#else
+#endif
// CPhipps - core rendering high res ASM support
// For optimal speed at 320xy resolutions we continue to use the
// old hardcoded width asm funcs
@@ -73,7 +75,7 @@
extern void (*R_DrawColumn)(void);
extern void (*R_DrawTLColumn)(void);
-#endif
+//#endif
void R_DrawFuzzColumn(void); // The Spectre/Invisibility effect.