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
SDE, BWAPI owner, hacker.
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.
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.
SDE, BWAPI owner, hacker.
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.
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.
SDE, BWAPI owner, hacker.
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.
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.
SDE, BWAPI owner, hacker.
You'll have the following outside of the function:
#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,
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.
I added the 2 code blocks into
initialize.cpp.
This is what it looks like:
IMAGE 1IMAGE 2I 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.
[...] Assuming you're using VS2019. [...]
I do. I use
GPTP 2019
You can remove BW::BWDATA:: since things are declared in the file.
SDE, BWAPI owner, hacker.
Yes I forgot to remove that, I edited my post.
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
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
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
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
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.
Then
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
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 IMAGEI hope this can be solved here because I don't think I will have the time to further dive into C and C++.
SDE, BWAPI owner, hacker.
What is your definition of `commonSwishControllers` etc? Share the entire file.
Urg, I'm glad I rejected advanced c++ mess.
This is not advanced. This is very basic C++, from a decade ago.