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

HaCreator - 64 Bit Client #171

Merged
merged 5 commits into from
Nov 28, 2022
Merged

HaCreator - 64 Bit Client #171

merged 5 commits into from
Nov 28, 2022

Conversation

SoulGirlJP
Copy link
Contributor

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

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
@SoulGirlJP SoulGirlJP changed the title HaCreator - 64 for Bit client HaCreator - 64 Bit client Mar 16, 2022
@SoulGirlJP SoulGirlJP changed the title HaCreator - 64 Bit client HaCreator - 64 Bit Client Mar 16, 2022
@lastbattle
Copy link
Owner

lastbattle commented Mar 19, 2022

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.
It is overriding some of my prior changes.

Thanks a lot!

@SoulGirlJP
Copy link
Contributor Author

Ohhh yeh sure

This reverts commit f55a794, reversing
changes made to c2bb9a6.
dunno wouldn't work without manually adding it for some reasons
@SoulGirlJP
Copy link
Contributor Author

Yeh i dunno why i am having such a hard time with Github

@lastbattle
Copy link
Owner

lastbattle commented Mar 23, 2022

It might be easier by just pulling the latest branch, and manually making the changes once again 🤔
I'll merge them once you are done, and integrate them later.

@SoulGirlJP
Copy link
Contributor Author

Hmm yeh ill just do it next week

Pulled Last changes and redid everything
@SoulGirlJP SoulGirlJP closed this Nov 8, 2022
@SoulGirlJP SoulGirlJP reopened this Nov 8, 2022
@SoulGirlJP
Copy link
Contributor Author

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

@lastbattle
Copy link
Owner

I will take a look this weekend! Thanks a lot for your help, I appreciate it!!

Copy link

@shailist shailist left a 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

Comment on lines 221 to +240
// 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());
}

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());
}

Comment on lines -168 to +320
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();
}
}
}

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();
    }
}

Comment on lines +61 to +102
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;

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;

Copy link
Owner

Choose a reason for hiding this comment

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

Pushed! thanks.
b37108a

@Alon-Sachs
Copy link

is there a way to add this to harepacker aswell?

@SoulGirlJP
Copy link
Contributor Author

SoulGirlJP commented Nov 19, 2022 via email

@Lingko621
Copy link

how can i use this program? and it works?
if it works send me file please ToT

@lastbattle lastbattle merged commit b67973b into lastbattle:master Nov 28, 2022
@lastbattle
Copy link
Owner

lastbattle commented Nov 28, 2022

Merged! I'll do a little clean up later, once again really thanks a lot for the contribution.

@SoulGirlJP
Copy link
Contributor Author

SoulGirlJP commented Nov 28, 2022 via email

@lastbattle
Copy link
Owner

lastbattle commented Dec 2, 2022

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.

cee77e2

GMS v237
image

@SoulGirlJP
Copy link
Contributor Author

SoulGirlJP commented Dec 2, 2022 via email

@lastbattle
Copy link
Owner

lastbattle commented Dec 3, 2022

Exactly!! It was just so tedious and time consuming.
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 😀

@SoulGirlJP
Copy link
Contributor Author

SoulGirlJP commented Dec 7, 2022 via email

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.

5 participants