Advertisement

COBERA READ THIS AGAIN

Started by April 15, 2001 10:38 AM
2 comments, last by steveharper101 23 years, 7 months ago
Please, Please, Please could you send me your halflife BSP loader to the following address: steveharper@clara.co.uk Thanks Alot
Get Bart Sekura''s half-life loader..... its much better code.....

I went through his....... learned a lot from it.... and I''m changing my code to make it better......


Soz...

~Cobra~
"Build a man a fire, and he will be warm for a day. Set a man on fire, and he will have warmth for the rest of his life"
Advertisement
Where would one find that?

thanks
Scott


Edited by - wojtos on April 15, 2001 6:23:15 PM
Got any idea how the function decompress works from his engine here it is:

void world_t::decompress()
{
for(int i = 0; i < bsp->leaf_count; i++) {
int_vec visible;
dleaf_t& leaf = bsp->leaves;
int v = leaf.visofs;
const byte* vis = bsp->vis;
for(int c = 1; c < bsp->models[0].visleafs; v++) {
if(vis[v] == 0) {
v++;
c+=(vis[v]<<3);
}
else {
for(byte bit = 1; bit; bit<<=1,c++) {
if(vis[v] & bit) {
visible.push_back(c);
}
}
}
}

leaf_visibility.push_back(visible);
}
}

I think tha it expands all leafs so that PVS can be found. Haven''t got that much of a clue though. Does each leaf have much face data which needs to be used to point in the edges array

PLEASE HELP COULD YOU OUTLINE HOW BASICALLY THE BSP FORMAT WORKS
PSEDUO CODE WOULD BE GREAT

i have seen the quake 2 documentation on Flipcode and Bart Sekura''s half-life loader but still abit confused as i''m quite new to the world of 3D graphics and openGL

Thanks ALOT Cobera

Steve

This topic is closed to new replies.

Advertisement