Mission Loading Screen

More
4 months 2 weeks ago - 4 months 2 weeks ago #1598 by Copy-Cat
Replied by Copy-Cat on topic Mission Loading Screen
DarkSynopsis? You figure out anything on this?

I'm not looking foward to rewriting the op code, but here is what I was thinking.

There are 2 push instructions that push the image-x and image-y values on to the stack before the Call to SetRect. These 2 values will stretch the image if increased.
swat.exe+16B2BC - 53  - push ebx   // y-value (600)
swat.exe+16B2BD - 57  - push edi   // x-value (800)

these combined is 2 bytes enough to call a jump short. There is empty space below the function that could be used as the offset.

We should insert a unconditional jmp short and check values with our known image resolution of 800 x 600 and if they equal modify the values and return
if ebx == 600 and edi == 800, set the values to our screen resolution and return.
Otherwise push ebx and edi and return
This way only 2 locations for each additional screen resolution could be updated in the future.

Hopefully there are no other calls to this function with images with the size of 800 x 600 and it should work.

Please Log in or Create an account to join the conversation.

More
4 months 2 weeks ago - 4 months 2 weeks ago #1599 by Copy-Cat
Replied by Copy-Cat on topic Mission Loading Screen
I've worked on this long enough... Here is the fix!

:::: This willl stretch the image to any predetermined resolution :::::

This is the jump to new method.
16B2BC		Change 	- 53 57 51 50 8D 44 24 3C
		To	- E9 3F AA 1D 00 90 90 90

Here is an explanation of the above opcode.
Warning: Spoiler!


Here is the new opcode for the method
Offset - 2C2D00
81 FB 58 02 00 00 75 14 81 FF 20 03 00 00 75 0C
81 C3 A8 00 00 00 81 C7 36 02 00 00 53 57 51 50
8D 44 24 3C E9 9B 55 E2 FF
and an explanation:
Warning: Spoiler!


I'm running some extensive tests to see if any crashes occur during game play, or map building activities.

Please post your crashes here, and please provide the following:
1. What you were doing when it crashed?
2. Single or Multiplayer?
3. In-game or in Debrief or menu screens?
4. What Resolution your running your game in LRM?
6. if in-game what is the map name?[/li]

Please Log in or Create an account to join the conversation.

More
4 months 2 weeks ago - 4 months 2 weeks ago #1600 by Slippery Jim
Replied by Slippery Jim on topic Mission Loading Screen
It is amazing how far you have come in reverse engineering! Awesome job!

So if we are to set the new standard for the Last Resort mod at 1920x1080 for map load screens with map makers and then hack the code it will shrink the image to whatever resolution we want?

For instance if the map maker has the load image at 1920x1080 but the player chooses 1366x768 as their 2D setting we can hack the proper game executable to display the load image in 1366x768? Also will it be able to display the original community made 800x600 map load screens that haven't been upgraded in 1366x768 at the same time?

Please Log in or Create an account to join the conversation.

More
4 months 2 weeks ago - 4 months 2 weeks ago #1601 by Copy-Cat
Replied by Copy-Cat on topic Mission Loading Screen
That is a good point. So far I have managed to get 800 x 600 images to load full screen. What I should have been trying to do is, just set the values to what ever we want, and not add anything to the size of the image.

hack the code it will shrink the image to whatever resolution we want?

I haven't tested shrinking the image just stretching the default 800 x 600. The 800 x 600 in my previous post are variables passed in from the image.

I will run a test in a minute and throw a 1920 x 1080 image at it just to see if it will resize it to 1366 x 768.
The only problem I see is trying to use the mov instruction to modify the registers. The add and sub instructions modify the registers indirectly. With the current method of implementing the change, we cannot use any of the registers for variables and we must preserve (keep up with) the stack.

The new code can be what ever we want, since we are not trying to squeeze it in-between other functions. It is located in a code cave towards the end of the exe.

Please Log in or Create an account to join the conversation.

More
4 months 2 weeks ago - 4 months 2 weeks ago #1602 by Slippery Jim
Replied by Slippery Jim on topic Mission Loading Screen
It is really cool that you have figured out how to do things like this.

It may be that it can't be as flexible as we hope. It may just have to be that the 800x600 is still the standard but we have the option of including replacement high-res load screens. This feature won't be available to map makers unless they submit new graphics to be included in future updates of the mod.

This will be a large undertaking to get quality images that will be suitable replacement load screens.

- What you come up with has to be flexible enough to allow us to still use 800x600 load screens (specifically for community made maps).

- The Sierra load maps can be enlarged and included in each of the Last Resort .RES files and then used in conjunction with hacked game executables.

For example:
01.res (800x600 textures) that indirectly uses swat_800x600.exe
02.res (1366x768 textures) that indirectly uses swat_1366x768.exe
03.res (1920x1080 textures) that indirectly uses swat_1920x1080.exe

Please Log in or Create an account to join the conversation.

More
4 months 2 weeks ago - 4 months 2 weeks ago #1603 by Copy-Cat
Replied by Copy-Cat on topic Mission Loading Screen
Thanks, all for the cause.

Gonna run some test now to see if it shrinks the image... Any ideas on how to handle the image resolutions?
we coud just continue checking and jumping. Remember it checks for the y-value first and exits if no match, so we technically could do it again for the LR standard..

Update: I just noticed, the Loading Text is still in the same spot..

UPDATE #2: It shrinks it..... Kewl, started with a 1920 x 1080 and shrunk it to 800 x 600. It also appears to be working with the mov instruction which is less bytes. That opens up some head room on the handling of Map_Loading Images.

Please Log in or Create an account to join the conversation.

More
4 months 2 weeks ago - 4 months 2 weeks ago #1604 by Copy-Cat
Replied by Copy-Cat on topic Mission Loading Screen
Here is what I was thinking....

swat_800x600 -
No checks for 800 x 600 just allow them thru
LR Map loading screens 1920 x 1080 set them to 800 x 600

swat_1366x768.exe
Check for 800 x 600 and set them to 1366 x 768
Check for LR Map Loading Screens and set them to 1366 x 768

swat_1920x1080.exe
Only check for 800 x 600 abd set them to 1920 x 1080

Does that sound right?

Please Log in or Create an account to join the conversation.

Time to create page: 0.133 seconds
Powered by Kunena Forum