Gamestudio Links
Zorro Links
Newest Posts
Help!
by VoroneTZ. 10/14/25 05:04
Zorro 2.70
by jcl. 10/13/25 09:01
ZorroGPT
by TipmyPip. 10/12/25 13:58
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 10/11/25 18:45
Reality Check results on my strategy
by dBc. 10/11/25 06:15
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (VoroneTZ, TipmyPip), 9,297 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Jota, krishna, DrissB, James168, Ed_Love
19169 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 3 1 2 3
Re: Location of _sphere.mdl, _cube.mdl and _shadow.dds [Re: oliver2s] #435990
01/16/14 17:54
01/16/14 17:54
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
Well I thought its loading a "real" WRS from the directory into a buffer located @ this offset, but the file is hardcoded there <_<
Here are 2 functions for a byte signature:
Code:
bool CMisc::bDataCompare(const BYTE *pData, const BYTE *bMask, const char *szMask)
{
    for(; *szMask; ++szMask, ++pData, ++bMask)
	{
        if(*szMask == 'x' && *pData != *bMask) 
		{
            return false;
		}
	}

    return (*szMask) == NULL;
}

DWORD CMisc::FindPattern(DWORD dwAddress, DWORD dwLen, BYTE *bMask, char *szMask)
{
    for(DWORD i=0; i < dwLen; i++)
	{
		if(bDataCompare((BYTE*)(dwAddress + i), bMask, szMask) )
		{
			return (DWORD)(dwAddress + i);
		}
	}

    return 0;
}



Use:
Code:
FindPattern(0xEntryPoint, 0xSizeOfScan, (BYTE*)"\xFF\xFF\xFF\x00\x00\xFF\x00, "xxx??x?");



x = known byte
? = unknown byte (could change after an update etc.)

Last edited by Ch40zzC0d3r; 01/16/14 17:56.
Re: Location of _sphere.mdl, _cube.mdl and _shadow.dds [Re: Ch40zzC0d3r] #435991
01/16/14 18:01
01/16/14 18:01
Joined: Aug 2002
Posts: 3,258
Mainz
oliver2s Offline OP
Expert
oliver2s  Offline OP
Expert

Joined: Aug 2002
Posts: 3,258
Mainz
Thank you both for your effort. But this really seems to be too much code to get a small cube. I was hoping for a better solution (2-3 lines of code).

Re: Location of _sphere.mdl, _cube.mdl and _shadow.dds [Re: oliver2s] #435992
01/16/14 18:04
01/16/14 18:04
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Ask for the symbol that contains the address to the WRS section to be exported. And then hope for an update that contains it within our lifetime laugh

In the meantime, this is probably the best you can do other than dumping the WRS itself from the dll and then putting it in its own file (which isn't future compatible either.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: Location of _sphere.mdl, _cube.mdl and _shadow.dds [Re: WretchedSid] #435994
01/16/14 18:06
01/16/14 18:06
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
..or create a sphere mdl in MED tongue

Re: Location of _sphere.mdl, _cube.mdl and _shadow.dds [Re: FBL] #435995
01/16/14 18:10
01/16/14 18:10
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
I thought the premise was that that was equally ugly and to be avoided? Also, where would be the fun in that?


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: Location of _sphere.mdl, _cube.mdl and _shadow.dds [Re: WretchedSid] #435996
01/16/14 18:22
01/16/14 18:22
Joined: Jul 2000
Posts: 28,028
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,028
Frankfurt
If someone wants to get the models in a somewhat easier way, here are they:

http://server.conitec.net/down/cube.zip

Re: Location of _sphere.mdl, _cube.mdl and _shadow.dds [Re: jcl] #435998
01/16/14 18:26
01/16/14 18:26
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
Haha thank you tongue

Page 3 of 3 1 2 3

Moderated by  old_bill, Tobias 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1