Re: [opendemo-devel] zlib
Status: Beta
Brought to you by:
girlich
From: Conor D. <co...@ma...> - 2002-01-11 08:40:27
|
Hello, ----- Original Message ----- From: "Dr. Uwe Girlich" <Uwe...@ph...> To: "OpenDemo Development List" <ope...@li...> Sent: Friday, January 11, 2002 1:06 AM Subject: Re: [opendemo-devel] zlib > [...] > > If you guys want to hack at it, I can commit it to cvs even > > though it is broken (all the zlib stuff is in the opendemo/game/zlib > > directory). > I did not find a zlib directory in opendem/src/q3a/opendemo/game/ and we don't > have a opendemo/game directory at all. So did you check it in already? > I would prefer opendem/src/libs/zlib as a more generic place. I meant that was the layout in my working directory (full path is opendemo/src/q3a/opendemo/game/zlib). IMO opendemo/src/libs/ should be for code that is not quake3-specific. The stuff that is in there right now can be used in other things, but right now it is hard for them to tell if they should #include <stdio.h> or #include "q_shared.h" (#ifdef Q3_VM is not good enough because "q_shared.h" should be used when compiling a native library for a quake3 mod). As I said in my earlier message, we could just move everything inside the mod's game directory and use them just for quake3 mods. Is the stuff in there really that useful outside of quake3? > > Everything else should still work if you don't try to use a gzip > > file. > So you used the standard zlib interface, which reverts to the plain file > behaviour, if the file was not compressed. Correct. > [...] > > The zlib stuff shares some functionality with > > od_filebuf.c, so maybe the reimplimentation could combine the two. > I think odFread() should be replaces by gzread() and nothing more. This can > easily be done before or after the ring-buffer comes in place. I had thought that zlib kept its own buffer for decompressed data, but it appears that it does not. > My ring-buffer comes along nicely, the code is completely typed in, compiles > without warnings with GCC and qvm and does not crash, but it doesn't do > anything useful yet. I hope for a bit more debugging time over the weekend. I'll commit my code if you commit yours... :) I'll move the zlib code over from the test mod to the opendemo tree (in opendemo/src/libs) tomorrow. -Conor |