Staredit Network > Forums > Modding Assistance > Topic: Remove slide-in animation of menu windows
Remove slide-in animation of menu windows
Oct 3 2023, 10:41 am
By: Netbek  

Oct 3 2023, 10:41 am Netbek Post #1



Hello.
In the main menu clicking Singleplayer and then Broodwar or Original will bring you to a submenu. This submenu will not let you click buttons instantly. You have to wait a short moment until the menu's windows have finished sliding in from the sides.
I want the windows to instantly be in their end position, no sliding-in at all.
IMAGE




Oct 8 2023, 8:50 am Heinermann Post #2

memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes

These were hardcoded as structures in the exe for 1.16.1, I don't know if it's changed for remastered. BWAPI overwrites these for 1.16.1 here offsets here.

For remastered maybe someone else knows more.




Oct 9 2023, 8:51 am Netbek Post #3



Quote from Heinermann
BWAPI

I never used BWAPI. I only use GPTP.
Can I somehow carry over that code into GPTP?
And how? Can you talk me through this like I'm an idiot? I only partially understand .cpp, never properly learned it, only used it in the context of GPTP.




Oct 10 2023, 7:30 am Heinermann Post #4

memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes

Yeah you can copy over the code to GPTP. You'll have to copy the offsets shown in the link from offsets.h and set the values on game start (as early as possible) as shown in the link in CodePatch.cpp.




Oct 10 2023, 2:58 pm Netbek Post #5



Ok, I downloaded BWAPI and found the 2 code snippets.
But I honestly have no idea where to put them in GPTP (I use GPTP-for-VS2019).
Or do I have to create new .cpp and .h files? I never did that. Only modified what was there. Have no idea how to set which one fires when.

Post has been edited 1 time(s), last time on Oct 10 2023, 3:12 pm by Netbek.




Oct 13 2023, 8:07 am Heinermann Post #6

memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes

I don't know GPTP so maybe someone who knows it will know where to put it. It only needs to run once on startup somewhere.




Oct 13 2023, 3:26 pm UndeadStar Post #7



The best place to put those would probably be initialize.cpp, it should be the right timing since it's also where the hack to make sc1 campaign playable is.

edit:
Note: as a remain of the former GPTP for VS2008, GPTP for VS2019 still avoid C++ objects in favor of C types, and don't use the for_each (that only use the keyword for and was introduced in VS2011), but that should not be a problem for an individual mod, since the compatibility is based on VS 2019.




Oct 17 2023, 7:49 pm Heinermann Post #8

memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes

You'll have the following outside of the function:
Code
#include <array>

struct swishTimer
{
 u16 wIndex;
 u16 wType;
};

std::array<swishTimer, 43> &commonSwishControllers = *((std::array<swishTimer, 43>*)0x005129EC);
std::array<swishTimer, 5> &gluCustmSwishController = *((std::array<swishTimer, 5>*)0x0051A9F0);
std::array<swishTimer, 2> &gluCmpgnSwishController = *((std::array<swishTimer, 2>*)0x00512B10);
std::array<swishTimer, 1> &gluScoreSwishController = *((std::array<swishTimer, 1>*)0x0051A844);
std::array<swishTimer, 5> &gluChatSwishController = *((std::array<swishTimer, 5>*)0x0051A490);


And in that function,

Code
   for (auto &it : commonSwishControllers) it.wType = 4;
   for (auto &it : gluCustmSwishController) it.wType = 4;
   for (auto &it : gluCmpgnSwishController) it.wType = 4;
   for (auto &it : gluScoreSwishController) it.wType = 4;
   for (auto &it : gluChatSwishController) it.wType = 4;


Assuming you're using VS2019. We can modify it if it doesn't work.

Post has been edited 1 time(s), last time on Oct 19 2023, 6:59 am by Heinermann.




Oct 18 2023, 3:04 pm Netbek Post #9



I added the 2 code blocks into initialize.cpp.
This is what it looks like:
IMAGE 1
IMAGE 2
I hope I put them in the correct places?

BUT, as you can see there is still a problem. Apparently it's about the "BW::". I must admit that I don't know what to do.


Quote from Heinermann
[...] Assuming you're using VS2019. [...]
I do. I use GPTP 2019




Oct 18 2023, 4:48 pm UndeadStar Post #10



You can remove BW::BWDATA:: since things are declared in the file.




Oct 19 2023, 7:00 am Heinermann Post #11

memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes

Yes I forgot to remove that, I edited my post.




Oct 23 2023, 10:21 am Netbek Post #12



Quote from UndeadStar
You can remove BW::BWDATA:: since things are declared in the file.
I tried this but apparently there still is a problem.
It says: "this range-based 'for' statement requires a suitable "begin" function and none was found"
IMAGE




Oct 23 2023, 12:09 pm UndeadStar Post #13



Urg, I'm glad I rejected advanced c++ mess.
I don't really understand what we're working with here, but I would try changing like this.
Maybe
Code
std::array<swishTimer, 43>* commonSwishControllers = (std::array<swishTimer, 43>*)0x005129EC;
std::array<swishTimer, 5>* gluCustmSwishController = (std::array<swishTimer, 5>*)0x0051A9F0;
std::array<swishTimer, 2>* gluCmpgnSwishController = (std::array<swishTimer, 2>*)0x00512B10;
std::array<swishTimer, 1>* gluScoreSwishController = (std::array<swishTimer, 1>*0x0051A844;
std::array<swishTimer, 5>* gluChatSwishController = (std::array<swishTimer, 5>*0x0051A490;

Then
Code
for (auto &it : *commonSwishControllers) it.wType = 4;
for (auto &it : *gluCustmSwishController) it.wType = 4;
for (auto &it : *gluCmpgnSwishController) it.wType = 4;
for (auto &it : *gluScoreSwishController) it.wType = 4;
for (auto &it : *gluChatSwishController) it.wType = 4;

Or maybe
Code
for (auto it : *commonSwishControllers) it.wType = 4;
for (auto it : *gluCustmSwishController) it.wType = 4;
for (auto it : *gluCmpgnSwishController) it.wType = 4;
for (auto it : *gluScoreSwishController) it.wType = 4;
for (auto it : *gluChatSwishController) it.wType = 4;

I would recommend waiting for the next answer of Heinermann though.




Nov 1 2023, 2:36 pm Netbek Post #14



Quote from UndeadStar
Then
Code
for (auto &it : *commonSwishControllers) it.wType = 4;
for (auto &it : *gluCustmSwishController) it.wType = 4;
for (auto &it : *gluCmpgnSwishController) it.wType = 4;
for (auto &it : *gluScoreSwishController) it.wType = 4;
for (auto &it : *gluChatSwishController) it.wType = 4;

Or maybe
Code
for (auto it : *commonSwishControllers) it.wType = 4;
for (auto it : *gluCustmSwishController) it.wType = 4;
for (auto it : *gluCmpgnSwishController) it.wType = 4;
for (auto it : *gluScoreSwishController) it.wType = 4;
for (auto it : *gluChatSwishController) it.wType = 4;

I did this and now it says:
"no operator "*" matches these operands. operand types are: * std::array<swishTimer, 43U>"
SEE IMAGE

I hope this can be solved here because I don't think I will have the time to further dive into C and C++.




Nov 6 2023, 10:38 pm Heinermann Post #15

memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes

What is your definition of `commonSwishControllers` etc? Share the entire file.

Quote
Urg, I'm glad I rejected advanced c++ mess.
This is not advanced. This is very basic C++, from a decade ago.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2026-10-11. : 6:02 am]
Donald -- Samase
[2026-10-09. : 2:53 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: I'll check it out this weekend!
Thanks
[2026-10-09. : 2:47 am]
Symmetry -- I'll check it out this weekend!
[2026-10-09. : 2:40 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: Another map maker? Damn we really ARE back
I invite you to try out the map I modified. I don't have the creativity to create maps from scratch, but I do have the know-how to modify existing ones; my project is to tweak community campaigns (specifically those with errors—to make them playable.
[2026-10-09. : 2:27 am]
Symmetry -- Another map maker? Damn we really ARE back
[2026-10-09. : 1:51 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Now that I wanted to change my avatar, the error image is showing up, haha.
[2026-10-09. : 1:34 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Mr.BurnLiquid
Mr.BurnLiquid shouted: Ultraviolet Thanks; I'm new to the site and a Spanish speaker. I must have missed the part where it was prohibited—I'll change it now.
I invite you to try out a mission I'm modifying from *StarCraft Reversed*; I'm trying to make it more playable and challenging.
[2026-10-09. : 1:33 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Thanks; I'm new to the site and a Spanish speaker. I must have missed the part where it was prohibited—I'll change it now.
[2026-10-09. : 1:31 am]
Ultraviolet -- Mr.BurnLiquid
Mr.BurnLiquid shouted: Ultraviolet Is it forbidden to have a large avatar?
actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Please log in to shout.


Members Online: JamaL, O)FaRTy1billion[MM]