User talk:Tarvis

From UFOpaedia
Jump to navigation Jump to search

Feedback

You still around? I have a couple of issues about the d3d device not rendering when restoring from a minimized full screen mode. -tycho

Haven't really done anything new (I sorta started playing OpenXcom instead, sorry :P) Anyway I don't remember if I ever touched the code for restoring the window, but I'll look into it. - Tarvis

Don't worry about this. I sorted it. Tycho (talk)

Nice mod is comming

Hello Tarvis, it looks pretty cool! Maybe you can join your force together with Tycho and implement both yours improvement to the only extender..

I will enjoy your work and will try to help with testing :)

Also the playing Intro in MP3 would be great. I am now using Abram´s modded executable with mp3play.dll and my own moddified MP3 Intro music by Lorcan that was made for UFO:CF now probably dead project and it works great!

ElfKaa

I couldn't really say that I'm 'joining forces' with Tycho, it's more that I'm fixing little things on my own and he decides to add them if he wants. I can't really do much more than this because I don't have a deep understanding of the game code like Tycho does, all I'm doing is making tiny improvements to the actual Extender code. Because of that, I'm not even sure I understand the music code well enough for detecting intro music, so your best bet for that is probably just using AbraM's patch like you're doing. As far as I know, the only issue that comes from that is that the game will throw an error at you when you exit the game.


Essentially, I just take small issues I've noticed (like the window size option not taking into account window border thickness) and fix them myself instead of asking Tycho to do it, since he probably has more significant things to do. -Tarvis

Actually, if you have a solution or actual code (even better!) for a change, I'm always willing to look at it. I don't think anyone can be said to have a complete understanding of all the code. I have a good understanding of many parts, thanks to Seb and Xusalik's notes. Some people, like Kyrub, have a better understanding of areas depending on what area interests them. Tycho 23:26, 22 February 2013 (EST)

I took a look at the way Seb created the window for the game. He has the Extender just read the lines from the INI and create a window using those values. I guess he didn't realize or understand that those values would be the dimensions for the entire window and the playable area would be reduced by the size of the title bar and borders. In your fix, did you use the AdjustWindowsRectEx() function? I am having the hardest time getting a window created with the proper playable dimensions that compensates for various border widths. Tycho 11:12, 26 February 2013 (EST)

I just used AdjustWindowRect(). It doesn't actually resize the window on its own, all it does is edit the values of the rect you give in its first argument, and the next two arguments are WS_OVERLAPPEDWINDOW and then FALSE because those are the flags for the actual window which is created later. So, just make sure it's called before creating the window. I placed it in patches.cpp in his MyCreateWindowExA call. This also has to be accounted for when saving the variable back to the .ini during resizing, and that's done in video.cpp.
I've already handled all this though, I suppose I'll upload my code changes now. What diff making program should I use? I don't think TortoiseSVN would work since this project isn't really made from revisions. -Tarvis
EDIT: If it's easier, I could just upload the changed source files in their entirety (like last time), unless things have been added since the last release two days ago. Changes are d3d.cpp, video.cpp, patches.cpp and shortcuts.cpp -Tarvis
Great! I am looking forward to seeing them. As for the files, I think uploading the changed files is easiest. That way I can get a good idea of the changes and make sure they don't conflict with something else (In the rare case, two people would be making changes to the same areas.) Thanks for all your help! Tycho 21:13, 26 February 2013 (EST)
Okay, I just need to bring the changes to the 1.30 release first. I'll port them to TFTDExtender too, but that might take a bit longer because with my changes it gives me an error when exiting the game that I can't quite track down. (Otherwise works fine already) -Tarvis

Actually, you didn't have to do all that work. Just uploading the code pages for the current version would have been fine. Actually it would have been better. As it is now, anything you give me, would have to wait for the next release, even though you had the code already. Still, thanks for your work! -I guess in the future, we could always paste the code on our user pages, that way it can be erased later. The only drawback to using the wiki pages is that any files upload are permanently available. That is good for some things (like the Extender source and past versions) but some things are better removed once their usefulness is over. - Tycho 20:44, 27 February 2013 (EST)

Okay, I just found a bug with my code to unlock the mouse when the game is unfocused (game doesn't always remember to re-lock the mouse when regaining window focus) so when I fix that quickly I'll put up an archive with the files. -Tarvis

Alright, all done. Get the file here: File:Ufoe d3dtweaks.zip I included a changelog in the zip, and there's also one on my userpage.

Also wanted to point out that the source for 1.30 is missing empty.cur which causes an error. I just copied it from 1.29.
Anyway, porting all this to TFTD should be easy, all you need to do is replace the HWND values with TFTD's, and the InsertJmp addresses with the proper ones for TFTD. That should be all it needs, but for some reason when I did this myself I'm still getting a crash on exit even though everything else works fine. Probably has to do with return values, most likely mouse scaling functions since it returns 16. I kept it this way because that's what it returned before I made any changes, but I don't really know why it's there (as I don't know much of what's going on in the actual game code). Maybe you might have more luck? -Tarvis

Thank, Tarvis. I'll take a look at some point. I just inserted code that turns the Snakeman Terror mission into a nightmare: I have the Snakemen not consider the civilians valid targets for the first few turns. I also am testing code that requires the player to interrogate not just any but navigators from each species before allowing the Hyperwave Decoder. I could easily make it so that Psionics require only a live ethereal. I am contemplating code that requires one or more muton engineers before unlocking Plasma Beam. Thoughts?. -Tycho 10:49, 1 March 2013 (EST)

Could you post video section of the INI file here? The INI file in the zip seems to be corrupted. Thanks! Tycho 02:14, 6 March 2013 (EST)

Not sure why that keeps happening, but it's opening fine for me in 7zip. Here it is anyways: -Tarvis

[Video]
Video Pitch=0
D3D=1

D3D Windowed=1
Always On Top=0

D3D Window Width=640
D3D Window Height=400
D3D Window Position=100 100

D3D Fullscreen Width=0
D3D Fullscreen Height=0

Screen Ratio=1
Linear Filter=2
HQ4x=0

Clip Cursor=1
Scale Mouse=1

Max FPS=0
Slow Geoscape Clock=0
Battlescape Delay=33
CPU Mask=0
High Priority=0

Force Language=1
Skip Intro=0