-
Notifications
You must be signed in to change notification settings - Fork 75
Resource packs #276
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
base: master
Are you sure you want to change the base?
Resource packs #276
Conversation
1a46f3c to
76dd72c
Compare
before if vanilla didnt have default8.png but a resource pack did, the game wouldn't use the resource pack's default8.png
source/client/sound/SoundData.cpp
Outdated
| { | ||
| #define SOUND(category, name) SA_##name._load(platform, #category, #name); | ||
| #define SOUND_NUM(category, name, number) SA_##name##number._load(platform, #category, #name#number); | ||
| #define SOUND(category, name) SA_##name._load(options, platform, #category, #name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not do this, find a better way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pass a pointer to Minecraft or something, that way it can call getOptions() and platform()
|
|
||
| template <class TVisitor> | ||
| void visitBFS(TVisitor& visitor) | ||
| void visitBFS(TVisitor& visitor, const std::vector<std::string>& resourcepacks) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dude no. Absolutely not. Do not pollute shared utility code with resourcepack stuff. Never do this. If you have questions during implementation, please ask me.
source/renderer/ShaderGroup.cpp
Outdated
| if (Util::isValidPath(codeOrPath)) | ||
| { | ||
| programCode = AppPlatform::singleton()->readAssetFileStr(codeOrPath, true); | ||
| programCode = AppPlatform::singleton()->readAssetFileStr(codeOrPath, true, resourcepacks); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To get a better idea as to how this can be done cleanly, we should check what PE is doing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PE only added resource packs in 0.15 which is after they removed symbols, I'm not decomping that.
fa11182 to
78ab566
Compare
11f7cad to
ae81973
Compare
This reverts commit e77a269.
saves performance since we don't have to check for assets in non-existent packs, plus it's consistent with what mojang does IIRC
First prototype of resource packs.
Resource packs are an overlay over the assets directory, stored in
games/com.mojang/resource_packs/packname.There is no UI for managing resource packs, you must manually edit options.txt.
You can enable a resource pack by setting
gfx_resourcepackstopackname, you can enable multiple resource packs by setting it topackname1,packname2,packname3.Other stuff:
Made m_externalStorageDir a property of AppPlatform.
Closes #274