Allegro Compiled with DXGL? (ZC-related)

Discuss topics related to DXGL that don't belong in any other category.
ZoriaRPG
Posts: 22
Joined: October 8th, 2017, 7:25 pm
Location: Prydon Academy, Gallifrey
Contact:

Allegro Compiled with DXGL? (ZC-related)

Post by ZoriaRPG » October 8th, 2017, 7:33 pm

I'm morbidly curious if anyone has tried compiling Allegro with the DXGL replacement for ddraw.dll. Of course, ddraw.lib may also be needed for that--I do not recall off-hand. I suspect that compiling DXGL outputs a .lib file that can be used, where a static library is needed: Is that right?

I was pondering building a ZC version that used DXGL when building, so that both Allegro and ZC are compiled with it, and external library modification by the user is not needed. (Of course, the user-side config would still be needed, but I could link that through ZCL.)

We use allegro 4.4.3 now, with some extra fixes: https://github.com/ArmageddonGames/alle ... .4-ZCFixes --if you want to try it William.

William
Site Admin
Posts: 140
Joined: November 19th, 2011, 5:08 pm
Contact:

Re: Allegro Compiled with DXGL? (ZC-related)

Post by William » October 9th, 2017, 12:56 am

The .lib file generated by DXGL is nearly identical to the one included in the old DirectX SDKs. If you link Allegro against DXGL ddraw.lib it will still work with the system ddraw.dll, just as the DXGL ddraw.dll is intended to work with applications linked against the Microsoft ddraw.lib.

Nothing special at all will happen if you link against the DXGL generated ddraw.lib, it will just cause the program to reference ddraw.dll, with entry points DirectDrawCreate, DirectDrawCreateClipper, DirectDrawCreateEx, DirectDrawEnumerateA, and DirectDrawEnumerateExA. The .lib file is what is known as an "Import library".

If you need a copy of ddraw.lib you can actually generate your own using the old Microsoft Knowledge Base article at https://support.microsoft.com/en-us/hel ... -or-source

You can place a .ini file named dxgl.ini in the same folder with the DXGL ddraw.dll if you want to create a "portable" installation - check the dxgl-example.ini file in the source archive for information. Specifically, set NoWriteRegistry to true to enable "portable" mode or else a profile with be generated for DXGL Config.

Nordstrom
Posts: 1
Joined: April 28th, 2018, 6:42 am

Re: Allegro Compiled with DXGL? (ZC-related)

Post by Nordstrom » May 5th, 2018, 10:03 am

Hi William, is it safe to experiment a bit if you have a ddraw.lib copy? Is it easy to revert back to that copy if something goes wrong?

William
Site Admin
Posts: 140
Joined: November 19th, 2011, 5:08 pm
Contact:

Re: Allegro Compiled with DXGL? (ZC-related)

Post by William » May 5th, 2018, 10:06 am

Nordstrom wrote:
May 5th, 2018, 10:03 am
Hi William, is it safe to experiment a bit if you have a ddraw.lib copy? Is it easy to revert back to that copy if something goes wrong?
The .lib does not contain any DXGL components, as it is compiled as a DLL. The DLL has to be placed in the game folder to work, something DXGL Config does automatically.

ZoriaRPG
Posts: 22
Joined: October 8th, 2017, 7:25 pm
Location: Prydon Academy, Gallifrey
Contact:

Re: Allegro Compiled with DXGL? (ZC-related)

Post by ZoriaRPG » June 19th, 2018, 7:27 pm

What DXGL components, other than the new ddraw.dll are needed, to package DXGL with the programme suite?

ZoriaRPG
Posts: 22
Joined: October 8th, 2017, 7:25 pm
Location: Prydon Academy, Gallifrey
Contact:

Re: Allegro Compiled with DXGL? (ZC-related)

Post by ZoriaRPG » June 19th, 2018, 7:29 pm

Further, is it possible to keep the DXGL configs for ZC, in the ZC path? That would also help, to create a 'default' installation to dist with ZC 2.53.0+.

William
Site Admin
Posts: 140
Joined: November 19th, 2011, 5:08 pm
Contact:

Re: Allegro Compiled with DXGL? (ZC-related)

Post by William » June 19th, 2018, 8:33 pm

ZoriaRPG wrote:
June 19th, 2018, 7:29 pm
Further, is it possible to keep the DXGL configs for ZC, in the ZC path? That would also help, to create a 'default' installation to dist with ZC 2.53.0+.
Next version of DXGL is planned to have a "Save INI File..." option which will create a file called dxgl.ini which will store all options for DXGL. In addition, if you don't want to wait for 0.5.14, you can read the example "dxgl-example.ini" file that comes with the source code, use which options you need (if you bundle DXGL's ddraw.dll make sure to get its SHA256 signature and enter that where provided) and save the changed INI as dxgl.ini.

William
Site Admin
Posts: 140
Joined: November 19th, 2011, 5:08 pm
Contact:

Re: Allegro Compiled with DXGL? (ZC-related)

Post by William » July 5th, 2018, 8:37 pm

As a heads-up, DXGL 0.5.14 has been released. The "Save INI file..." button in the Advanced tab will save all items changed from default in a profile. Here is how I would recommend creating the INI file:

1. Install DXGL on a clean system.
2. Put your working ZC binaries in a folder, then use DXGL Config to add the profile for the game.
3. Using the profile (not the Global one) set whatever options you want.
4. When you have the settings the way you like, go to the Advanced tab and click "Save INI file..." Leave the checked items checked and the unchecked items unchecked. Click Save.
5. You will find two files in your binary folder - ddraw.dll and dxgl.ini. Simple package both those files with your binaries to make a "portable" installation of DXGL that doesn't write to the registry.

ZoriaRPG
Posts: 22
Joined: October 8th, 2017, 7:25 pm
Location: Prydon Academy, Gallifrey
Contact:

Re: Allegro Compiled with DXGL? (ZC-related)

Post by ZoriaRPG » September 10th, 2019, 2:31 am

Any chance that you could set up a pair of .ini files for windowed, and fullscreen (proportional, not stretched) to send to me, given my issues with the config not working?

Two 'ideal' settings files for ZC would be lovely.


Post Reply