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

Fix pointer issues and build with mingw64 #26

Closed
wants to merge 27 commits into from

Conversation

madebr
Copy link
Contributor

@madebr madebr commented Jun 25, 2024

No description provided.

@foxtacles
Copy link
Member

foxtacles commented Jun 25, 2024

Looks good! As far as I see it should be possible to apply many of the changes to LEGO1 to the decomp repository as well without affecting accuracy. Can you create a PR with those changes over there so we can merge them? Then I will sync/copy it to isle-portable. Since the codebase of this repository is based on the decomp I'd like to keep the divergence to a minimum. Thanks!

@madebr
Copy link
Contributor Author

madebr commented Jun 25, 2024

I'll look into it.

Looks like this repo has no common history with the isle repo.
Wouldn't it make more sense to make it a proper fork with full history?
I think it will make tracking changes with the original repo much easier.

@foxtacles
Copy link
Member

Yeah, maybe it would make more sense. I wasn't sure if it would be "the right" thing to do since no changes are meant to be merged back into "upstream" from here, and not all commits are meant to be synced into isle-portable (for instance, everything related to the decomp tools has been removed). So the histories will naturally diverge to a certain extent.

What I've been doing so far is use git format-patch --stdout and git am to extract and then selectively apply the commits, but I'm open to changing this.

@foxtacles
Copy link
Member

@madebr updated master. There was one minor compilation error with regards to the app data type in the MinGW build, but we can fix it here

Comment on lines +6 to +13
# FIXME: this is wrong.
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
set(def "${CMAKE_CURRENT_SOURCE_DIR}/d3dxof32.def")
else()
set(def "${CMAKE_CURRENT_SOURCE_DIR}/d3dxof64.def")
endif()
set(imp "${CMAKE_CURRENT_BINARY_DIR}/d3dxof.lib")
set(exp "${CMAKE_CURRENT_BINARY_DIR}/d3dxof.exp")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to get everything building and linking with MSVC targeting x64.
There is now an issue with d3drm's dependency on d3dxof: does a 64-bit d3dxof.dll even exist?

DirectXFileCreate

Perhaps we need to copy its code from wine as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the (initial) easiest solution would be to load DirectXFileCreate dynamically (using LoadLibrary + GetProcAddress).
We might not even need d3dxof.dll library.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind, looks like it is used to deserialize data.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made this an option so you can try by configuring with -DWINE_D3DRM_DYNAMIC_D3DXOF=ON/OFF.

@foxtacles foxtacles deleted the branch isledecomp:master June 26, 2024 00:26
@foxtacles foxtacles closed this Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants