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

HiresTextures: Read textfile to refer to texture pack folder. #7556

Closed
wants to merge 6 commits into from
Closed

HiresTextures: Read textfile to refer to texture pack folder. #7556

wants to merge 6 commits into from

Conversation

Admentus64
Copy link

@Admentus64 Admentus64 commented Nov 9, 2018

A while ago I mentioned this feature request: https://forums.dolphin-emu.org/Thread-feature-request-custom-textures-folder-for-multiple-games.

I am kinda new with writing C++. As proof of concept, I managed to draft up the following code. It is probably horrible. But I wanted to give it a try anyway.

The idea is that you can place a .txt file naming it with a Game ID of the game you want to load. The text file should contain a single line of text containing the Game ID the loaded game should refer to for loading the texture pack. That's basically it. The goal is to hopefully get rid of symbolic links.

Testing:

  • NAR.txt containing PZLE01 to load texture folder PZLE01 - Works
  • NAR.txt containing PZLE01 to load texture folder PZL - Works
  • NAR.txt containing PZL to load texture folder PZLE01 - Doesn't work
  • NAR.txt containing PZL to load texture folder PZL - Works

The textfile can be either named with the first three characters or the complete Game ID. Shouldn't really matter. The textfile should be placed into Load/Textures.

Admentus

if (File::Exists(File::GetUserPath(D_HIRESTEXTURES_IDX) + game_id.substr(0, 3) + ".txt"))
texture_textFile = File::GetUserPath(D_HIRESTEXTURES_IDX) + game_id.substr(0, 3) + ".txt";

std::ifstream texture_textFile_stream(texture_textFile);

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

std::ifstream stream;
File::OpenFStream(stream, texture_text_file, std::ios_base::out);
if (stream.good())
getline(stream, refer_texture_directory);

This comment was marked as off-topic.

File::OpenFStream(stream, texture_text_file, std::ios_base::out);
if (stream.good())
getline(stream, refer_texture_directory);
stream.close();

This comment was marked as off-topic.

@ghost
Copy link

ghost commented Nov 10, 2018

Also squash the commits and use the message from the first one if those later commits contain fixes to the initial commit.

@Admentus64
Copy link
Author

Ok. I should have squashed the commits (basically fixes only) and addressed the previous comments.

@Admentus64
Copy link
Author

Ohh... I should really revert the latest commit I believe. I was actually looking into doing a rebase, I think.

@BhaaLseN
Copy link
Member

That commit will disappear once you actually do rebase on current master.

@Admentus64
Copy link
Author

Sadly this is going nowhere for me, some one may close this PR for me.

@Admentus64 Admentus64 closed this Feb 15, 2019
@BhaaLseN
Copy link
Member

You'd want to fetch from the Dolphin repository (might be called origin for you if that was the original clone, or upstream if you're following Git conventions working from your fork), then rebase on the remote master branch (as in git rebase origin/master or git rebase upstream/master, depending on which one it is). You don't want to rebase on your own local master or your forks master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants