[WinZETH] New build
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
str(n)icmp
You're right Hirogen2, but I'm not sure if strcasecmp and strncasecmp are defined in the headers for all compilers. Using allegro's version makes sure that it should compile with any platform that allegro supports.
However, I am not really sure why or where stricmp is defined in my gcc headers when strnicmp is not. I think it would be a good idea to change all instances of stricmp to ustricmp too. Other setups probably aren't certain to have it.
So Chris, in case you want to change them too to be certain about compatibility, here is the location (and context) of each use of stricmp:
> grep -n stricmp *
deu.c:697: if (!strcmp( argv[ 0], "-?") || !stricmp( argv[ 0], "-h") ||
deu.c:698: !stricmp( argv[ 0], "-help"))
deu.c:705: if (!stricmp(argv[0]+1, options[ optnum].short_name) ||
deu.c:706: !stricmp(argv[0]+1, options[ optnum].long_name))
deu.c:823: if (!stricmp( option, options[ optnum].long_name))
deu.c:830: !stricmp(value, "yes") ||
deu.c:831: !stricmp(value, "true") ||
deu.c:832: !stricmp(value, "on") ||
deu.c:833: !stricmp(value, "1")
deu.c:838: !stricmp(value, "no") ||
deu.c:839: !stricmp(value, "false") ||
deu.c:840: !stricmp(value, "off") ||
deu.c:841: !stricmp(value, "0")
deu.c
if (!stricmp( com, wad->filename))
deu.c
if (!stricmp( com, wad->filename))
deu.c
if (!stricmp( com, wad->filename))
deu.c
if (!stricmp( out, wad->filename))
deu.c
if (!stricmp( wadf, wad->filename))
deu.c
if (!stricmp( out, wad->filename))
deu.c
if (!stricmp( com, wad->filename))
deu.c
if (!stricmp( com, wad->filename))
deu.c
if (!stricmp( com, wad->filename))
deu.c
if (!stricmp( out, wad->filename))
deu.c
if (!stricmp( wadf, wad->filename))
deu.c
if (!stricmp( out, wad->filename))
edit.c:215: if (!stricmp( outfile, wad->filename))
readcfg.c:221: if(!stricmp(str, colours))
readcfg.c:262: if(!stricmp(buf, header))
readcfg.c:417: if (stricmp (buff, "[wad]\n") == 0)
readcfg.c:514: if (tok && stricmp (tok, "delete") == 0) // Delete an already-defined thing
readcfg.c:568: if (stricmp (tok, "Poly") == 0)
readcfg.c:572: else if (stricmp (tok, "DeathScript") == 0)
readcfg.c:576: else if (stricmp (tok, "NoAngle") == 0)
readcfg.c:580: else if (stricmp (tok, "Start") == 0)
readcfg.c:585: else if (stricmp (tok, "DMStart") == 0)
readcfg.c:589: else if (stricmp (tok, "SectorAction") == 0)
readcfg.c:593: else if (stricmp (tok, "Resizer") == 0)
readcfg.c:597: else if (stricmp (tok, "Path") == 0)
readcfg.c:606: else if (stricmp (tok, "NoPic") == 0)
readcfg.c
if (stricmp (keys->Key, tok) == 0)
readcfg.c
if(tok && !stricmp(tok, "format")) {
However, I am not really sure why or where stricmp is defined in my gcc headers when strnicmp is not. I think it would be a good idea to change all instances of stricmp to ustricmp too. Other setups probably aren't certain to have it.
So Chris, in case you want to change them too to be certain about compatibility, here is the location (and context) of each use of stricmp:
> grep -n stricmp *
deu.c:697: if (!strcmp( argv[ 0], "-?") || !stricmp( argv[ 0], "-h") ||
deu.c:698: !stricmp( argv[ 0], "-help"))
deu.c:705: if (!stricmp(argv[0]+1, options[ optnum].short_name) ||
deu.c:706: !stricmp(argv[0]+1, options[ optnum].long_name))
deu.c:823: if (!stricmp( option, options[ optnum].long_name))
deu.c:830: !stricmp(value, "yes") ||
deu.c:831: !stricmp(value, "true") ||
deu.c:832: !stricmp(value, "on") ||
deu.c:833: !stricmp(value, "1")
deu.c:838: !stricmp(value, "no") ||
deu.c:839: !stricmp(value, "false") ||
deu.c:840: !stricmp(value, "off") ||
deu.c:841: !stricmp(value, "0")
deu.c
deu.c
deu.c
deu.c
deu.c
deu.c
deu.c
deu.c
deu.c
deu.c
deu.c
deu.c
edit.c:215: if (!stricmp( outfile, wad->filename))
readcfg.c:221: if(!stricmp(str, colours))
readcfg.c:262: if(!stricmp(buf, header))
readcfg.c:417: if (stricmp (buff, "[wad]\n") == 0)
readcfg.c:514: if (tok && stricmp (tok, "delete") == 0) // Delete an already-defined thing
readcfg.c:568: if (stricmp (tok, "Poly") == 0)
readcfg.c:572: else if (stricmp (tok, "DeathScript") == 0)
readcfg.c:576: else if (stricmp (tok, "NoAngle") == 0)
readcfg.c:580: else if (stricmp (tok, "Start") == 0)
readcfg.c:585: else if (stricmp (tok, "DMStart") == 0)
readcfg.c:589: else if (stricmp (tok, "SectorAction") == 0)
readcfg.c:593: else if (stricmp (tok, "Resizer") == 0)
readcfg.c:597: else if (stricmp (tok, "Path") == 0)
readcfg.c:606: else if (stricmp (tok, "NoPic") == 0)
readcfg.c
readcfg.c
More Changes for Linux
More changes are needed, Chris.
Lines 375-377 of deu.h are currently:
Change these filenames to all undercase.
There are still more problems with the makefile. The unix-specific target for clean should be "rm -f depend *.o zeth" rather than "rm -f depend *.o zeth". Also,
should be changed to
As a note, it is standard to name the makefile "Makefile", that is, with a capital M. Additionally, I would have to say that the use of all of the "ifndef UNIX" does not really make things easier. It requires the user to set the environmental variable UNIX, but there is no indication that this needs to be done unless you look inside the makefile. Thus, there should either be a short README or INSTALL with build instructions, or simply have a separate makefile for unix called Makefile.unix or Makefile.linux.
Lines 375-377 of deu.h are currently:
Code: Select all
#define DEU_CONFIG_FILE "ZETH.INI"
#define DEFAULT_CONFIG_FILE "ZETHDEF.INI"
#define DEU_LOG_FILE "ZETH.LOG"There are still more problems with the makefile. The unix-specific target for clean should be "rm -f depend *.o zeth" rather than "rm -f depend *.o zeth". Also,
Code: Select all
zeth.exe: $(OBJS)
$(CC) -o $(EXENAME) $(OBJS) $(LDFLAGS)Code: Select all
ifndef UNIX
zeth.exe: $(OBJS)
$(CC) -o $(EXENAME) $(OBJS) $(LDFLAGS)
else
zeth: $(OBJS)
$(CC) -o $(EXENAME) $(OBJS) $(LDFLAGS)
endif- Chris
- Posts: 2982
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Whoops. Forgot about that. Done.Jim wrote:More changes are needed, Chris.
And sorry about the UNIX thing. I thought Unix and all variants automatically set it, or something. Is there any Linux/ Unix environment variable, or something make automatically sets in Unix or Linux, and rarely/never in DOS/Windows, that'd tell me this?
-
trailerparkboy
color depth
I have an Nviidia vanta card, XP Pro for the OS, the only 2 color depths available are 16 bit and 32 bit. WinZeth only seems to like 256 colors so I'm unable to get it running. Any chance the next release can support additional graphics modes?
TIA
TIA
Another change needed
The following code (lines 68-75 of gfx.c) makes it impossible to enable windowed mode in Linux via the config file (Fullscreeen = False has no effect):
Since Zeth only works in Linux in windowed mode at the moment (at least for me), I suggest removing the ifdef.
Chris, with the changes I have mentioned, Zeth runs fine in Linux.
Code: Select all
#ifndef ALLEGRO_CONSOLE_OK
if(!Fullscreen)
{
// [CR] If windowed, use the desktop color depth(it's faster)
card = GFX_AUTODETECT_WINDOWED;
depth = def_depth;
}
#endif
Chris, with the changes I have mentioned, Zeth runs fine in Linux.
- Chris
- Posts: 2982
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Hmm.. actually, I have that check there because certain OS's(*cough*DOS*cough*) that always have a console, can't do windowed modes. My thinking was that if the OS could do windowing, the console would be disabled by default, so if the console existed, the OS couldn't do windowed modes(compiling with USECONSOLE=1 effectively disables windowed modes). Luckilly, I've been able to remove a bunch of the ALLEGRO_CONSOLE_OK dependancy, but it's still quite prevelant and required, without something else in place.Jim wrote:The following code (lines 68-75 of gfx.c) makes it impossible to enable windowed mode in Linux.
Actually, I think I just came up with something. Should solve that problem, and the problem of the program aborting if it fails to switch between fullscreen <-> windowed.
- Tormentor667
- Posts: 13556
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
- Tormentor667
- Posts: 13556
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
- Chris
- Posts: 2982
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Are you loading pwads? I recently discovered a bug where, in the new cleanup code, it'd free the memory associated with the pwad list, but I failed to realize I forgot to increment the counter, so it kept freeing the first pwad in the list indefinately. Some versions of Windows seems to let you do this, while others would just crash on you. Also, using "invalid" textures or flats(patches, sprites, or non-existant graphics) had a similar bug and would freeze the program. Both problems have been fixed.Tormentor667 wrote:The Quit button doesn't work for me. If I click it, WinZeth freezes.
As for Live-Preview, that may not be included after all. The Doom-like engine I have in the making, it turns out, is too restrictive to properly display ZDoom levels. What I could do, though, is create a simple way to invoke ZDoom(GL) with all the loaded pwads. Since ZDoom automatically builds the nodes and such for you if they're not present, that should be as simple as specifiying where the exe is. I could probably even make it so you can start out in any specific point in the map, if you can use the console "warp <x> <y>" command from the command line.
The things I really want to work on right now, are:
A) Finding out that damned XP problem. Any of you that have problems using WinZETH, do you have Service Pack 1 installed? What about those of you that run it fine under XP?
B) Saving levels to already-existing pwads, without destroying the pwad. That's my biggest gripe with DEU/DETH/ZETH.
