tga2lmp
Moderator: InsideQC Admins
10 posts
• Page 1 of 1
tga2lmp
Command line utility that converts TGA files to Quake LMP format in a folder.
Source + .exe: http://quake-1.com/docs/utils/tga2lmp.zip
Probably no one is interested in this
I'm not either. Heheh. 2nd mini utility completed in a few hours, the utility I want is 3 or 4 utilities out.
The one that will let me sporadically make textures without converting anything to anything all the overhead happens automatically.
/ Note: It is a moderate pain in the arse to change C99 code so that Visual Studio likes it. C99 lets you do some funny things like make fixed arrays in functions with a variable size and other little things that make coding less of a hassle.
Source + .exe: http://quake-1.com/docs/utils/tga2lmp.zip
Probably no one is interested in this
The one that will let me sporadically make textures without converting anything to anything all the overhead happens automatically.
/ Note: It is a moderate pain in the arse to change C99 code so that Visual Studio likes it. C99 lets you do some funny things like make fixed arrays in functions with a variable size and other little things that make coding less of a hassle.
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
Re: tga2lmp
Just use my CB pack for C99
the minimal version aint that big anyway hehe.
Saves porting it to
Saves porting it to
Productivity is a state of mind.
-

revelator - Posts: 2567
- Joined: Thu Jan 24, 2008 12:04 pm
- Location: inside tha debugger
Re: tga2lmp
Or use C++ - you can restrict yourself to the C-like subset of it.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
We knew the words, we knew the score, we knew what we were fighting for
-

mh - Posts: 2292
- Joined: Sat Jan 12, 2008 1:38 am
Re: tga2lmp
can probably also use stlport for msvc missing subsets
weirdly enough microsoft states that they wont expand a lot on c99 instead they focus on the upcomming c++11.
Productivity is a state of mind.
-

revelator - Posts: 2567
- Joined: Thu Jan 24, 2008 12:04 pm
- Location: inside tha debugger
Re: tga2lmp
I dealt with the differences prior to starting the thread. Had to malloc/free a few times, rewrite some stuff here and there.
C99 even Clang/LLVM vs. GCC with the C99 flag aren't even quite the same.
C99 even Clang/LLVM vs. GCC with the C99 flag aren't even quite the same.
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
Re: tga2lmp
Clangs c++ subset is lacking a few things though improving.
Gcc has had C99 since the initial 4 release 4.1 i think. Msvc from v 6 could use it with stlport, i think they implemented some of it natively with msvc2003.
Its mildly annoying to port indeed but things will be much worse when c++11 makes it in since it will be abi incompatible with all prior releases (shudder).
Gcc has had C99 since the initial 4 release 4.1 i think. Msvc from v 6 could use it with stlport, i think they implemented some of it natively with msvc2003.
Its mildly annoying to port indeed but things will be much worse when c++11 makes it in since it will be abi incompatible with all prior releases (shudder).
Productivity is a state of mind.
-

revelator - Posts: 2567
- Joined: Thu Jan 24, 2008 12:04 pm
- Location: inside tha debugger
Re: tga2lmp
Again, no one in their right mind should be interested in this, but this utility library has support for exporting tga, mip, lmp and for writing WAD2, WAD3, PAK:
http://quake-1.com/docs/utils/writetga.zip
This is the source for a command line utility. As strange as it sounds, I'm not interested in command line utilities, but I can test stuff without worrying about overhead and write clean and user-friendly code.
But the underlying code can generate a pak or wad file in ridiculously easy way. The code goes like this: PakFile_Build_Start (blah) ... PakFile_Build_Add_File (blah) ... PakFile_Build_Finish (blah).
http://quake-1.com/docs/utils/writetga.zip
This is the source for a command line utility. As strange as it sounds, I'm not interested in command line utilities, but I can test stuff without worrying about overhead and write clean and user-friendly code.
But the underlying code can generate a pak or wad file in ridiculously easy way. The code goes like this: PakFile_Build_Start (blah) ... PakFile_Build_Add_File (blah) ... PakFile_Build_Finish (blah).
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
Re: tga2lmp
You came to the right place.Baker wrote:Again, no one in their right mind should be interested in this
-
qbism - Posts: 1236
- Joined: Thu Nov 04, 2004 5:51 am
Re: tga2lmp
qbism wrote:You came to the right place.Baker wrote:Again, no one in their right mind should be interested in this
Good point.
I've done some interesting things with TGAs lately. The format (like most graphics formats I suspect) lets you <optionally> embed a comment right after the header. Loading a TGA skips those bytes, obviously.
I'm trying to build a pipeline to map with replacement textures transparently while the map editor uses lower resolution Quake paletted images. It's a bit of a tricky thing to pull off, but I'm within striking distance now.
In order to make this work, a TGA needs to know some things about its "source". To know whether or not it needs to be updated, and therefore the rest of the "pipeline" (the WAD2, WAD3, end result pak files containing textures). I'm going to put that in the TGA header.
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
10 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest