Page 2 of 2
Re: Return to Castle Wolfenstein - WSGF version WIP
Posted: 06 Sep 2010, 08:06
by The_cranky_hermit
Alright, I think I found the problem and the solution. It's not your data files - I was able to reproduce the gap at 5292x1050 in windowed mode. What we seem to have here is an oddly coincidental case of pixel offsets becoming floating points as they are scaled to 2.1875x their original values, while other offsets when scaled come out to integers. So some are misaligned by a single pixel and others are aligned perfectly, and we have the exact combination of alignment and misalignment for this to be visible.
Anyway, what I ultimately wound up doing is changing the CGDraw scaling code to round up instead of leaving it up to the deep, dark pits of the Q3 engine to interpret the meaning of a fraction of a pixel (I would guess it ultimately rounds down). There will still be misaligned scope graphics, but since I'm making sure everything is a fraction of a pixel too big, misaligned graphics should overlap instead of separate, and you won't notice. Hopefully this doesn't break anything. I tested the scope and binoculars with a couple of different resolutions, and it seems to work out.
New version uploaded.
I still have no idea why your crosshairs are different, but that's probably not important now. I used your files, and we have the same sized big ones - I still have my Mauser crosshairs, not yours.
By the way, this is the original version of Return to Castle Wolfenstein, not the Game of the Year Edition. It's possible they modified the scopes slightly between versions.
Here's the funny thing. The hairs on the scope are actually coded right into the executable. Here's some of the code (should be intelligible even if you don't know C):
Code: Select all
if ( weap == WP_SNIPERRIFLE ) {
// sides
CG_FillRect( 0, 0, 80, 480, color, UI_CENTER );
CG_FillRect( 560, 0, 80, 480, color, UI_CENTER );
/* stuff */
// hairs
CG_FillRect( 84, 239, 177, 2, color, UI_CENTER ); // left
CG_FillRect( 320, 242, 1, 58, color, UI_CENTER ); // center top
CG_FillRect( 319, 300, 2, 178, color, UI_CENTER ); // center bot
CG_FillRect( 380, 239, 177, 2, color, UI_CENTER ); // right
}
CG_FillRect( 84, 239, 177, 2, color, UI_CENTER ) means:
Draw a solid rectangle at x-coordinate 84, y-coordinate 239, with a width of 177px and a height of 2px. Fill it with the color data assigned to variable "color." Then scale it to the screen's resolution using the CG UI_CENTER algorithm (that part was my addition).
Did you crank the FOV really high to show the problem, or is specific to that particular weapon you're using?
It's specific to the Snooper. I had also messed with the drawing angles a bit to make it more clear that part of the gun was missing.
Re: Return to Castle Wolfenstein - WSGF version WIP
Posted: 06 Sep 2010, 09:29
by Leapo
Downloading now, I'll test it in a second.
That difference in crosshair is really bizarre. All I've done is install the game from CD, patch it to 1.4, followed by 1.41, followed by 1.41b (you have to do it like this, there's no cumulative 1.41b patch). I'm not running any mods, either.
If you take a really close look, it looks like two crosshairs overlayed one on top of the other. There's a simple plus-shaped crosshair in addition to the T-shaped one that the engine draws. Is it possible one of the additional PK3 files has added the plus-shaped crosshair image? We could both create checksum hashes of our PK3 files and compare notes to see what one is different.
Re: Return to Castle Wolfenstein - WSGF version WIP
Posted: 06 Sep 2010, 14:46
by Leapo
Ok, the scope fix worked, but I ran across a couple more bugs.
The first major boss in the game throws ghosts at you. If you don't manage to dodge out of the way, they black out your screen temporarily (giving the slow-moving boss time to slam you into the ground). Only a 4:3 square is getting blacked out, rather than the entire screen:
During the same boss battle (while cowering in fear) I noticed clipping in the skybox. You can see it in the upper left corner:

Re: Return to Castle Wolfenstein - WSGF version WIP
Posted: 07 Sep 2010, 00:34
by The_cranky_hermit
Is it possible one of the additional PK3 files has added the plus-shaped crosshair image? We could both create checksum hashes of our PK3 files and compare notes to see what one is different.
It's possible, but I don't see any place in the code where it does this.
If you were to move everything out of the main directory except these:
save (directory)
pak0.pk3
sp_pak1.pk3
You should still be able to launch the game, load a savegame, and zoom in with the Mauser to see if that changes the scoped look.
I used
MD5Checker and got these hashes:
pak0.pk3 - CE92B11DF889CB0A045762BB5FD7CDE5
sp_pak1.pk3 - A0D3FE956F85F40C8EFD6BABE0D09832
Though I suspect you have the same files as me. I mean, the whole point of having multiple pak files is so that you can distribute incremental updates more easily.
Only a 4:3 square is getting blacked out, rather than the entire screen:
Fixed, new version uploaded. This one was easy.
During the same boss battle (while cowering in fear) I noticed clipping in the skybox. You can see it in the upper left corner:
I couldn't quite figure out why this is happening, but I did find that it happens in the original game too, if your FOV is set high enough. At your aspect ratio of about 5:1, your fov_x is greater than 150. The original game has the same clipping problems at an FOV of around 140. I have a hunch that this is something deep down in the Quake III code, and I don't dare touch that stuff. Consider this one a wontfix for the time being.
Re: Return to Castle Wolfenstein - WSGF version WIP
Posted: 07 Sep 2010, 01:33
by Leapo
I moved all the pk3 files except pak0.pk3 and sp_pak1.pk3 to another folder and tested the scope again. No change, I still have the "weird" crosshair. I checked your MD5 hashes against my game files, and they're identical... so what the heck is going on? :?
I could send you my entire game folder (without rtcwkey and without the pk3 data files, since those have been confirmed to be identical) to see if you can get the alternate crosshairs to show up.
I have the sneaking suspicion that the skybox in that map is just a little bit too big, which is causing it to hit the Far Clip Plane. This wouldn't have been noticed during development, as the clipping was still off-screen.
Unless you can increase the Quake III engine's maximum clipping distance, the simplest solution would be to shrink the skybox slightly so it doesn't clip anymore.
Re: Return to Castle Wolfenstein - WSGF version WIP
Posted: 07 Sep 2010, 02:48
by The_cranky_hermit
I could send you my entire game folder (without rtcwkey and without the pk3 data files, since those have been confirmed to be identical)
Ok, sure. If you do that, I'll look at it.
Unless you can increase the Quake III engine's maximum clipping distance, the simplest solution would be to shrink the skybox slightly so it doesn't clip anymore.
I'm guessing that the size of the skybox is defined in one of the map's corresponding files, not the source code. And I think fixing bugs with the game's levels is outside the scope of this project, even if I did know how to edit a map file (and I don't).
Re: Return to Castle Wolfenstein - WSGF version WIP
Posted: 07 Sep 2010, 09:23
by Leapo
Here are my game files. Just add in your PK3s and rtcwkey: http://www.mediafire.com/?pl2zjc2m18r06j0
Re: Return to Castle Wolfenstein - WSGF version WIP
Posted: 07 Sep 2010, 16:22
by The_cranky_hermit
Ok, I extracted that archive to a new folder, copied in the "Main" directory from the last download, copied in pak0.pk3 and sp_pak1.pk3, edited wolfconfig.cfg to make r_fullscreen "0", launched WolfSP.exe, and loaded your saved game and zoomed in.
Nothing. I'm still getting my scope, not yours.
Re: Return to Castle Wolfenstein - WSGF version WIP
Posted: 07 Sep 2010, 16:47
by Leapo
So...what the heck is going on? :?
Edit: I don't know if it makes any difference at all, but I've forced AA (4X4 Supersampled), AF (16X), and Texture LOD (-1) from my drivers for Wolfenstein.
Re: Return to Castle Wolfenstein - WSGF version WIP
Posted: 15 Sep 2010, 17:14
by KajQrd
I tried it out, but I forgot that all games with a q3 base refuse to launch on my computer, I'll try it on my laptop.
Thank you sir, glad to see the source code is being put to good use so soon.
Do you have ATI graphics? If so you will run into problems with any drivers newer than 10.4 in most Quake 3 games. So far everything except Quake 3 and American McGee's Alice has crashed for me as well as all Quake 2 engine games. The solution is to put the 10.4 atioglx.dll in the game folder. If you don't have the file drop me a pm with your email adress and I'll send it to you.
Re: Return to Castle Wolfenstein - WSGF version WIP
Posted: 13 Nov 2010, 22:56
by Jackal Frost
[quote]I tried it out, but I forgot that all games with a q3 base refuse to launch on my computer, I'll try it on my laptop.
Thank you sir, glad to see the source code is being put to good use so soon.
Do you have ATI graphics? If so you will run into problems with any drivers newer than 10.4 in most Quake 3 games. So far everything except Quake 3 and American McGee's Alice has crashed for me as well as all Quake 2 engine games. The solution is to put the 10.4 atioglx.dll in the game folder. If you don't have the file drop me a pm with your email adress and I'll send it to you.
That's what it was, thank you so much man.
Posting the file here for people searching in the future, I doubt AMD/ATI will mind.
http://www.mediafire.com/?qmui16uqdhg52dh
Would it be possible to make
Posted: 19 Apr 2012, 09:14
by ajdrenter
Would it be possible to make a version that would be compatible with this particular mod?
http://returntocastlewolfenstein.filefront.com/file/;120536
I know this is probably a silly request but I love playing RTCW with this mod. Thanks in advance to whoever replies! You guys rock.
Re: Return to Castle Wolfenstein
Posted: 27 Feb 2014, 04:43
by swili
I updated the report.
Game patched to 1.42c is working very good.
Re: Return to Castle Wolfenstein
Posted: 26 Apr 2016, 19:57
by delmanicomio
I already have 1.42c patch.
It has 2560x1080 21:9 and 4K But no 3440x1440 21:9 resolution.
Is there any patch or hack ?
Thanks,
Re: Return to Castle Wolfenstein
Posted: 31 May 2016, 14:19
by czarman
Finished DR - Use RTCW VENOM MOD - works for all Resolutions.