Jump to content
cncfan

Suggestions for Nyerguds C&C TDawn 1.06c

Recommended Posts

Hello,

 

first of all: Great work Nyerguds, I love your C&C Updates!

 

But 2 suggestions:

 

First:

 

I think, there are 7 video files missing in the video download pack that Nyerguds announced here:

http://download.digiex.net/Games/C&C%2...movies_full.rar

 

The files can be found on the (german) Covert Ops CD or in the TFD covertops in the movies.mix

banr_nod.vqa

blackout.vqa

bodybags.vqa

(foreskl.vqa)

inferno.vqa

iontest.vqa

refinery.vqa

 

 

I'm not quite sure if every file is used by the game, BUT IONTEST is definetely used by the last

CovertOps NOD mission entry. When using the movies pack "as it is" you won't see the introduction movie when selecting this mission.

 

Probably anyone might add them to the moviespack (I could do it by myself if there would be any interest) But if I do it, I would like to upload it to Nyerguds because his site is some kind of centre in the CNC TD world. Any interest Nyerguds?

 

 

Second:

 

It would be a GREAT IMPROVEMENT if the videos in the Windows version would be displayed as non-interlaced (as they are in the DOS-Version)

 

I already tried to modify the headers in the vqa files (hight,weidth and/or block sizes) but without success. I think the only way would be to modify the game executable itself.

 

Is anybody able to do that?

If not, then the only way would be freecnc, an open source reimplementation of the CNC executable

http://www.freecnc.org

Unfortunately the development seems stuck since end of 2004.

Maybe Nyerguds work can be fused with that project? That would also give an option to circumvent the 1024x768

display problems in the first maps.

 

Best regards

Edited by cncfan

Share this post


Link to post

About the stuff of video show in interlaced videos: It is in the FAQ, read:

 

Q: The videos / score screens / map choice screens aren't in high resolution! They are just shown in the upper left corner.

A: Indeed they are. I can't make the game stretch these things, and I haven't found the data structures I need to change to center them, so until I do, they'll stay like that. Sorry.

 

The missing videos: Yes, there is some videos where isn't used in the game. Better we wait for Nyer aswer.

Share this post


Link to post

I know I forgot the Covert Ops vids in the Digiex videos pack. They are in the movies.mix on my own site though. But I've already had my site down because of the RA expansion isos, so I'm not too tempted to link to that pack. When revision 2 rolls in, I'll do a full update, and have movies packs to go with it for all languages. I'll probably host them on MegaUpload.

 

 

As for the VQA playing thing, not much I can do about that. C&C95 uses the DOS C&C 320x156 / 320x200 videos, and it happens to stretch them that way. I've looked into that, but I haven't even found what determines they're stretched to 640x400, much less HOW. All I know is that they need the .vqp files inside update.mix, and that these somehow affect the in-between pixels in the X direction when stretching.

As you can imagine I'd love to change this to stretch (or at least center) them in the 1024 resolution, but so far, my experiments in changing the VQA player logics have only resulted in game crashes.

 

 

Also, modifying the videos can't work; even if you'd stretch them all to 640x400 and recode them that way, C&C95 CAN'T PLAY 640x400 vqa. It can play smaller ones, I tested that, it even centers them correctly, but it can't play VQAs larger than 320x200.

Share this post


Link to post

PLEASE READ MY NEXT POST FOR A SOLUTION

 

 

but I haven't even found what determines they're stretched to 640x400, much less HOW. All I know is that they need the .vqp files inside update.mix, and that these somehow affect the in-between pixels in the X direction when stretching.

 

The stretching logic is NOT in the vqp files, it's in the executable.

To double the width (640 pixels) between two adjacent horizontal pixels you insert a third one that has a color which is the

average value of the 2 pixels' colors.

When I say average value, I don't mean averaging the indexes to palette,

that would be very easy but incorrect. I mean averaging the COLORS themselves

and finding a color in the palette that most closely matches the desired one.

This process of searching is very slow, so a different method needs to be

applied.

This is where a VQP file comes in. In order to be able to average

(interpolate) colors very fast, one needs a COLOR LOOKUP TABLE.

That is the basic purpose of VQP files: to provide you with the neccessary

color lookup tables.

Look here for further details on VQP format:

http://xhp.xwis.net/documents/vqp_info.txt

 

The logic that does this must be in the executable. All we have to do is to do this not just horizontally but also vertically.

This would give us a doubled vertical resolution.

Resizing to 1024x768 is impossible in this way I think, because the inputs for the color tables are only 8bit colors. So you can't input already

interpolated color values again. You would need a REAL scaler to achieve this.

 

Since we don't have the source code of the original C&C95.exe this can be quite difficult until there is any assembler phreak outside. For this reason I think http://www.freecnc.org is a great project. It's open source. They completely reimplemented the video decoding and do the scaling to ANY desired resolution (not just doubling) by standard software scalers without using the vqp files at all. (Modern computers are fast enough to do that in realtime without any effort)

 

 

As you can imagine I'd love to change this to stretch (or at least center) them in the 1024 resolution, but so far, my experiments in changing the VQA player logics have only resulted in game crashes.

 

PLEASE READ MY NEXT POST FOR A SOLUTION

 

 

Edited by cncfan

Share this post


Link to post

POSSIBLE SOLUTION FOR INTERLEAVING AND MOVIE STRETCHING

 

via the new ddraw.dll DirectDraw->OpenGL Wrapper function

http://hifi.iki.fi/cnc-ddraw/

 

it can be modified in a way that it checks the output it is getting from the old C&C95.exe for beeing interlaced and doing a scaling by itself. In this way we could circumvent the need of enhanced C&C95.exe editing.

 

The solution would work for all 640x400,640x480 and 1024x768 modes (for cutscenes AND THE LEVEL CHOOSING SCREENS)

 

Removes the scanlines and stretches to fullscreen!!!

 

 

I looked into the code of ddraw.dll and I think that should be possible.

You can get the SOURCE from the homepage

http://github.com/hifi/cnc-ddraw

 

Due to my limited skills I haven't been able to compile the ddraw.dll yet, so the only thing I can contribute is theory.

 

 

 

I think the relevant parts are in render.c function DWORD WINAPI render_main(void)

 

After thinking a while about it I think it should work like that (very pseudocode):

 

If (resizevideos=0 OR (not every second line is black))

then

{ //we are ingame and don't need special video scaling

scale as described in ddraw.ini [ddraw] width=xxxx height=xxxx

}

else

 

{ //we are in cutscene or level selection mode

discard every second line; //the interlacing

find end of picture in x pos and discard the black area; //only happens if in 1024x768 or higher (not centered)

 

//now whe should have 640x200pixels

 

discard every second pixel in x direction // since they are already interpolated by the game (we can do this better)

//i'm not quite sure if to discard 0,2,4,6,.... or 1,3,5,7,.... but I would guess the second one

//now we should have a frame in 320x200 pixels

 

//note that both discardingsteps can be done easily with for x(1 to 640 step 2) for y(0 to 399 step 2) do copypixel(x,y)

//or even faster with memcopy^^

 

resize the frame to new values determined in ddraw.ini

//

//resizevideos=0/1

//resizevideowidth=xxxx

//resizevideoheight=xxxx

//resizevideofilter=nearest/linear

 

}

 

 

I haven't contacted the author yet...

Can't reach his email adress...

(EDIT: This is wrong, sorry): Have seen him beeing active as user Tore at http://www.cnc-comm.com/community/index.php?board=2.0

In fact is it user HIFI!!!

 

Can anyone who is registered there give him a link to this thread?

Please link to this

http://forums.cncnz.com/index.php?showtopi...st&p=187395

 

Best regards

Edited by cncfan

Share this post


Link to post

I contacted him... Just wait.

 

[edit]

 

He's not Tore... Tore is the administrator of cnc-comm.com , the creator of cc-ddraw is HIFI

 

exactly him words: (and mine too)

 

<hifi> and wait, my nick is now Tore?

<Pichorra> wtf?

<hifi> "Have seen him beeing active as user Tore at http://www.cnc-comm.com/community/index.php?board=2.0"

<Pichorra> ok

<hifi> though that depends how you iterpret that

<Pichorra> i edited my porst

<Pichorra> post*

<Pichorra> i said to hi, you are hifi (lol)

<hifi> either I'm as active as Tore or I'm an active user named tore

<hifi> anyway, I don't have interest at this point to fix interleaving, it would require some work to hack it in

<hifi> it is possible like the poster suggested

<Pichorra> should i put that in my post?

<hifi> ya, I appreciate the feedback but I'm not going to implement it at this point, if someone else send me a patch that implements it I'll be happy to put it in

Edited by pichorra

Share this post


Link to post
He's not Tore... Tore is the administrator of cnc-comm.com , the creator of cc-ddraw is HIFI

Sorry, my fault, I didn't want to offend somebody.

 

<hifi> ya, I appreciate the feedback but I'm not going to implement it at this point, if someone else send me a patch that implements it I'll be happy to put it in

That's a pity. Well seems like I have to do it by myself then.

 

[EDIT:]

The source can be compiled using mingw on Win32

Edited by cncfan

Share this post


Link to post

...you don't seem to understand what I'm doing here, at all. I AM DOING ALL OF THIS IN ASSEMBLER. I mess around in the exe ALL THE TIME. When I say "I haven't found how the game does" something, it means I haven't found it when going through the exe file with my debugger/disassembler. Everything you read in "Code Changes" in the full changes list of the patch readme are changes made in BYTE CODE. I have written DOZENS OF KILOBYTES of byte code in a game that's only 1 Mb big (the second Mb being added exactly to be able to add that new code. The original C&C95 exe file is only 1.10 Mb).

 

So any theoretic solutions you come up with are useless as long as I don't know WHAT TO CHANGE.

 

oh, and FYI, the game can perfectly do scaling of smaller images. The "Coming Attraction" screen in the "Intro & Sneek Peak" function is stretched from 320x200. And CCHyper even found rotation functions in RA1, and showed me test screenshots with rotated sidebar icons. All those operations are just pixel based. No smoothing, so no need for anything besides its 8 bit palette. With that, stretching to 1024x768 should be perfectly possible.

 

 

Also, the fact CnC-DDraw can stretch stuff is a completely external thing. It stretches the ENTIRE game content, without any distinction of what the game is showing at a certain moment. It can't choose to only stretch videos, unless it does some seriously dirty extra hacks (like the original ddhack for Wing Commander did) to detect the starting and ending of a video.

Share this post


Link to post

It can distinguish between videos and ingame content by analysing if the frame is interlaced...

(then every second line is black)

 

IT IS POSSIBLE via ddraw.dll

 

AND YES, IT'S A DIRTY HACK, BUT IT WILL WORK AND IT IS BETTER THAN NOTHING!

Of course a native solution in the C&C95 would be the best but until then, we can fix it in this way very easy...

if i would get the damn thing to compile

 

I will ask a friend of mine if he is able to crosscompile from native linux, until then I wish you a nice weekend

Still asking myself though how HIFI compiled this....

 

btw: hats off for doing that assembler stuff

Edited by cncfan

Share this post


Link to post

Another small note.

 

I can't program in C.

Share this post


Link to post

Thanks to my friend I have been able to compile it - it runs nice with cnc95 now.

 

I will start my coding tomorrow, I hope there will be a fix for the videos soon :-)))))))))))))))))

Share this post


Link to post

Add alt+enter switching to and from fullscreen while you're at it :P

 

Oh, and it'd be REALLY awesome of you could also make sure the video is stretched to fullscreen (though, keeping aspect ratio of course) in 1024x768 mode, where it only takes up the upper left 640x400 corner

 

Do note that the score and world map screens background and animations are also interlaced, but with solid text put over it, so this might not be very easy to distinguish. Though I could give you info on which internal call the game makes to start a video, if that could help you.

Share this post


Link to post

HERE IT IS!!!! 2011-01-18 videoresize & vqphack beta by J.Henze (based on official 2011-01-10)

 

It works:

 

I am able to detect interlacing mode, so in the current version it does video scaling to fullscreen while removing the interlacing for any C&C95 output resolution and any ddraw render res!!!

It does not use the new scaling mode when in main menu and while playing missions.

Only cutscenes and mission selection / score screens are resized by the new algorithm.

 

Oh, and it'd be REALLY awesome of you could also make sure the video is stretched to fullscreen (though, keeping aspect ratio of course) in 1024x768 mode, where it only takes up the upper left 640x400 corner

This already works - I use the same aspect ratio as the DOS version

Aspect ratio should be kept intact regardless of the chosen C&C95 resolutions and ddraw scale resolutions.

 

Add alt+enter switching to and from fullscreen while you're at it

Not added yet, I will probably do this when everything else works perfectly although at this point I have no idea how to catch the keystrokes....

If I should not be able to do that, I'm sure HIFI will add it later, since this is on his TODO-list.

 

Do note that the score and world map screens background and animations are also interlaced, but with solid text put over it, so this might not be very easy to distinguish.

This is a problem I also have realized and you are right - This is really hard to do.

 

At first I wanted to leave them in the resolution they were, but that leads to heavy resolution switching everytime text getting visible or not visible. A no-go....

 

My next solution was to crop the solid text by half in y and then stretch to fullscreen. You could not read anything while in scores and mission selection screens. Also very awkward.

 

The current solution does the following (only on mission selection and score screens):

Double the vertical resolution in y.

Then copy only the solid text stuff from the scanlines OVER the doubled lines

Since the picture has to be scaled afterwards the solid text in mission selection and score screens are

not as sharp as they would be without but I think the result is quite good.

 

C&C95 seems to have a bug that several video files do not play correctly (without ddraw.dll)

They show completely messed up colours. For example the cc2tease.vqa for Tiberian Sun. You can see it when choosing the third preview trailer from menu.

That is because the VQP files of the affected videos are corrupt. They play fine in the DOS version (because it doesn't need them) but not in C&C95.

That is history now: I included another fix to ddraw.dll. I call it vqphack, when activated, those videos play as fine as every other video with correct vqp.

 

 

You can download the new ddraw.dll and the source here

Rapidshare

I named it 2011-01-18 videoresize & vqphack beta by J.Henze (based on official 2011-01-10)

 

Please feel free to test it and write any bugs you might experience in this thread.

Please test also Red Alert, because until now I only tested TDawn with it.

 

Again it would be nice if anyone could write a note to HIFI.

 

 

Known limitations when having resizevideo=true:

-resized video might be uncentered in y direction (depends on the chosen render-resolution)

[i might fix this later]

-when switching between cutscenes and (level selection / scores screen) the picture could shift slightly

[Have been working very hard on that, I know what's the reason, but solving is very difficult]

Edited by cncfan

Share this post


Link to post

Nice... however, the game refuses to start without libpng3.dll, which wasn't included. Judging from the file size difference, the original CnC-DDraw dll had it incorporated inside itself. Could you fix that please?

The current solution does the following (only on mission selection and score screens):

Double the vertical resolution in y.

Then copy only the solid text stuff from the scanlines OVER the doubled lines

Since the picture has to be scaled afterwards the solid text in mission selection and score screens are not as sharp as they would be without but I think the result is quite good.

Right... I thought about the same thing, but even then, there's still a problem... it'll copy pixels from the text onto the black lines too. Take, for example, the letter "Y":

normal: ("-" is interlacing lines, "=" is interlaced background image)

#===#
-#-#-
==#==
--#--
==#==
-----

With scanlines removed by duplication, and content of scanlines restored:

#===#
##=##
==#==
==#==
==#==
==#==

That is because the VQP files of the affected videos are corrupt. They play fine in the DOS version (because it doesn't need them) but not in C&C95.

That is history now: I included another fix to ddraw.dll. I call it vqphack, when activated, those videos play as fine as every other video with correct vqp.

Odd. As far as I know, all of C&C95's vqps are correct. I think your problem is that you got the wrong VQA file... the TS trailer file on the Covert Ops disk and in C&C95 is different from the original DOS C&C one. The vqp included in C&C95 is correct for the Covert Ops/C&C95 version (12.214 kb). If you somehow got a movies pack with the original DOS version (11.580 kb), then you might have a problem.

(note: there's no noticeable differences between the videos, so I think they just recoded it for better quality)

Again it would be nice if anyone could write a note to HIFI.

He's practically always online on the IRC chat of CnCNet; irc.freenode.net#cncnet

If you don't have an irc client, you can use the web interface, by going to the CnCNet site and clicking on "Chat/Player Lobby" in the navigation bar at the top.

Share this post


Link to post

I found a libpng3.dll to test with, and while it looks really nice to see fullscreen videos in hi-res, it seems there's a serious problem with your videos stretching. You don't obey the aspect ratio set by the user.

 

You should stretch the video to the ORIGINAL game resolution, and THEN apply the custom stretching of the ddraw.ini settings to it. As it is, my custom options to show the game in correct aspect ratio (like 640x400 stretched to 640x480) have no effect whatsoever on your video stretching system.

 

I've played the intro video in 1024x768, and then in 1024x640 stretched to 1024x768. The video image stayed exactly the same size in both, while it should give the effect of this vs this.

 

[edit]

 

Some more bugs in the deinterlacing filtering:

-The system mistakenly detects interlacing on the briefing screens, which have completely blank background. Start any mission from the New Missions menu and you'll see what I mean. There should be some safety check for that. Not too hard to make, since the box is always centered: just take a horizontal line of 20 pixels in the center of the screen which should be on a black line, and abort if none of the pixels are palette colour #0.

-The system stops working when the mouse cursor touches the right-side edge of the screen; you can test this on the Start New Game screen and on the mission selection map screen. On that note, you check the actual edge of the screen rather than the edge of the 640x400 area that plays the interlaced animations. In 1024x768 resolution this isn't correct. As for the actual detection, if more than 10 of the normally-black pixels check out as colour #0, that should be sufficient to conclude it needs to be processed. It's also much safer in general to check this on the left edge.

-The deinterlacing part of the system mysteriously stops working when you touch the top-left pixel of the screen with your mouse. The stretching remains.

-The mouse can go outside the stretched area in the Start New Game and mission selection map screens.

-On the mission selection map, the fade showing recent changes in region control goes horribly slow with the deinterlacing enabled. My PC isn't too high-end, but still. Score screen is pretty slow too.

-fade out from the ingame play field (on win/abort mission) goes to filtering mode.

 

 

And finally, I can't move the window anymore... from the moment I click on the window's top bar, my mouse gets locked in. It should only lock in if I click in the playing area. The old ddraw.dll didn't do that... and there's more issues with alt-tab keeping the mouse locked and such.

Share this post


Link to post

TODOs:

 

the game refuses to start without libpng3.dll, which wasn't included. Judging from the file size difference, the original CnC-DDraw dll had it incorporated inside itself. Could you fix that please?

I tried to link libpng statically. But the new version does not work (can not make screenshots) Until I found a working libpng that I can link static I will add libpng3.dll to the package. I will ask HIFI for help.

As far as I know, all of C&C95's vqps are correct. I think your problem is that you got the wrong VQA file...

Might be correct. Does anybody have a working pair of cc2tease.vqa and cc2tease.vqp that work on C&C95 1.06c? I would be very happy if anyone could share. Nevertheless also SOME (i can't remember) of the following vqa/vqp-tuples are affected:

akira,desflees,deskill,gdifina,gdifinb,nod8,nodflees,retro,stealth,

tbrinfo3,tiberfx

Note that all of these are the UNCUT english versions with GERMAN audio stream. Don't know who made them, probably he has done something wrong. Has anybody working versions of these files and is willing to share them with me?

-The system mistakenly detects interlacing on the briefing screens, which have completely blank background. Start any mission from the New Missions menu and you'll see what I mean. There should be some safety check for that.

Fixed that!

-On the mission selection map, the fade showing recent changes in region control goes horribly slow with the deinterlacing enabled. My PC isn't too high-end, but still. Score screen is pretty slow too.

Haven't had any lags here so I let myself go ;-)

Implemented some considerable speedups since the last version to adress those issues though.

-The system stops working when the mouse cursor touches the right-side edge of the screen

-The deinterlacing part of the system mysteriously stops working when you touch the top-left pixel of the screen with your mouse. The stretching remains.

Both were for debugging purpose and are fixed now!

-The mouse can go outside the stretched area in the Start New Game and mission selection map screens.

Fixed that!

Edited by cncfan

Share this post


Link to post

Ehh, I made that German uncut vids pack. And each of the videos comes with its own VQP file. It's your own fault if you didn't add it to the game folder with them <_<

http://nyerguds.arsaneus-design.com/cncstu....html#ger_uncen

(everything on that page is made by me unless the creator is specified with the download link)

 

 

If you're talking about cc2tease in the German version though, I really couldn't know that; you never told me.

 

[edit]

 

I just checked the German version, and you're right, it has the old VQA.

I got 2 possible fixes... a correct vqp for the video included in the German version, or the new version of the VQA video, the one the game's VQP file is for. Don't use both together, obviously :P

Share this post


Link to post
VQP/VQA topic: I got 2 possible fixes

Thank you very much, I will test if the new combination works. There are still problems in some of the other german UNCUT files though (I placed the VQP where they belong). I will tell you in which they are when I'm ready with the deinterlacer,scaler,vqphack release. Until then we can use the vqphack for that.

-The mouse can go outside the stretched area in the Start New Game and mission selection map screens.

As noted before, I fixed that!

-The system stops working when the mouse cursor touches the right-side edge of the screen

-The deinterlacing part of the system mysteriously stops working when you touch the top-left pixel of the screen with your mouse. The stretching remains.

Fixed that!

Edited by cncfan

Share this post


Link to post

Nice... got a new version I could test then? :)

Share this post


Link to post

Beta 2 01-19-2011

 

2DO:

-fade out from the ingame play field (on win/abort mission) goes to filtering mode (fixed in beta3)

-vertical positioning of movies (center them)

-solid fonts don't look perfect

2 Possible solutions:

First: Using the DOSFont from the WinDOwS version (I think this might fix it because it uses only half of the resolution, this might fix also the small movement when switching between solid fonts / no solid fonts mode)

Second: Writing a completely new linear (or even bicubic, lanczos resizer) instead of doing doubling. Although this could improve overall image quality, it would be a lot of work to do I think, because it would have to be adapted to that special problem. This would also be slower.

 

-aspect ratio problems (please describe more in detail what your actual problem is, do you want to have influence to AR via ini?), can you share your setup program to test? If I get you right, you want me to deinterlace first and scale then, so that everything is treaten the same way by the scaler. I could to that, but it will decrease overall image quality and I would need to implement a scaler by myself.

It would be easier if you could tell me how you want the video to be stretched in y direction. Suggest ini settings!

We are talking just about the movies? Or do you want changes for ingame AR as well?

 

 

-you can't move the window anymore (this is not my fault, this bug has been present in 2011-01-10 from HIFI too (I checked that)

-libpng static linking

Edited by cncfan

Share this post


Link to post

The winDOwS mod only uses fonts that are already in the game. All it does is replace the fading one by its non-fading alternate. It doesn't even add any font files; it just tells the game to use the same filename for loading both fonts.

 

As for the aspect ratio, just set the ddraw resolution settings to 640x480, and the game to 640x400. That's what I'm talking about. For the same effect in high res, set the game's resolution to 1024x768, then open conquer.ini and set the HiresHeight to 640, and then set the ddraw resolution settings to 1024x768.

 

The original problem is described in detail in the overview of the setup tool, here:

http://www.moddb.com/mods/command-conquer-...-new-setup-tool

 

I can give you a version to test... do you have MSN?

I'd also be extremely happy if you could help me to translate it into German :P

Share this post


Link to post
-fade out from the ingame play field (on win/abort mission) goes to filtering mode

Fixed that completely for 1024x768 mode where the picture was deinterlaced AND scaled mistakenly.

Needs some additional time to check that though. If that will lead to problems on slower computers, I might add an ini-option for it to disable.

Please let me know.

 

In 640x4x0 mode the detection is not possible but this is no big deal since the picture is just getting deinterlaced mistakenly but NOT scaled.

I can't even see it there with my eyes, so I would call this fixed too.

This fix will be available in beta3

 

I can give you a version to test... do you have MSN?

No but ICQ (#340350138)

You can also upload it to rapidshare.

I'd also be extremely happy if you could help me to translate it into German

I might do that one day, but I want to get the ddraw.dll to release first.

Edited by cncfan

Share this post


Link to post

....I got a WEBSITE. I don't need to upload it to such services. I'll PM you the link :P

(also, for big stuff I use megaupload, because it's MUCH more user friendly)

 

Oh right... as the big explanation of the setup tool already said, the tool is made for the next version I'll release, so don't expect all OTHER options to work. The resolution ones all work though ;)

Share this post


Link to post

ddraw 2011-01-20 beta 3 deinterlace,videoresize,vqphack by HIFI,J.Henze

 

-This release should fix the video scaling AR issues. Is this the way you wanted it?

-fixed fade out from the ingame play field (on win/abort mission) goes to filtering mode

-vertical positioning of movies (center them)

 

2DO:

-Unfortunately I introduced a new bug with some of my speedups I haven't noticed before, for that reason VQPhack stopped working (indeed it still works but isn't called anymore, furthermore movies are processed with the wrong deinterlacing filter except the introduction movie)

If you don't need vqphack all you will notice is slightly reduced movie quality (I think beta2 and 3 are affected)

Fixing this might come at the cost of decreased processing speed

 

-solid fonts don't look perfect

I will add an option to bypass movie deinterlacing

deinterlacing=(never,always,preservefonts) while remaining scaling intact

 

Second: Writing a completely new linear (or even bicubic, lanczos resizer) instead of doing doubling. Although this could improve overall image quality, it would be a lot of work to do I think, because it would have to be adapted to that special problem. This would also be slower.

I will think about that later, after fixing the remaining bugs and doing some code cleanup, I will send the new version to HIFI.

 

Things that HIFI might fix later:

-you can't move the window anymore (this is not my fault, this bug has been present in 2011-01-10 from HIFI too (I checked that)

-libpng static linking

-Alt/Enter Switching

 

Edited by cncfan

Share this post


Link to post
-This release should fix the video scaling AR issues. Is this the way you wanted it?

No... now you just always stretch it to fullscreen. That's not the same...

 

It's not very hard...

 

1. Take the 640x400 area of the video.

 

2. Taking gameX, gameY as the original game's dimensions (for example: 1024, 640) and windowX, windowY as the actual game window dimensions (for example: 1024, 768), stretch the video to:

 

video width: windowX

video height: (400/640) * gameX * (windowY/gameY)

 

(for the example, you'll see the video size becomes 1024x768)

 

This is the size of the final video to produce, with the black lines removed and stuff.

 

3. Center this on the available resolution.

 

Note that it's perfectly possibly you have to cut off parts to do that. For example, some laptops can only use resolution 1024x600, and not 1024x768.

In that case, the game resolution is 1024x600, and the window resolution is also 1024x600

 

This results in a video of

x: 1024

y: (400/640) * 1024 * (600/600) = 640

 

So as you see, the video would NEED to be 1024x640, while the resolution is only 1024x600. So the centering will need to cut off 20 pixels from the top and bottom. Centering is essential in this case: since all briefings have black around them anyway, this will prevent an actual part of the video being cut off at the bottom.

 

--------------------------------------------------

 

Note that you could make an ini option to choose between behaviours... like this:

 

; Video stretching and aspect ratio behaviour, choose from: original (8:5 shown as 4:3), stretched (8:5 on window aspect ratio), fullscreen (ignore aspect ratio, stretch to fullscreen)

videostretching=stretched

 

"fullscreen" is the current behaviour

"stretched" would be the formula I gave above

"original" means always inserting (480/400) as the (windowY/gameY) in the Y formula. Quite simply, the Y will become "gameX * 0.75".

 

I'd also make the stretching and removing scanlines separate options, so people can choose to remove the scanlines but NOT stretch to fullscreen.

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×