-
Notifications
You must be signed in to change notification settings - Fork 159
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
HaCreator - 64 Bit Client #171
Conversation
I made an option to switch between 32 bit client and 64 bit client, maybe its not optimal way and could just make the thing detect if it contains a Data folder, but anyways here is my take feel free to make it better, there is couple of issues like map simulator and some tile display issue not working, but i think the rest should be fine
Hi, I would appreciate if you are able to pull from the latest master branch, then opening up another pull request. I'll merge them. Thanks a lot! |
Ohhh yeh sure |
This reverts commit e704a3f.
Yeh i dunno why i am having such a hard time with Github |
It might be easier by just pulling the latest branch, and manually making the changes once again 🤔 |
Hmm yeh ill just do it next week |
Pulled Last changes and redid everything
After a long break i have decided to come back and pulled the latest changes as asked before, and i completely redid since i had a lot of issues with the last pull so i just pulled and redid all the code necessary to make it work again, as mentioned there is a lot of work to do still, i just wanted to help out the community and help the open source as best to my ability, if there is any questions please let me know! Much love <3 |
I will take a look this weekend! Thanks a lot for your help, I appreciate it!! |
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.
glossed around the changes and left some suggestions for cleaner code.
didn't really look into the internals and didn't verify if it even worked 🤷, but looks good
// Load sound | ||
foreach (string soundWzFile in WzFileManager.SOUND_WZ_FILES) | ||
|
||
if (isClient64()) | ||
{ | ||
textBox2.Text = string.Format("Initializing {0}.wz...", soundWzFile); | ||
Application.DoEvents(); | ||
Program.WzManager.LoadWzFile(soundWzFile.ToLower()); | ||
Program.WzManager.ExtractSoundFile(soundWzFile.ToLower()); | ||
foreach (string soundWzFile in WzFileManager.SOUND_WZ_FILES_64) | ||
{ | ||
textBox2.Text = string.Format("Initializing {0}.wz...", soundWzFile); | ||
Application.DoEvents(); | ||
Program.WzManager.LoadWzFile(soundWzFile.ToLower()); | ||
Program.WzManager.ExtractSoundFile(soundWzFile.ToLower()); | ||
} | ||
} else | ||
{ | ||
foreach (string soundWzFile in WzFileManager.SOUND_WZ_FILES) | ||
{ | ||
textBox2.Text = string.Format("Initializing {0}.wz...", soundWzFile); | ||
Application.DoEvents(); | ||
Program.WzManager.LoadWzFile(soundWzFile.ToLower()); | ||
Program.WzManager.ExtractSoundFile(soundWzFile.ToLower()); | ||
} |
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.
the only difference is which files we iterate, the loop is the same:
// Load sound
var soundWzFiles = isClient64() ? WzFileManager.SOUND_WZ_FILES_64 : WzFileManager.SOUND_WZ_FILES;
foreach (string soundWzFile in soundWzFiles )
{
textBox2.Text = string.Format("Initializing {0}.wz...", soundWzFile);
Application.DoEvents();
Program.WzManager.LoadWzFile(soundWzFile.ToLower());
Program.WzManager.ExtractSoundFile(soundWzFile.ToLower());
}
foreach (string mapwzFile in WzFileManager.MAP_WZ_FILES) | ||
if (isClient64()) | ||
{ | ||
if (Program.WzManager.LoadWzFile(mapwzFile.ToLower())) | ||
foreach (string mapwzFile in WzFileManager.MAP_WZ_FILES_64) | ||
{ | ||
textBox2.Text = string.Format("Initializing {0}.wz...", mapwzFile); | ||
Application.DoEvents(); | ||
Program.WzManager.ExtractBackgroundSets(); | ||
Program.WzManager.ExtractObjSets(); | ||
if (Program.WzManager.LoadWzFile(mapwzFile.ToLower())) | ||
{ | ||
textBox2.Text = string.Format("Initializing {0}.wz...", mapwzFile); | ||
Application.DoEvents(); | ||
Program.WzManager.ExtractBackgroundSets(); | ||
Program.WzManager.ExtractObjSets(); | ||
} | ||
} | ||
} | ||
else | ||
{ | ||
foreach (string mapwzFile in WzFileManager.MAP_WZ_FILES) | ||
{ | ||
if (Program.WzManager.LoadWzFile(mapwzFile.ToLower())) | ||
{ | ||
textBox2.Text = string.Format("Initializing {0}.wz...", mapwzFile); | ||
Application.DoEvents(); | ||
Program.WzManager.ExtractBackgroundSets(); | ||
Program.WzManager.ExtractObjSets(); | ||
} | ||
} | ||
} |
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.
var mapWzFiles = isClient64() ? WzFileManager.MAP_WZ_FILES_64 : WzFileManager.MAP_WZ_FILES;
foreach (string mapwzFile in mapWzFiles )
{
if (Program.WzManager.LoadWzFile(mapwzFile.ToLower()))
{
textBox2.Text = string.Format("Initializing {0}.wz...", mapwzFile);
Application.DoEvents();
Program.WzManager.ExtractBackgroundSets();
Program.WzManager.ExtractObjSets();
}
}
if (Initialization.isClient64()) | ||
{ | ||
WzImage mobImage = (WzImage)Program.WzManager[mobWzFile.ToLower()]?[id + ".img"]; | ||
if (mobImage == null) | ||
continue; | ||
|
||
if (!mobImage.Parsed) | ||
foreach (string mobWzFile in WzFileManager.MOB_WZ_FILES_64) | ||
{ | ||
mobImage.ParseImage(); | ||
WzImage mobImage = (WzImage)Program.WzManager[mobWzFile.ToLower()]?[id + ".img"]; | ||
if (mobImage == null) | ||
continue; | ||
|
||
if (!mobImage.Parsed) | ||
{ | ||
mobImage.ParseImage(); | ||
} | ||
if (mobImage.HCTag == null) | ||
{ | ||
mobImage.HCTag = MobInfo.Load(mobImage); | ||
} | ||
MobInfo result = (MobInfo)mobImage.HCTag; | ||
result.ParseImageIfNeeded(); | ||
return result; | ||
} | ||
if (mobImage.HCTag == null) | ||
return null; | ||
} else | ||
{ | ||
foreach (string mobWzFile in WzFileManager.MOB_WZ_FILES) | ||
{ | ||
mobImage.HCTag = MobInfo.Load(mobImage); | ||
WzImage mobImage = (WzImage)Program.WzManager[mobWzFile.ToLower()]?[id + ".img"]; | ||
if (mobImage == null) | ||
continue; | ||
|
||
if (!mobImage.Parsed) | ||
{ | ||
mobImage.ParseImage(); | ||
} | ||
if (mobImage.HCTag == null) | ||
{ | ||
mobImage.HCTag = MobInfo.Load(mobImage); | ||
} | ||
MobInfo result = (MobInfo)mobImage.HCTag; | ||
result.ParseImageIfNeeded(); | ||
return result; | ||
} | ||
MobInfo result = (MobInfo)mobImage.HCTag; | ||
result.ParseImageIfNeeded(); | ||
return result; | ||
return null; |
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.
var mobWzFiles = Initialization.isClient64() ? WzFileManager.MOB_WZ_FILES_64 : WzFileManager.MOB_WZ_FILES;
foreach (string mobWzFile in mobWzFiles)
{
WzImage mobImage = (WzImage)Program.WzManager[mobWzFile.ToLower()]?[id + ".img"];
if (mobImage == null)
continue;
if (!mobImage.Parsed)
{
mobImage.ParseImage();
}
if (mobImage.HCTag == null)
{
mobImage.HCTag = MobInfo.Load(mobImage);
}
MobInfo result = (MobInfo)mobImage.HCTag;
result.ParseImageIfNeeded();
return result;
}
return null;
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.
Pushed! thanks.
b37108a
is there a way to add this to harepacker aswell? |
Harepacker already works
…On Sat., Nov. 19, 2022, 12:09 p.m. Alon-Sachs, ***@***.***> wrote:
is there a way to add this to harepacker aswell?
—
Reply to this email directly, view it on GitHub
<#171 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMJFFTYLT4FTURZUZK5KHNTWJECUJANCNFSM5Q4IKWBQ>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
how can i use this program? and it works? |
Merged! I'll do a little clean up later, once again really thanks a lot for the contribution. |
You are very welcome! I'm happy i was able to help!
…On Sun., Nov. 27, 2022, 7:15 p.m. LastBattle, ***@***.***> wrote:
Merged! I'll do a little clean up later, once again thanks for the
contribution!
—
Reply to this email directly, view it on GitHub
<#171 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMJFFTYK2YXDZR6OKLQ3V4DWKP2SHANCNFSM5Q4IKWBQ>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
Made it a little better 🫡 It'll allow for better support for future versions of .wz files, as the location of the images, and directories are actually not static from versions to versions. |
Amazing work, i wanted to do this too but i felt lazy haha good job!
Le ven. 2 déc. 2022 à 03:02, LastBattle ***@***.***> a écrit :
… I've made it better, feel free to take a look!
It'll allow for better support for future versions of .wz files, as the
location of the images, and directories are not static.
cee77e2
<cee77e2>
—
Reply to this email directly, view it on GitHub
<#171 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMJFFT2K4FAJTHQICYCFIPDWLGUKRANCNFSM5Q4IKWBQ>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
Exactly!! It was just so tedious and time consuming. |
Ahhh i see yeah well it's understandable hahahaha
Le ven. 2 déc. 2022 à 21:58, LastBattle ***@***.***> a écrit :
… Exactly!! It was just so tedious.
That was the reason why I avoided doing it months after 64-client was
released.
It kept being pushed back and at the same time I was busy on other
personal stuff. I guess this pull request kind of forced me to 😀
—
Reply to this email directly, view it on GitHub
<#171 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMJFFT2NKZSN4I3BV7DXJRTWLKZORANCNFSM5Q4IKWBQ>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
I made an option to switch between 32 bit client and 64 bit client compatible, maybe its not optimal way and could just make the thing detect if it contains a Data folder, but anyways here is my take feel free to make it better, there is couple of issues like map simulator and some tile display issue not working, but i think the rest should be fine, it might need to get looked into it more since obviously not that perfect, like Map9_001.wz still needs to be loaded as i didn`t find a way to do this couple of things missing, but wanted to contribute to the community much love <3