SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SHIII Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 03-20-10, 05:59 PM   #1
karamazovnew
The Old Man
 
Join Date: Mar 2009
Location: Bucharest, Romania
Posts: 1,403
Downloads: 151
Uploads: 0


Default

Quote:
Originally Posted by Seeadler View Post
The trick is to determine when a particular texture ID is transformed via a D3D matrix. If you have that info, then you can do anything with the vertex quad for the texture, scaling, translating, rotating, etc. before it is rendered onto the screen. SH4 does basically the same with the zone parameters from the menu_ini

I did it as a test with the two loading backgrounds

Wow!, how did you do that?!
karamazovnew is offline   Reply With Quote
Old 03-20-10, 06:46 PM   #2
Rubini
Ocean Warrior
 
Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 132
Uploads: 0
Default

Quote:
Originally Posted by karamazovnew View Post
Wow!, how did you do that?!
Yes, Seeadler, how you found the tga ID reference as an ID on the game engine?

We already noticed that some loading screens are "hardcoded", we can´t move them or just rescale them, they always start from botton left. Then I tryed to find the id using S3D search function but nothing were found...

Also the Navmap and attack map (Terrain only) is fixed at 1024x786. We find a easy way to extend them to correct WS resolution/aspect but after the 1024 the terrain is mirrored. Probably is the same issue here that you explained above.
__________________
One gamer's must-have mod is another gamer's waste of time.
-Sailor Steve

Last edited by Rubini; 03-20-10 at 07:07 PM.
Rubini is offline   Reply With Quote
Old 03-20-10, 09:20 PM   #3
Seeadler
Pacific Aces Dev Team
 
Join Date: Mar 2001
Location: Northern Germany
Posts: 1,096
Downloads: 169
Uploads: 0


Default

Quote:
Originally Posted by Rubini View Post
Yes, Seeadler, how you found the tga ID reference as an ID on the game engine?
I implement some loggers in my dll, one of these logger logs the creating of quads for 2D textures at startup.

it looks like:
Code:
myMatrix._11 = 2.000000 myMatrix._12 = 0.000000 myMatrix._13 = 0.000000 myMatrix._14 = 0.000000
myMatrix._21 = 0.000000 myMatrix._22 = 3.200000 myMatrix._23 = 0.000000 myMatrix._24 = 0.000000
myMatrix._31 = 0.000000 myMatrix._32 = 0.000000 myMatrix._33 = 1.002506 myMatrix._34 = 1.000000
myMatrix._41 = 0.000000 myMatrix._42 = 0.000000 myMatrix._43 = -0.050125 myMatrix._44 = 0.000000
 
Logging Vector: 840.00 525.00 -0.05 -> Stride = 0
 
myMatrix._11 = 1.250000 myMatrix._12 = 0.000000 myMatrix._13 = 0.000000 myMatrix._14 = 0.000000
myMatrix._21 = 0.000000 myMatrix._22 = 2.000000 myMatrix._23 = 0.000000 myMatrix._24 = 0.000000
myMatrix._31 = 0.000000 myMatrix._32 = 0.000000 myMatrix._33 = 1.000080 myMatrix._34 = 1.000000
myMatrix._41 = 0.000000 myMatrix._42 = 0.000000 myMatrix._43 = -0.080006 myMatrix._44 = 0.000000
 
Logging Vector: 840.00 525.00 1.63 -> Stride = 60
In a DX9 game, 2D textures like loading screens, backgrounds etc. are also 3D objects.

A simple vertex quad is created

and on this quad the texture is mapped.
Before this mapping the quad is scaled and moved in screen space, this gives the advantage to set size and position of a texture without resizing the texture itself.

My log now tells me that the loading texture has Stride_nr = 0 and the main menu Stride_nr = 60.

The rest is some "dirty" cooding stuff (also used by cheat developers to make wall hacks, aim-bots etc.)

in short:
- detect when a particular stride is prepared to display
- manipulate the matrix
Seeadler is offline   Reply With Quote
Old 03-20-10, 09:34 PM   #4
Rubini
Ocean Warrior
 
Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 132
Uploads: 0
Default

Quote:
Originally Posted by Seeadler View Post
...
My log now tells me that the loading texture has Stride_nr = 0 and the main menu Stride_nr = 60.

The rest is some "dirty" cooding stuff (also used by cheat developers to make wall hacks, aim-bots etc.)

in short:
- detect when a particular stride is prepared to display
- manipulate the matrix
WOW!
That is enough! This is all up to you!

Well, really, all the screens that have this condition plus the nav and Attack map (probably the same issue) we can not make so much than add something to the right side for now. They are totally playable and we yet have that new space anyway.
__________________
One gamer's must-have mod is another gamer's waste of time.
-Sailor Steve
Rubini is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 06:35 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.