Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ffxiv_x64 Plugin: Add a plugin for Final Fantasy XIV DX11/x64 #2673

Merged
merged 1 commit into from Dec 1, 2016

Conversation

@EmperorArthur
Copy link
Contributor

commented Nov 27, 2016

This is almost identical to the DirectX 9 plugin, just using 64 bit pointers and new addresses.

I'd love to combine both plugins, and could do it with something like #ifdef IS_DX11, but am not familiar enough with qmake to set the #define and have both versions build.

Note: The plugin short name is the same, since that seems to be part of the context.

@mkrautz

This comment has been minimized.

Copy link
Member

commented Nov 27, 2016

Hi,

You can do the following to share code:

  1. Move new DX11 pointer values to plugins/ffxiv/ffxiv.cpp, ifdef'd by something like FFXIV_USE_DX11. Pretty much like you did with l4d2.
  2. Delete plugins/ffxiv_dx11/ffxiv_dx11.cpp
  3. In ffxiv_dx11.pro, set SOURCES to ../ffxiv/ffxiv.cpp
  4. Below sources, add DEFINES *= FFXIV_USE_DX11

That should do it.

I think it makes sense in this case.

@EmperorArthur EmperorArthur force-pushed the EmperorArthur:ffxiv_dx11 branch 2 times, most recently from 9899d83 to 7db5ec2 Nov 28, 2016

@EmperorArthur

This comment has been minimized.

Copy link
Contributor Author

commented Nov 28, 2016

Thanks for the help.

Changes done and rebased.

@mkrautz

This comment has been minimized.

Copy link
Member

commented Nov 28, 2016

If the DX11 binary is X64 only (or the other way around), maybe it makes sense to use that for the ifdef and plugin suffix instead? That's what we do with other plugins.

@EmperorArthur

This comment has been minimized.

Copy link
Contributor Author

commented Nov 28, 2016

It's one of those things where x64 users can and do still use the dx9 version, so both plugins need to be built.

Off topic: Square maintains 4 different versions of this game. DirectX9, DirectX11, PS3, and PS4. It's crazy, especially since the PS3/4 can't use DirectX at all. They don't even offer their OpenGL renderer to PC users.

@mkrautz

This comment has been minimized.

Copy link
Member

commented Nov 28, 2016

That's OK, we'd ship both plugins... But we usually split the plugins out by arch, not by renderer (because the offsets tend to be the same even for different renderers...)

@EmperorArthur

This comment has been minimized.

Copy link
Contributor Author

commented Nov 28, 2016

If only it was that simple. The dx11 renderer is only available on x64, so the offsets are different.

Both EXEs are shipped, but the renderer switch in the launcher chooses which one is launched. The only way a user would know one is x86 vs x64 is if they were on an x86 system. Then the choice is locked to DirectX 9.

@mkrautz

This comment has been minimized.

Copy link
Member

commented Nov 29, 2016

My point still stands, I think we should use x64 naming instead of dx11 for the plugin. I don't see why FFXIV should use _dx11 when all other plugins use _x64.

@EmperorArthur

This comment has been minimized.

Copy link
Contributor Author

commented Nov 29, 2016

Would you like the description changed as well, or just the file name?

@mkrautz

This comment has been minimized.

Copy link
Member

commented Nov 29, 2016

Everywhere, please :-)

@EmperorArthur EmperorArthur force-pushed the EmperorArthur:ffxiv_dx11 branch from 7db5ec2 to 856ddf9 Nov 29, 2016

@EmperorArthur

This comment has been minimized.

Copy link
Contributor Author

commented Nov 29, 2016

There you go.

I couldn't use #ifdef _M_X64 because the x86 build would never be called on 64 bit systems.

Anything else you would like to see?

@mkrautz

This comment has been minimized.

Copy link
Member

commented Nov 29, 2016

Please change the commit message to reflect the new plugin name

ffxiv_x64 Plugin: Add a plugin for Final Fantasy XIV x64
Use ffxiv.cpp to provide both plugins

@EmperorArthur EmperorArthur force-pushed the EmperorArthur:ffxiv_dx11 branch from 856ddf9 to 84c2ae2 Nov 29, 2016

@EmperorArthur

This comment has been minimized.

Copy link
Contributor Author

commented Nov 29, 2016

Woops, forgot that.

Done.

@mkrautz
mkrautz approved these changes Dec 1, 2016

@mkrautz mkrautz changed the title ffxiv_dx11 Plugin: Add a plugin for Final Fantasy XIV DirectX11 ffxiv_dx11 Plugin: Add a plugin for Final Fantasy XIV DirectX11 (x64) Dec 1, 2016

@mkrautz mkrautz changed the title ffxiv_dx11 Plugin: Add a plugin for Final Fantasy XIV DirectX11 (x64) ffxiv_x64 Plugin: Add a plugin for Final Fantasy XIV DX11/x64 Dec 1, 2016

@mkrautz mkrautz merged commit acd664a into mumble-voip:master Dec 1, 2016

@EmperorArthur

This comment has been minimized.

Copy link
Contributor Author

commented Dec 6, 2016

Thanks for working with me. :)

@EmperorArthur EmperorArthur deleted the EmperorArthur:ffxiv_dx11 branch Dec 8, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.