Still some problem exists.
Running pracxpatch.exe gives a message window "program has stopped working..."
any idea? antivirus?
one more thing, I have 64-bit system. Maybe this is the problem?
...Yes, the attached terran.exe also gives msvcr120d.dll problem
I'm attaching the zipped .exe file, you can try just running it--if it's AV, that should fix it, if it's a problem with the Visual C roundtimes it will probably crash as well.
...
...Maybe such text info could be in tool tip near mouse pointer?
I might look at fixing that for AX in the next day or two, though really the mouse over feature wasn't as useful as I had hoped, because it was hard to look both at where you were moving the mouse and that little window at the bottom. That's part of what motivated the Terrain modes, to give a way of seeing the same information actually on the tiles themselves--as well as it being a feature I use heavily in Civ.
...
...There is still old functionality "z" and "x", that works in AX. I can get to default zoom with shift+z. ctrl+z and ctrl+x work, too.
I'm not seeing a way to return to exactly default zoom. Going up one level then down is fine, but going up to the top or down to the bottom then attempting to return to mid level means that everything is subtly resized, which reduces the clarity of some things if you look closely to to resizing, and there's no way as far as I see to undo it other than starting a new game/going to an older save.
Closing the window in windowed mode minimizes rather than closes the program. May be intentional.And here is something I would have to report:
...
...There is still old functionality "z" and "x", that works in AX. I can get to default zoom with shift+z. ctrl+z and ctrl+x work, too.
I'm not seeing a way to return to exactly default zoom. Going up one level then down is fine, but going up to the top or down to the bottom then attempting to return to mid level means that everything is subtly resized, which reduces the clarity of some things if you look closely to to resizing, and there's no way as far as I see to undo it other than starting a new game/going to an older save.
This is really great!
I would be very interested in modifying the source to try to add sensible upscaling. Is that something you want to do yourself or do you want to let others try?
This is really great!
I would be very interested in modifying the source to try to add sensible upscaling. Is that something you want to do yourself or do you want to let others try?
I'd be glad for you to try that, Draz, but understand this will just be the source code for my DLL's, not the full game. I haven't pulled over enough functionality in that area from the .exe into the .dll to really do upscaling yet, but if you read assembly and want to pull that functionality in yourself, that'd be great. If not, I plan to pull over more functionality over time.
I'm curious, though, upscaling could mean a couple of things in this context--do you mean upscaling in terms of the UI elements (larger font sizes and windows and such), or upscaling in terms of adding bilinear or better scaling routines to the map itself?
Does your code receive the map and UI calls independently?
That should depend on the screen resolution you pick on the preferences window, Yitzhak.
Lord,
I hadn't noticed what the mouse scroll did on the city screen. I can change it to pass the wheel through when that screen is up.
There is a windows call to set a bounding rectangle for the cursor. I only have one monitor hooked up, though, I'd be leery of messing with that without being able to test it.
Unrelated, GOG decided to prevent alt-tab with sdbinst. The GoGwiki has instructions on how to restore it (http://www.gogwiki.com/wiki/Sid_Meier%27s_Alpha_Centauri#Restoring_Alt.2BTab_support). I think just using that is a better solution than mapping tab to toggle window.
When I disable it via Disabled=1, I get a segfault, and when I don't disable it and it crashes for another reason (e.g. bug-hunting with the next version of my patch) while running Ollydbg, it doesn't switch to Ollydbg (as the original did) or even let me minimize. (If I reduce the size beforehand it's ok, but it's still annoying.)
Edit: No scrolling in Design Workshop when you pick weapons etc? Map behind zooms in & out. This is when DW is accessed from base build screen. When DW is accessed directly, scroll to select is row-by-row, rather than everything moves at once.
Edit2: Ooh, this is bad - also in Design Workshop, cannot click on left arrow to move towards obsolete units - map scrolls instead. (Right arrow works.) N.B.: this happens when DW is accessed from base screen. If I go directly into DW, it's OK.
When I disable it via Disabled=1, I get a segfault, and when I don't disable it and it crashes for another reason (e.g. bug-hunting with the next version of my patch) while running Ollydbg, it doesn't switch to Ollydbg (as the original did) or even let me minimize. (If I reduce the size beforehand it's ok, but it's still annoying.)
Fixing the Disabled thing. Your debug behavior is the exact opposite of mine, though--before my patch, I couldn't get IDA or Visual Studio's debuggers to show over it, after the patch they do. Maybe fixing the ALT-TAB thing will give me the same behavior you're seeing. If not, at least Disabled will work.
Did changing the screen resolution on the Pref's window fix the stretching issue you saw?
Edit: No scrolling in Design Workshop when you pick weapons etc? Map behind zooms in & out. This is when DW is accessed from base build screen. When DW is accessed directly, scroll to select is row-by-row, rather than everything moves at once.
Edit2: Ooh, this is bad - also in Design Workshop, cannot click on left arrow to move towards obsolete units - map scrolls instead. (Right arrow works.) N.B.: this happens when DW is accessed from base screen. If I go directly into DW, it's OK.
I'm reaching out to Yitzi and Scient to see if one of them has a better method of detecting when a pop-up window is open. I was using code the game itself used, but apparently it's missing some cases.
Yitzi--I've got the Disabled fixed, but even fixing ALT-TAB on my box, all my debuggers pop up over full screen with the patch, where they didn't before the patch--still the exact opposite of what you're seeing with Ollydbg.
Scrolling with mouse wheel and zooming with mouse wheel seems to be disabled entirely? It was working with 1.01, but now I've updated it's not working anywhere. And even zooming with keys is not fully functional, it won't let me zoom out past default (though I can zoom in a long way). I don't think I've screwed up preferences again, tried changing a bunch and it's not started working again.
The default number of zoom levels is 21 somehow, clicking increase lowers it to 20 which reenables zooming out (with 21 it's impossible to zoom out further than default, but you can still zoom in).
If I use the 1366x768 screen mode in PRACX, my terran.exe crashes when I press the left arrow key four times in a row to move the selected tile ('V', left, left, left, left, {crash}). This doesn't happen if I use 1024x768.
I've attached an Ollydbg capture of the access violation.
Gee, that's funny. I thought 1024x768=786,432. ;)
hmm, I'm getting a bug where while watching the AI play out long turns it jumps to windowed mode and displays a circle instead of mouse. If you click anywhere it gives an error about the program not responding, but you can see the turn going on in the background. My guess is windows thinks the program is unresponsive during the off-turn, and now has a way to un-fullscreen?
I've attached a save which demonstrates it for me, just hit end turn and wait. If your comp is so fast it does that one before unresponsive hit y for full vision, or I'll dig up a bigger save.
FTFY :)
// if (0==strcmp("Lord Avalon", pszPlayerName) && fAboutToWin) MultiplyEnemyArmiesBy1000();
Question: Which files should I include in my patch in order to have it include yours?It depends on how much or how little of my patch you want to include.
Problem: I switched to a new computer, and transferred over all the files that looked like they were relevant to PRACX version 1.01 (which I'd had). No PRACX. I then installed version 1.03, still no PRACX. I then uninstalled and reinstalled 1.03, still no PRACX. Disabled is set to <Default>, so it shouldn't be that...
I built the Supercollider, and the video had no sound. (I don't know about other videos, as I usually close them right away.) Back to the game, and it has sounds.OK, maybe never mind. I built Pholus Mutagen, started a new game and built Human Genome Project - no sounds. But then I restarted my PC. Got HGP sound. Just one of those things?
Yitzi--antivirus maybe? Or not running pracxpatch with admin rights? What antivirus are you running, if any?
... Lord Avalon--could be, my sound gets corrupt playing this old games from time to time--it doesn't go away completely, but gets very distorted. If you want to test more and know how to use the command shell, you can go to the "movies" directory under your SMACX directory and run:
playuv15 -software supercollider.wve
That's what I have it shelling to to play in game movies now to avoid the movies+alt tab issues.
You are mistaken. I am Good Spock, aka Cool Spock. ^_^
Mart--I'm not able to reproduce that, and offhand I can't think of anything I changed that might cause that. If you find a pattern that seems to make it happen or can think of anything that might help me reproduce it, please let me know--that's the kind of thing I have to be able to reproduce to track down.It may be my mouse driver issue. It is, that it just happened around this time I started using one of the patch versions. I will have to check the driver and stuff around it.
Mart--I use the RAT 7 myself--it's the most adjustable (to fit my hand) mouse I've seen. So I don't think it would be the RAT driver, though I'm using Windows 7, not 8.There must be something in my hardware/software combination, cause I also noticed now such strange behaviour in firefox. So I am going to look for the problem over there.
Also, there would not be a GetTickCount64 message from a 32 bit DLL.
...You can try also to substitute the graphics file with its widescreen version.
An obvious solution is to put hard returns in the interlude text paragraphs, but that's extra work... :P
[request]
I hope the next version includes a way to format the font size of text in windows such as the terrain yield info at the bottom of the screen or the base facilities list in the city screen (for laptop users, you can't see the "linked" beside the network node. You see, changing the value in "prefsformat" in Alpha.ini doesn't work.
Thanks for confirming that. Could you have a look in Windows Event Log for anything interesting happening when SMAC crashes?
Faulting application name: terranx.exe, version: 0.0.0.0, time stamp: 0x31313931
Faulting module name: terranx.exe, version: 0.0.0.0, time stamp: 0x31313931
Exception code: 0xc0000005
Fault offset: 0x001e076d
Faulting process id: 0x397c
Faulting application start time: 0x01d0d8ff39b5a244
Faulting application path: C:\GOG Games\Sid Meier's Alpha Centauri\terranx.exe
Faulting module path: C:\GOG Games\Sid Meier's Alpha Centauri\terranx.exe
Report Id: 3cf15e3d-2e47-43bc-bc7b-34d68e8428ca
Faulting package full name:
Faulting package-relative application ID:
I realize that I probably caused this issue by being an early adopter, but after upgrading to Windows 10, if PRACX is enabled, it crashed terranx (sometimes after the second turn I play). Any tips on how to troubleshoot this?
Yes, icons.pcx definitely needs to be distributed for PRAC/X to work properly--it contains the new images I used. Yitzi, could you include it in your install?
It looks like Yitzi's patch already includes Kyrub's patch. Since they are both just the terran.exe file, installing Kyrub's would overwrite Yitzi's changes, whereas installing Yitzi's gets you both.
Yes, PRAC should be compatible with Kyrub's SMAC patch, as long as you install PRAC last.Thanks!
? The only reason I'm aware of for people needing to tab out is to take screenies, so I suppose he has a point that it's a graphics issue... ISTR the reason's something about compatibility, so if you're working on W10 compatibility anyway...Hey Yitzi - would fixing the no-tabout junk introduced in the GOG version so users of it don't have to find and implement the workaround be outside the scope of this project? I'm guessing that would be a popular feature, so good for the community, good for the patch project and good for you...
Way outside. It might be viable for PRACX, though.
Say, Mr. sequel-of-Plotinous,? The only reason I'm aware of for people needing to tab out is to take screenies, so I suppose he has a point that it's a graphics issue... ISTR the reason's something about compatibility, so if you're working on W10 compatibility anyway...Hey Yitzi - would fixing the no-tabout junk introduced in the GOG version so users of it don't have to find and implement the workaround be outside the scope of this project? I'm guessing that would be a popular feature, so good for the community, good for the patch project and good for you...
Way outside. It might be viable for PRACX, though.
A missing Icons.pcx update will cause all kinds of wrong looking things, like what Neville posted, but it wouldn't cause a crash like you're experiencing, Lxndr. You're probably running into a Win 10 incompatibility that I really am going to get to at some point.
Not a big deal, obviously. Just a minor pain. If you can't narrow down why the display cycling seems to grab ahold of Win's settings, maybe you could just put an ini option to start the game in windowed mode and not do the init/cycle at all? I wouldn't mind that option anyways, hehe.
Are you sure that PRACX doesn't already have an option to start in windowed? It would be in PRACX's config file, not the standard .ini, if I recall correctly.
Unfortunately, PlotinusRedux isn't very active at the moment, so I wouldn't hold your breath for a new release. The source code is available to make any of these changes yourself, though.
Is there any way to disable the Tab button for windowing the game? I'd like to alt+tab without having it windowed every time I do it.Anyone? Sorry if someone replied but I'm not finding anything about this.
v1.07 (04/21/2016)
==================
* No longer becomes windowed when window loses focus.
* TAB no longer toggles windowed/full-screen.
* ALT+ENTER now toggles windowed/full-screen mode.
--DrazharLn
I find scrolling behaviour a bit strange. Without Pracx when I put the mouse on the borders it immediately scrolls continously that direction. Now with Pracx when I put the mouse towards the border nothing happens until I remove the mouse from the border, then suddenly it does one big jump into uncharted territories. If I change the max Scrolling distance, the jumps become more reasonable, but the long delay before anything happens remains. (Its like the game freezes, all animations are halted when the mouse hits the border until I remove the mouse again.
--> is this intended behaviour (to facilitate long distance scrolling?)
Is there any way to get Vanilla Scrolling behaviour back?
I don't understand the code well enough to do that for you. The source is available here, though: http://alphacentauri2.info/index.php?topic=14811.msg65877 (http://alphacentauri2.info/index.php?topic=14811.msg65877)
@lxndr, Kurvivor
Try installing Yitzi's patch 3.3, then re-installing PRACX. That works for me, whereas installing PRACX over vanilla terranx gives an access violation error.
That suggests that:
1) The error is not particular to Win10
2) At some point the unofficial patches changed some chunks of code from executable to data. Probably in scient's original patch.
@justinlee999,
The installer I gave earlier stops Tab from making the game windowed, but alt tab still puts the game into a windowed mode for me.
The version attached to this post fixes that issue and allows alt+enter to toggle windowed/full-screen modes.
Changelog:Quotev1.07 (04/21/2016)
==================
* No longer becomes windowed when window loses focus.
* TAB no longer toggles windowed/full-screen.
* ALT+ENTER now toggles windowed/full-screen mode.
--DrazharLn
You're welcome :D
So, to be clear running
playuv15.exe -software merchantExchange.wve
Fails to show a film?
In the slightly longer term, I'm trying to get hold of the linux version of the game. Apparently that has the videos encoded with a more traditional codec, rather than EA's TQI codec. If I can get that, I'll provide a mod that uses ffmpeg or similar to play the films, which will remove the dependency on playuv and let people add new videos easier.
Alright, I'll release a patched version of PRACX after Lunch.
Thanks for the link to wcmp. I'd forgotten about it. ffmpeg is able to convert the wves as well, but you lose a lot of quality - I think that's because the eatqi codec in ffmpeg isn't very good, but I suppose I could also just be picking bad output options. Maybe this converter is better.
MoviePlayerCommand=.\movies\playuv15.exe
std::string command = m_ST.m_szMoviePlayerCommand;
// Would be nice to use ffplay or similar, but the videos are encoded with EA's proprietary TQI codec, and as of April 2016, there's no codec available for ffmpeg.
// Could reverse engineer playuv15, or the implementation baked into SMAC, I suppose.
i = strlen(filename) - 4;
if (i > -1 && filename[i] != '.')
strcat(filename, ".wve");
command += " .\\movies\\";
command += filename;
// Due to some quantum mechanics weirdness, if I don't write command out to a file, it won't have the right value.
std::ofstream logfile;
logfile.open("pracx.tmp");
logfile << command;
logfile.close();
std::remove("pracx.tmp");
Try this.
Go to your .ini file and add the lineCode: [Select]MoviePlayerCommand=.\movies\playuv15.exe
The default is .\moves\playuv15.exe -software
Replacing the command with something other than playuv15 is likely not to work.
How peculiar. I'll try and make a version that logs the output of the program it calls. Might get round to it late this evening.
That's really odd.
./movies and movies should resolve to the same address.
Glad you sorted it, though.
void __cdecl PRACXShowMovie(const char *pszFileName)
{
PROCESS_INFORMATION pi = { 0 };
STARTUPINFO si = { 0 };
char szCmd[512];
int i;
// Would be nice to use ffplay or similar, but the videos are encoded with EA's proprietary TQI codec, and as of April 2016, there's no codec available for ffmpeg.
// Could reverse engineer playuv15, or the implementation baked into SMAC, I suppose.
strcpy(szCmd, ".\\movies\\playuv15.exe -software -xres 2560 -yres 1440 ");
// ===== Harpalus: No ".\\movies\\ here, it's already in pszFileName.
strcat(szCmd, pszFileName);
// ===== Harpalus: Final szCmd is presumably ".\\movies\\playuv15.exe -software -xres 2560 -yres 1440 .\\movies\\open.wme
// ===== Harpalus: 1.08 szCmd is presumably ".\\movies\\playuv15.exe -software -xres 2560 -yres 1440 .\\open.wme
i = strlen(szCmd) - 4;
if (i > -1 && szCmd[i] != '.')
strcat(szCmd, ".wve");
m_fPlayingMovie = true;
if (CreateProcess(".\\movies\\playuv15.exe", szCmd, NULL, NULL, false, CREATE_NO_WINDOW, NULL, NULL, &si, &pi))
{
WaitForSingleObject(pi.hProcess, 2 * 60 * 1000);
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
}
PostMessage(*m_pAC->phWnd, WM_MOVIEOVER, 0, 0);
}
if (CreateProcess(".\\movies\\playuv15.exe", szCmd, NULL, NULL, false, CREATE_NO_WINDOW, NULL, NULL, &si, &pi))
to if (CreateProcess(NULL, szCmd, NULL, NULL, false, CREATE_NO_WINDOW, NULL, NULL, &si, &pi))
if (CreateProcess(NULL, const_cast<char*>(command.c_str()), NULL, NULL, false, CREATE_NO_WINDOW, NULL, NULL, &si, &pi))
if (CreateProcess(".\\movies\\playuv15.exe", szCmd, NULL, NULL, false, CREATE_NO_WINDOW, NULL, NULL, &si, &pi))
if (CreateProcess(NULL, const_cast<char*>(command.c_str()), NULL, NULL, false, CREATE_NO_WINDOW, NULL, NULL, &si, &pi))
With my regular installation, no videos play: I start terranx.exe, start a new game as Morgan on easy, and rush/buy the Merchant Exchange project as soon as possible. Neither video plays. When I copy open.mte to SMAC from SMAC/movies, the opening video plays but not the Merchant Exchange project. If I copy the Merchant Exchange video after and repeat the test, both videos play.
v1.08 Works for me on my win10 machine. Not tested on the linux one.
You've got slightly mixed up. In v1.07 and earlier, the createprocess call looks like this:Code: [Select]if (CreateProcess(".\\movies\\playuv15.exe", szCmd, NULL, NULL, false, CREATE_NO_WINDOW, NULL, NULL, &si, &pi))
In v1.08, I changed it to:Code: [Select]if (CreateProcess(NULL, const_cast<char*>(command.c_str()), NULL, NULL, false, CREATE_NO_WINDOW, NULL, NULL, &si, &pi))
In either case, szCmd and command (by default) both start with ".\\movies\\playuv15.exe", so setting the first argument to NULL should give the same result as setting it to ".\\movies\\playuv15.exe".QuoteWith my regular installation, no videos play: I start terranx.exe, start a new game as Morgan on easy, and rush/buy the Merchant Exchange project as soon as possible. Neither video plays. When I copy open.mte to SMAC from SMAC/movies, the opening video plays but not the Merchant Exchange project. If I copy the Merchant Exchange video after and repeat the test, both videos play.
This is definitely weird. For one, the opening movie is opening.wve or openingx.wve, not open.wve (I think open.wve is just a sound effect). I've built a copy of pracx that logs all the command strings to a logfile, maybe you could have a go with that? Test if opening a command window in the same dir as terranx.exe and running a command from the logfile gives you the right output, maybe? I've also attached a save that you can use to test video playback. Just press end turn and two bases will finish the Weather Paradigm and Merchant Exchange. Though video playback should be working or buggy for all videos, including the opening one.
Just replace the prax/prac.dlls in the smac dir with the ones I've attached.
Source for these changes: https://github.com/DrazharLn/pracx/tree/harpalus
.\movies\playuv15.exe .\movies\opening.wve
.\movies\playuv15.exe .\movies\Ìh$uweatherParadigm.wve
.\movies\playuv15.exe .\movies\Ìh$umerchantExchange.wve
.\movies\playuv15.exe .\movies\opening.wve
.\movies\playuv15.exe .\movies\”šwopening.wve
.\movies\playuv15.exe .\movies\opening.wve
.\movies\playuv15.exe .\movies\opening.wve
.\movies\playuv15.exe .\movies\weatherParadigm.wve
.\movies\playuv15.exe .\movies\merchantExchange.wve
.\movies\playuv15.exe .\movies\opening.wve
.\movies\playuv15.exe .\movies\weatherParadigm.wve
.\movies\playuv15.exe .\movies\merchantExchange.wve
.\movies\playuv15.exe .\movies\opening.wve
.\movies\playuv15.exe .\movies\weatherParadigm.wve
.\movies\playuv15.exe .\movies\merchantExchange.wve
.\movies\playuv15.exe .\movies\opening.wve
.\movies\playuv15.exe .\movies\opening.wve
.\movies\playuv15.exe .\movies\opening.wve (and red garbage across entire display while movie is playing)
.\movies\playuv15.exe .\movies\opening.wve
.\movies\playuv15.exe .\movies\opening.wve
wine: Unhandled page fault on read access to 0x02cbffff at address 0x5e076d (thread 004d), starting debugger...
Error / Application Error
Faulting application name: terranx.exe, version: 0.0.0.0, time stamp: 0x31313931
Faulting module name: terranx.exe, version: 0.0.0.0, time stamp: 0x31313931
Exception code: 0xc0000005
Fault offset: 0x001e0547
Faulting process id: 0x1164
Faulting application start time: 0x01d1b243a70102fe
Faulting application path: C:\GOG Games\Sid Meier's Alpha Centauri\terranx.exe
Faulting module path: C:\GOG Games\Sid Meier's Alpha Centauri\terranx.exe
Report Id: f010f947-1e36-11e6-ae1c-02f022330901
Information / Windows Error Rerporting
Fault bucket 1997518084, type 1
Event Name: APPCRASH
Response: Not available
Cab Id: 0
Problem signature:
P1: terranx.exe
P2: 0.0.0.0
P3: 31313931
P4: terranx.exe
P5: 0.0.0.0
P6: 31313931
P7: c0000005
P8: 001e0547
P9:
P10:
Attached files:
C:\Users\acer\AppData\Local\Temp\WER6938.tmp.WERInternalMetadata.xml
These files may be available here:
C:\Users\acer\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_terranx.exe_46d7918f6c64bd967d65669ebef813a9e7296a_03f99fc2
Analysis symbol:
Rechecking for solution: 0
Report Id: f010f947-1e36-11e6-ae1c-02f022330901
Report Status: 0
[ninja'd - Draz m'boy, you in my tech-house now. Watch and learn. ;) ;nod]Correction: for Fuzzy Select Tool, read Select by Color Tool. I'm only just now starting work, but the first one I want to try is a pretty easy job. Stay tuned.
newicons.pcx for the base screen resources view.
Just in case you don't already know how to navigate the palette issues, you need to open it twice and do all the work in one copy you'll paste overtop the untouched one to save. In GIMP, first thing with the working copy, Image>Mode>RGB, then Layer>Transparency>Add Alpha Channel, finally, Fuzzy Select Tool w/ Threshold: turned down to 0>click on the background pink>delete. Now you can begin fiddling with the brightness of individually-selected parts (box-select the resource icons one row at a time or all together but you probably don't want to do that to everything in the entire file at once) and copy/paste the whole thing once you're finished into the untouched copy and save.
Some of those hoops aren't necessary to jump through in Photoshop, but I'd have to refresh my memory which - all are in GIMP. Working with the indexed format of .pcx files and the limits of the SMACX palette is a bit of a pain, but no big deal for what you want -note that minor enough changes in shade and hue will default back when you paste into the original palette of the untouched copy, so you might have to do a bit of trial and error and playtesting.
-If you decide to completely replace anything, it's a little more complicated, but I'll talk you through it, no problem. The shade adjustment you propose ought to cover the originals fine without a glitch.
The secret project videos should work fine, though they're displayed by an external program. Check that you can view the videos in /movies/ with /movies/playuv15.exe
'opening.wve' is the intro movie and is safe to watch without spoilers.
To play it, open a command prompt in the movies directory (Shift+rightclick), then run 'playuv15.exe -software opening.wve'
LRESULT __stdcall PRACXWinProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
static int iDeltaAccum = 0;
int iRet = 0;
bool fHasFocus = (GetFocus() == *m_pAC->phWnd);
if (msg == WM_MOVIEOVER)
{
.
.
.
void __cdecl PRACXShowMovie(const char *pszFileName)
{
PROCESS_INFORMATION pi = { 0 };
STARTUPINFO si = { 0 };
char filename[512];
strcpy(filename, pszFileName);
int i;
std::string command = m_ST.m_szMoviePlayerCommand;
// Would be nice to use ffplay or similar, but the videos are encoded with EA's proprietary TQI codec, and as of April 2016, there's no codec available for ffmpeg.
// Could reverse engineer playuv15, or the implementation baked into SMAC, I suppose.
i = strlen(filename) - 4;
if (i > -1 && filename[i] != '.')
strcat(filename, ".wve");
command += " .\\movies\\";
command += filename;
// Due to some quantum mechanics [nonsense], if I don't write command out to a file, it won't have the right value.
std::ofstream logfile;
logfile.open("pracx.tmp");
logfile << command;
logfile.close();
std::remove("pracx.tmp");
m_fPlayingMovie = true;
if (CreateProcess(NULL, const_cast<char*>(command.c_str()), NULL, NULL, false, CREATE_NO_WINDOW, NULL, NULL, &si, &pi))
{
LOOK HERE! WaitForSingleObject(pi.hProcess, 2 * 60 * 1000);
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
}
PostMessage(*m_pAC->phWnd, WM_MOVIEOVER, 0, 0);
}
@echo off
"c:\mplayer"\mplayer.exe "E:\Sid Meier's Alpha Centauri\movies"\%~n1.wve -vf-add hqdn3d -fs
I think I found the issue (btw, your coding style makes it very easy to read -- it's not the nightmare I've come to expect when reading other peoples' code):Code: [Select]void __cdecl PRACXShowMovie(const char *pszFileName)
{
<snip>
if (CreateProcess(NULL, const_cast<char*>(command.c_str()), NULL, NULL, false, CREATE_NO_WINDOW, NULL, NULL, &si, &pi))
{
LOOK HERE! WaitForSingleObject(pi.hProcess, 2 * 60 * 1000);
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
}
PostMessage(*m_pAC->phWnd, WM_MOVIEOVER, 0, 0);
}
WaitForSingleObject(pi.hProcess, 2 * 60 * 1000);
It waits for 2 minutes, which sounds right about around where videos cut off. I'll time it.
EDIT3: Yeah, that's it. Change it to 5 minutes (or 5 hours, does it really matter?), and we're good. :D
//Would be nice to use ffplay or similar, but the videos are encoded with EA's proprietary TQI codec, and as of April 2016, there's no codec available for ffmpeg.
// Could reverse engineer playuv15, or the implementation baked into SMAC, I suppose.
BTW, mplayer can play wve files, and it can play them in fullscreen with postprocessing filters. I've been using that instead of uvplay15.exe. In the ini I have it point to the following batch file:Code: [Select]@echo off
"c:\mplayer"\mplayer.exe "E:\Sid Meier's Alpha Centauri\movies"\%~n1.wve -vf-add hqdn3d -fs
"It would be interesting to get the exact number of milliseconds until it forces the window focus change." -- Daemonjax
It's funny I said that, because if I had timed it, even without the source, I would have blindly searched for a 120000 integer value in the pracx.dll, made the change, and had gotten the fix anyways. It's more fun with the source, though. ;) I would have written an autohotkey script to measure the time in milliseconds between focus changes, because I wouldn't have known what value I was looking for... but I ended up using the clock on my cable tv box when checking if it was exactly 2 minutes, so that saved me some time which could be better spent playing SMAX.
Alien factions can scan all the map using ALT+T, since it overrides fog of war for them. For example one can learn about positions of all factions and empty lots on the first turn. Is it a known bug? By the way, resource map works properly for alien factions
...problem with 1366x768 resolution I'm now crash free at 1360x768. The 6 pixels on either side won't be missed. I broke the movies by changing screen res from within the in-game options, but deleting the .ini for a fresh one and punching the new res in manually fixed me right up.
When loading up SMAX with PRACX active, instead of playing the SMAX intro movie it plays SMAC's intro instead.
previously the movies would get stretched in widescreen resolutions
This app can't run on your PC.Is it okay to just use the v1.10 .dll's without going through the install process, since the terran.exe is already patched to load them?
To find a version for your PC, check with the software publisher.
Installed, can open SMAC but SMAX only tries, no black screen or anything, just swirling cursor, then nothing.
[Preferences]
ForceOldVoxelAlgorithm=1
[Alpha Centauri]
DirectDraw=0
This has probably been mentioned earlier here but it's useful to know.No, not right. There is a native permission, but for alt + tab it does not collapse.
You can play Alpha Centauri in the native desktop resolution without problems in alt-tabbing if you open Alpha Centauri.Ini and enter these lines there:Code: [Select][Preferences]
ForceOldVoxelAlgorithm=1
[Alpha Centauri]
DirectDraw=0
It can be installed over Yitzi's patch--the installation will just change a few bytes of terran.exe and terranx.exe to load my dll's.After patching with version 1.10 - terran.exe and terranx.exe remain unchanged (Yitzi). That is, they are similar to those in the _backup_v1.10 folder. So it should be?
terran.exe and terranx.exe are already patched. The prac/prax DLLs are older versions. Probably Pracx 1.9 or something.So, it is still better to patch over the new version of the DLL.