Spam Prevention - PLEASE READ !! (23 Apr 2021)
Due to a problem with spammers the rules for posting in the forums have changed for new users.
Newly registered users won't have their posts published until a moderator approves them.
Mission Loading Screen
- DarkSynopsis
- Topic Author
- Moderator
Less
More
3 years 11 months ago #1585
by DarkSynopsis
Replied by DarkSynopsis on topic Mission Loading Screen
Just a 1920x1080 image.
Please Log in or Create an account to join the conversation.
- Copy-Cat
- Elite Member
Less
More
- Posts: 189
- Thank you received: 1
3 years 11 months ago #1586
by Copy-Cat
Replied by Copy-Cat on topic Mission Loading Screen
I found the function that handles the Map Loading images. Been hitting it hard for about 2 hours a day past 3 days..
Also been studying the de-compiled source code to see how it all works.
Also been studying the de-compiled source code to see how it all works.
Please Log in or Create an account to join the conversation.
- Copy-Cat
- Elite Member
Less
More
- Posts: 189
- Thank you received: 1
3 years 11 months ago - 3 years 11 months ago #1587
by Copy-Cat
Replied by Copy-Cat on topic Mission Loading Screen
I'm heading off to bed, be up about 7am to work on it some more.
Here are my findings if ya wanna follow along or give a shot.
The Function starts at: 0056b1f0 - 83 EC 4C - sub esp,4C { 76 }
Here is the de-compiled code. Some variables have been refactored with known and tested variable names.
I was hoping we could find a simple edit and not have to do a rewrite of the op code.
Was gonna share my .CT but can't; only images can be uploaded.
Here are my findings if ya wanna follow along or give a shot.
The Function starts at: 0056b1f0 - 83 EC 4C - sub esp,4C { 76 }
Here is the de-compiled code. Some variables have been refactored with known and tested variable names.
Warning: Spoiler!
Code:
void __thiscall FUN_0056b1f0(int this,uint Image_Size,int *param_2,RECT *param_3)
{
undefined4 uVar1;
int *piVar2;
BOOL BVar3;
uint Image_xRight;
uint Image_yBottom;
int yTop;
int xLeft;
uint local_screen_y;
uint local_screen_x;
tagRECT local_40;
RECT local_30;
tagRECT local_20;
RECT local_10;
Image_yBottom = Image_Size;
Image_xRight = Image_Size;
if ((undefined *)register0x00000010 != (undefined *)0xfffffffc) {
Image_yBottom = (uint)*(ushort *)(Image_Size + 0x12);
Image_xRight = (uint)*(ushort *)(Image_Size + 0x10);
}
if ((undefined *)register0x00000010 != &DAT_00000048) {
local_screen_x = (uint)*(ushort *)(this + 0x10);
}
if ((undefined *)register0x00000010 != &DAT_0000004c) {
local_screen_y = (uint)*(ushort *)(this + 0x12);
}
SetRect((LPRECT)&local_40,0,0,Image_xRight,Image_yBottom);
if ((param_3 == (RECT *)0x0) ||
(BVar3 = IntersectRect((LPRECT)&local_40,(RECT *)&local_40,param_3), BVar3 != 0)) {
if (param_2 == (int *)0x0) {
xLeft = local_40.left;
yTop = local_40.top;
if (param_3 == (RECT *)0x0) {
xLeft = 0;
yTop = 0;
}
}
else {
xLeft = *param_2;
yTop = param_2[1];
}
SetRect((LPRECT)&local_30,xLeft,yTop,(local_40.right - local_40.left) + xLeft,
(local_40.bottom - local_40.top) + yTop);
SetRect((LPRECT)&local_10,0,0,local_screen_x,local_screen_y);
BVar3 = IntersectRect((LPRECT)&local_20,&local_30,&local_10);
if (BVar3 != 0) {
local_40.left = local_40.left + (local_20.left - local_30.left);
local_40.top = local_40.top + (local_20.top - local_30.top);
local_40.bottom = local_40.bottom + (local_20.bottom - local_30.bottom);
local_40.right = local_40.right + (local_20.right - local_30.right);
Image_xRight = 0x1000000;
if ((*(byte *)(Image_Size + 0x16) & 1) != 0) {
Image_xRight = 0x1008000;
}
uVar1 = *(undefined4 *)(Image_Size + 4);
xLeft = 0;
piVar2 = *(int **)(this + 4);
do {
Image_yBottom =
(**(code **)(*piVar2 + 0x14))
(piVar2,&local_20,uVar1,&local_40,Image_xRight | 0x1000200,0);
if (Image_yBottom < 0x887601af) {
if (Image_yBottom != 0x887601ae) {
if (Image_yBottom == 0) {
return;
}
if (Image_yBottom != 0x887600a0) {
return;
}
}
}
else {
if (Image_yBottom != 0x8876021c) {
return;
}
}
Sleep(1);
xLeft = xLeft + 1;
} while (xLeft < 100000);
}
}
return;
}
I was hoping we could find a simple edit and not have to do a rewrite of the op code.
Was gonna share my .CT but can't; only images can be uploaded.
Please Log in or Create an account to join the conversation.
- Copy-Cat
- Elite Member
Less
More
- Posts: 189
- Thank you received: 1
3 years 11 months ago - 3 years 11 months ago #1588
by Copy-Cat
Replied by Copy-Cat on topic Mission Loading Screen
The variable local_40.right and local_40.left I thought was the image size since I have a mod on that overwrites it with the original 800x600 texture(not that it was changed to begin with). After changing the image size by modifying the image in paint, the values are not updating in code. This tells me that, local_40 is not the image size. The question is: is there is a variable that has not been updated in the exe for the screen resolution?
SJ did we get all the screen resolution hacks in? Were there any that we didn't know what they are for and that were not included?
UPDATE: Sorry, i was looking at the height not the width...
Local_40.right = image size
Local_40.left = 0;
Code:
SetRect((LPRECT)&local_30,xLeft,yTop,(local_40.right - local_40.left) + xLeft,
(local_40.bottom - local_40.top) + yTop);
SJ did we get all the screen resolution hacks in? Were there any that we didn't know what they are for and that were not included?
UPDATE: Sorry, i was looking at the height not the width...
Local_40.right = image size
Local_40.left = 0;
Please Log in or Create an account to join the conversation.
- Slippery Jim
- Administrator
Less
More
- Posts: 747
- Thank you received: 9
3 years 11 months ago - 3 years 11 months ago #1590
by Slippery Jim
Replied by Slippery Jim on topic Mission Loading Screen
Yes there were some potential 800x600 references not modified because I never figured out what they did. They could have just been "false positives" in terms of them being a resolution reference and were just normal code.
As I mentioned already, the "bible" thread does contain the hex edit locations for the load maps. Long ago I figured it out, experimented a little, and then abandoned changing it because of all the many community maps.
Edit: It was a while ago but I seem to recall that the images always stayed at the top left if you hacked say 1920x1080 and the image was only 800x600. If you could figure out a way to center the images then it would be more appealing.
Edit2: The other problem is how do you tell the game to load different sized images depending on which is the chosen 2D resolution? You can't force all load screens to be 1920x1080 when some people might want to play a lower resolution.
As I mentioned already, the "bible" thread does contain the hex edit locations for the load maps. Long ago I figured it out, experimented a little, and then abandoned changing it because of all the many community maps.
Edit: It was a while ago but I seem to recall that the images always stayed at the top left if you hacked say 1920x1080 and the image was only 800x600. If you could figure out a way to center the images then it would be more appealing.
Edit2: The other problem is how do you tell the game to load different sized images depending on which is the chosen 2D resolution? You can't force all load screens to be 1920x1080 when some people might want to play a lower resolution.
Please Log in or Create an account to join the conversation.
- Copy-Cat
- Elite Member
Less
More
- Posts: 189
- Thank you received: 1
3 years 11 months ago #1591
by Copy-Cat
Replied by Copy-Cat on topic Mission Loading Screen
I can move the image but the calculations make the image smaller the more right you go. In addition to that there is only a byte to work with, meaning you cant go more than 127 over wthout being in the negatives.
Here is the spot to move it over so you can try it for yourself.. and see the image get smaller.
its the zero's, try them for yourself
Here is the spot to move it over so you can try it for yourself.. and see the image get smaller.
Code:
16B2D0 - 52 6A 00 8D 44 24 58 6A 00
its the zero's, try them for yourself
Please Log in or Create an account to join the conversation.
Moderators: DarkSynopsis
Time to create page: 0.353 seconds