savegames
Moderator: InsideQC Admins
5 posts
• Page 1 of 1
savegames
running into something of a problem.
been working on fixing up my realm engine and i ran into a problem
it seems.
if i try to load a saved game the VM crashes with invalid edict value -1 .
i use the VM from bengt jardrups glquakebjp allthough with a few differences to make it able to load maps like marcher or bastion which are somewhat huge with loads of monsters.
it works quite fine for that (slow as mollasses though) but it seems
something borked savegame loading.
i tracked the crashing function to be ED_Free but egad i cant find whats causing it to return an edict of size -1.
maybe i need a fresh set of eyes to look the source over, so if anyone volounteers ill send them the source.
btw realm uses mingw/codeblocks so the debugger of choice is gdb.
been working on fixing up my realm engine and i ran into a problem
it seems.
if i try to load a saved game the VM crashes with invalid edict value -1 .
i use the VM from bengt jardrups glquakebjp allthough with a few differences to make it able to load maps like marcher or bastion which are somewhat huge with loads of monsters.
it works quite fine for that (slow as mollasses though) but it seems
something borked savegame loading.
i tracked the crashing function to be ED_Free but egad i cant find whats causing it to return an edict of size -1.
maybe i need a fresh set of eyes to look the source over, so if anyone volounteers ill send them the source.
btw realm uses mingw/codeblocks so the debugger of choice is gdb.
-

revelator - Posts: 2567
- Joined: Thu Jan 24, 2008 12:04 pm
- Location: inside tha debugger
Re: savegames
reckless wrote:...the debugger of choice is gdb.
Eeeewww.
I was with you up to that point.
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
Eeeewww.
I was with you up to that point.
Sadface
got it fixed was a bug with COM_ParseToken returning something
it didnt quite like
btw i changed lightmap format
- Code: Select all
void R_UploadSingleLightmap (lightmapinfo_t *lm)
{
// just upload the full thing. "theRect" never worked properly anyway...
// lightmaps are uploaded as needed, rather than blindly uploading every one
// that was modified, to avoid possibly having to upload a lightmap that
// isn't in the draw list, and to reduce texture changes per frame
glPixelStorei (GL_UNPACK_ROW_LENGTH, BLOCK_WIDTH);
glTexSubImage2D (GL_TEXTURE_2D, 0, 0, 0, BLOCK_WIDTH, BLOCK_HEIGHT, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, lm->texels);
// don;t let it catch the next surf
lm->modified = false;
glPixelStorei (GL_UNPACK_ROW_LENGTH, 0);
}
but im wondering a bit if effective since the lightmap is uploaded directly to the texture manager in realm should i change the format there also ? atm its GL_UNSIGNED_BYTE in that function.
any other differences i should be aware of ?
-

revelator - Posts: 2567
- Joined: Thu Jan 24, 2008 12:04 pm
- Location: inside tha debugger
- Code: Select all
glTexSubImage2D (GL_TEXTURE_2D, 0, 0, 0, BLOCK_WIDTH, BLOCK_HEIGHT, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, lm->texels);
Needs to be:
- Code: Select all
glTexSubImage2D (GL_TEXTURE_2D, 0, 0, 0, BLOCK_WIDTH, BLOCK_HEIGHT, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, lm->texels);
And R_BuildLightmap needs to be adjusted to match.
I'd also change the params in the texture manager; the documentation says they should all match for both the glTexImage call and subsequent glTexSubImage calls.
The "theRect" stuff is fixable: viewtopic.php?t=2466&highlight=therect
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
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest