Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

[SOLVED]Help recognize data type

Featured Replies

  • Author
  • Localization

h3x3r, posted Tue Jan 17, 2023 9:24 am (75044)


Hi folks. Another speck!
Almost figured it out. But there is always something i simply can't get over it. The thing is i need to find out what data type can possibly be used in this sample. I need get x,y,z coordinates. Luckily there's no rotation at all. Only pos X pos Y pos Z.
To make it clear i captured some info from my research.

As you can see i find coordinates for cluster. Working units: cm
Image

But can't find coordinates for meshes. I seek that address 9264 but can't see anything related to the values shown in maya. BTW i captured that scene with clusters and align meshes to it to get at lest approx position.
Image
Image

Searched on net for RenderWare data types and found this. Anyway this is RenderWare 3.6 at least from what i saw in memory dump. Unfortunately there is limited info about others RW games.
Code:
http://www.tnlc.com/rw/api/rwv21011.htm



EDiT: Sorry guys for misleading... I find some clues. I was wrong with offset. Also i find out possible data type. Maybe byte or ubyte, still not sure but now i know more about values.
Code:
94 7F 03 33 B1 7F B3 31

This data represents values for 2 meshes in cluster. One mesh 4 bytes.
In my theory for all byte or ubyte:x,y,z,brightnes
I also tinker with cluster pos if it take effect and it does.
Image

So these are correct values for those two meshes. But how they are converted to be like as on image in maya???
Image

OK after some test it seems to be more clear. The 127 byte value is a center of mesh pos. So i think that every value below 127 goes right and any value above 127 goes left. Since ubyte has value of 255. Does anyone got it?

Thanks to all involved in this. But i got it with this code:
Code:
struct RWC_POS_ROT_INFO {
    ubyte rwClusterMeshPosX;
    local ubyte rwClusterMeshPosX_tmp0=0;
    local ubyte rwClusterMeshPosX_tmp1=127-rwClusterMeshPosX;
    local ubyte rwClusterMeshPosX_tmp2=rwClusterMeshPosX-127;
    ubyte rwClusterMeshPosY;
    local ubyte rwClusterMeshPosY_tmp0=0;
    local ubyte rwClusterMeshPosY_tmp1=127-rwClusterMeshPosY;
    local ubyte rwClusterMeshPosY_tmp2=rwClusterMeshPosY-127;
    ubyte rwClusterMeshPosZ;
    local ubyte rwClusterMeshPosZ_tmp0=0;
    local ubyte rwClusterMeshPosZ_tmp1=127-rwClusterMeshPosZ;
    local ubyte rwClusterMeshPosZ_tmp2=rwClusterMeshPosZ-127;
    ubyte rwClusterBrightnes;
};

And then print it like this with mod applied which i must figure out:

Code:
local float mod=25.400;
   if (rwClusterIndex[k].rwClusterPosInfo[i].rwClusterMeshPosX == 127)
    Printf("%f ",rwClusterIndex[k].rwClusterPosInfo[i].rwClusterMeshPosX_tmp0);
    if (rwClusterIndex[k].rwClusterPosInfo[i].rwClusterMeshPosX     Printf("-%f ",rwClusterIndex[k].rwClusterPosInfo[i].rwClusterMeshPosX_tmp1/mod);
    if (rwClusterIndex[k].rwClusterPosInfo[i].rwClusterMeshPosX > 127)
    Printf("%f ",rwClusterIndex[k].rwClusterPosInfo[i].rwClusterMeshPosX_tmp2/mod);


    if (rwClusterIndex[k].rwClusterPosInfo[i].rwClusterMeshPosY == 127)
    Printf("%f ",rwClusterIndex[k].rwClusterPosInfo[i].rwClusterMeshPosY_tmp0);
    if (rwClusterIndex[k].rwClusterPosInfo[i].rwClusterMeshPosY     Printf("-%f ",rwClusterIndex[k].rwClusterPosInfo[i].rwClusterMeshPosY_tmp1/mod);
    if (rwClusterIndex[k].rwClusterPosInfo[i].rwClusterMeshPosY > 127)
    Printf("%f ",rwClusterIndex[k].rwClusterPosInfo[i].rwClusterMeshPosY_tmp2/mod);


    if (rwClusterIndex[k].rwClusterPosInfo[i].rwClusterMeshPosZ == 127)
    Printf("%f ",rwClusterIndex[k].rwClusterPosInfo[i].rwClusterMeshPosZ_tmp0);
    if (rwClusterIndex[k].rwClusterPosInfo[i].rwClusterMeshPosZ     Printf("-%f ",rwClusterIndex[k].rwClusterPosInfo[i].rwClusterMeshPosZ_tmp1/mod);
    if (rwClusterIndex[k].rwClusterPosInfo[i].rwClusterMeshPosZ > 127)
    Printf("%f ",rwClusterIndex[k].rwClusterPosInfo[i].rwClusterMeshPosZ_tmp2/mod);

And here's result:
Image
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.