.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Other SDKs (http://forums.bots-united.com/forumdisplay.php?f=63)
-   -   HL1 For other platforms? (http://forums.bots-united.com/showthread.php?t=4417)

The Storm 02-09-2005 16:00

Re: HL1 For other platforms?
 
Quote:

Originally Posted by Lazy
I still have to write a tool to extract all the textures from HL wads but the information about the format is near non-existant.

There is already tools for extracting the textures from the HL wads files. Just look at google.

Zacker 02-09-2005 18:31

Re: HL1 For other platforms?
 
Quote:

I still have to write a tool to extract all the textures from HL wads but the information about the format is near non-existant.
Wally?

Lazy 02-09-2005 18:49

Re: HL1 For other platforms?
 
Well, I'd need a tool which would extract the textures put them in the format q3 expects and place them in the proper directories.
Since no tool to my knowledge does this I will need to write one.

sfx1999 02-09-2005 23:00

Re: HL1 For other platforms?
 
Look at the Quake 1 compile tools source and take it from there. I believe the only differences are the lightmaps are 32 bit and the textures have individual palettes. It is under GPL.

Whistler 03-09-2005 07:46

Re: HL1 For other platforms?
 
"Ok, so how legal is it to use HL BSP file information contained in bspfile.h?"

as long as you write all codes yourself, it should be no problem as the file format is not restricted.

but I think it's better to rename all the constant names :)

edit:
I think there is a HL map decompiler included with the Quake3 source code distribution (the bspc utility), so it should be okay to do so. Also as it's GPL'ed it could be better to copy stuff there.

Lazy 03-09-2005 23:55

Re: HL1 For other platforms?
 
Well, I'd use the same maps as they come from a half-life installation.
As luck would have it, both quake3 and hldm use the info_player_deathmatch entity as start points aswell as the entity structure in the bsp being the same.

Though, im still debating on how to implement this...
I could rip out all the q3bsp code, use compile flags or simply allow both types of maps to be used and build function pointers to certain functions depending on the map type being loaded.
I'm thinking #3 is the best option, same thing with the renderer.

[Edit]
I actually might go with the quake 1 engine as I already have it loading a half-life map.
The formats are so similar that you only need to set BSPVERSION to 30 inorder for it to load.
In-game however it looks like someone painted the BMRF with bloody vomit so I'll have to work on texturing.

sfx1999 04-09-2005 03:21

Re: HL1 For other platforms?
 
Changing the BSP version does not work; I've tried it. You need to convert the lightmap and the texture lump. Each of the textures have a palette stored with them in HL, and in Quake they use the main palette. I am pretty sure that the lightmaps in HL are 24 bit also. They could be paletted, though.

Anyway, a texture in HL would be like this:

Code:

uchar r;
uchar g;
uchar b;
char *data;

Where as in Quake it would be:

Code:

char *data;

Lazy 04-09-2005 03:38

Re: HL1 For other platforms?
 
Yeah, I know its different which is why the level came out looking like crap.
I'll have to write some new functions to handle the different textures/lightmaps but thats a job for tomorrow.

sfx1999 04-09-2005 05:42

Re: HL1 For other platforms?
 
Shit! I was going to give you some pseudo-code, but somehow my page got changed and I lost it. Oh well, I am sure you have the skills to do it. If not, I can help.

Lazy 04-09-2005 13:24

Re: HL1 For other platforms?
 
Bah!
The palette size should be at file_base + offset_to_mip_level_4 + ( ( tex_width * tex_height ) / 64 )...
But it isn't.
I have a document here that says the palette size is an word ( unsigned short ) after the 4th miplevel texture and that it should be 256.
I get nowhere near that number.


All times are GMT +2. The time now is 02:23.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.