GTAMP.com

Grand Theft Auto Multiplayer
It is currently Mon Aug 19, 2019 6:17 pm

All times are UTC




Post new topic Reply to topic  [ 57 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re: SCR decompiler
PostPosted: Tue Aug 09, 2011 8:34 pm 
Offline
User avatar

Joined: Fri Apr 24, 2009 9:43 pm
Posts: 525
Location: Estonia - Finland
Im not sure, because i remember that i upgraded to Delphi 4 or 5 because of some features.
But this one is done in Borland Delphi 3.0.

It even could be wrong because maybe i upgraded from Delphi 2 to Delphi 3.
Dunno... I just don't remember. Almost 3 years ago. Amazing how time flies.


Maybe i upgraded but never actually released that.

Do you want something new? Or bugfix?
I will find the sourcecode and could recompile it and maybe do something with it if you want.

Just tell me.

I actually worked on scr decompiler "behind the scenes" but there is still nothing to show atm.
I understand alot more than previously about SCR file content and the "header" but still it requires a bit more dedication and time. To actually release some better tool.

It's slowly progressing.

_________________
Always wear safety glasses while programming.


Top
 Profile  
 
 Post subject: Re: SCR decompiler
PostPosted: Tue Aug 09, 2011 9:38 pm 
Offline
Boss
User avatar

Joined: Tue Mar 04, 2008 6:51 am
Posts: 1357
Location: GTAMP.com
I just asked because someone wanted a way to change GTA2 skins.


Top
 Profile  
 
 Post subject: Re: SCR decompiler
PostPosted: Wed Oct 05, 2011 10:08 am 
Offline
User avatar

Joined: Fri Apr 24, 2009 9:43 pm
Posts: 525
Location: Estonia - Finland
Im working on this project again and i wanted you to show some slow progress on it.
It's very small thing but still, im in the right path.

I understand the SCR header and what it stores but i have to make some good data types to organize the stuff i dig out from SCR to parse and do all the MATH more easily.


Here is just one very small example of some "bits" from simple SCR:

Image

The 3,4,5, etc mean the "VARIABLE indexes" but 600, 100, 1212 are the delay values for DELAY_HERE as you can see.

The parser is not very much hard coded for specific SCR any more because i pretty much figured out the calculation for finding right values and stuff.
But as i said, i need to make some good structs and organize it better.

It's very very alpha atm.
But it is interesting challenge and im working on it.

_________________
Always wear safety glasses while programming.


Top
 Profile  
 
 Post subject: Re: SCR decompiler
PostPosted: Wed Oct 05, 2011 12:43 pm 
Offline
User avatar

Joined: Sat Dec 26, 2009 11:53 pm
Posts: 1111
wow, it looks awesome already!

_________________
yur sa'nok ngeyä


Top
 Profile  
 
 Post subject: Re: SCR decompiler
PostPosted: Wed Oct 05, 2011 8:16 pm 
Offline
User avatar

Joined: Fri Apr 24, 2009 9:43 pm
Posts: 525
Location: Estonia - Finland
Well thanks. But as i said, it's very basic atm.
If i figure out the data structs to handle the parsed and calculated data with much better and easier way then i can basically decompile simple small scripts without problem.
I start with small first.

What i mean with data structs is that, i must find a good way to store the GTA2 script commands in decompiler (should i use arrays, C++ std::map's or std::vector's) or anything else, how to store the data read from .scr to make calculating and parsing data and commands more flexible. Etc...


But im such guy who first hacks something working together quickly to see some results (which gives alot of motivation) and then makes it better.
Maybe it's because i was cr@cker.

_________________
Always wear safety glasses while programming.


Top
 Profile  
 
 Post subject: Re: SCR decompiler
PostPosted: Wed Oct 05, 2011 10:04 pm 
Offline
User avatar

Joined: Sat Dec 26, 2009 11:53 pm
Posts: 1111
i wonder how gta2 does it. most commands have relatively few arguments but there is one crane powerup command that has ~15. if gta2 uses static structs it would waste quite a lot of ram?

_________________
yur sa'nok ngeyä


Top
 Profile  
 
 Post subject: Re: SCR decompiler
PostPosted: Thu Oct 06, 2011 2:05 pm 
Offline
User avatar

Joined: Fri Jan 29, 2010 3:00 pm
Posts: 957
Location: F21B3EED
I think its nearly impossible to decompile... although you can always try. I just see it as hard as decompiling exe into C++ again. The SCR bytecode probably works same way: "IF" and "ENDIF" are just goto commands, and its quite hard to figure out which are function calls and which are just if commands and etc...

What im interested is to read the player positions from the SCR code, i dont think more can be read, except maybe the declarations of cars. All in all, it will be harder job than my editor which parses the mis file and lets to edit the objects there.

Have you noticed the compiler generates a .txt file by the way? it seems to be uncompressed version of the SCR:
Code:
20    CHAR_DEC      EXEC 21   p5_punched
21    PLAYER_PED      EXEC 22   (3670016,3538944,458752)   315   15   
22    COUNTER         EXEC 23   1   p6_expunch
23    COUNTER         EXEC 24   0   p6_trg_punched
24    CHAR_DEC      EXEC 25   p6_punched
25    GENERATOR DECSET    26   elec_1   (3735552,3735552,458752)   0 203 400 400
26    GENERATOR DECSET    27   fingers_1   (3735552,3473408,458752)   0 236 400 400
27    GENERATOR DECSET    28   elec_2   (3473408,3473408,458752)   0 203 400 400
28    GENERATOR DECSET    29   fingers_2   (3473408,3735552,458752)   0 236 400 400
29    SET GANG INFO       30   high 7241728 7176192 131072
30    MAP_ZONE_SET       31   info_l   500 100 100 100 600 50 50 50 800 50
31    COUNTER         EXEC 32   1   control
32    COUNTER         EXEC 33   0   psum
33    COUNTER         EXEC 34   0   dsum
34    COUNTER         EXEC 35   0   osum
35    COUNTER         EXEC 36   0   tsum
36    DEC ONSCREEN CNT    37   
37    COUNTER         EXEC 38   1   loop
38    LEVEL_START          39   
39    SWITCH GEN ONOFF    40   elec_1   -1
40    SWITCH GEN ONOFF    41   fingers_1   -1
41    SWITCH GEN ONOFF    42   elec_2   -1
42    SWITCH GEN ONOFF    43   fingers_2   -1
43    WORD ==INT      EXEC 347   loop   1   
44    SET COUNTER INT   EXEC 45   psum   0
45    SET COUNTER INT   EXEC 46   dsum   0
46    SET COUNTER INT   EXEC 47   tsum   0
47    CHECK HEALTH   EXEC 97   p1   0
48    CHAR INVINCIBLE   EXEC 49   p1   1
49    GIVE WEAPON      EXEC 50   p1 2   99   
50    GIVE WEAPON      EXEC 51   p1 4   99   
51    PUNCHED SOMEONE?EXEC 53   p1   
52    WORD ==INT      EXEC 55   p1_trg_punched   0   
53    IF_JUMP         EXEC 52   59   FALSE
54    WORD ==INT      EXEC 59   p1_expunch   1   
55    IF_JUMP         EXEC 54   59   FALSE


I checked and the integer values (after decoded) match 99.99% to the MIS script coordinate float values, and those integers are stored as-is in the SCR file in binary format.

_________________
My GTA2 related projects:


Top
 Profile  
 
 Post subject: Re: SCR decompiler
PostPosted: Thu Oct 06, 2011 6:01 pm 
Offline
User avatar

Joined: Sat Dec 26, 2009 11:53 pm
Posts: 1111
loops are difficult but i think they are possible. the result won't be exactly like the original but that's not a problem.
And even if loops are not decompileable you can still make a "//jump to line 45" out of it which would yet help a lot.

_________________
yur sa'nok ngeyä


Top
 Profile  
 
 Post subject: Re: SCR decompiler
PostPosted: Thu Oct 06, 2011 8:09 pm 
Offline
User avatar

Joined: Fri Apr 24, 2009 9:43 pm
Posts: 525
Location: Estonia - Finland
Nothing is impossible. Just takes a time and a dedication.

_________________
Always wear safety glasses while programming.


Top
 Profile  
 
 Post subject: Re: SCR decompiler
PostPosted: Sun Oct 09, 2011 8:31 pm 
Offline
User avatar

Joined: Fri Apr 24, 2009 9:43 pm
Posts: 525
Location: Estonia - Finland
I worked whole day on this thing and this is what i got.

This is the SNEAK.MIS script from "PyroGTA2Collection_sorted"

Code:
// GTA2 SNEAKING MISSION //

// this is just a test to see how well a 'Metal Gear Solid' sneaking mission could work out.

// player
PLAYER_PED p1 = ( 132.5 , 127.5 , 2.0 ) 25 0

// characters

   // tank destroyers
CHAR_DATA rpg01
CHAR_DATA rpg02
CHAR_DATA rpg03
CHAR_DATA rpg04


// vehicles (pointless in this mission as you get caught!)

PARKED_CAR_DATA tank01 = ( 163.5 , 128.5 , 2.0 ) -1 0 TANK
PARKED_CAR_DATA jeep01 = ( 159.5 , 128.5 , 2.0 ) -1 20 GUNJEEP
PARKED_CAR_DATA jeep02 = ( 166.5 , 129.5 , 2.0 ) -1 250 GUNJEEP
PARKED_CAR_DATA jeep03 = ( 175.3 , 116.5 , 2.0 ) -1 180 GUNJEEP


// sounds


// lights


// weapons (one-off)

OBJ_DATA armour01 = ( 132.5 , 127.5 , 2.0 ) 0 COLLECT_31
OBJ_DATA armour02 = ( 187.5 , 118.5 , 2.0 ) 0 COLLECT_31
OBJ_DATA silencedmg01 = ( 132.5 , 125.5 , 2.0 ) 0 COLLECT_09
OBJ_DATA silencedmg02 = ( 153.5 , 124.5 , 2.0 ) 0 COLLECT_09
OBJ_DATA silencedmg03 = ( 181.5 , 122.5 , 2.0 ) 0 COLLECT_09

// counters

COUNTER neverends = 1
COUNTER intank = 0

LEVELSTART

WHILE_EXEC ( neverends = 1 )

/*IF ( ( IS_CHARACTER_IN_CAR ( p1 , tank01 ) )
AND ( intank = 0 ) )
rpg01 = CREATE_CHAR ( 158.5 , 122.5 , 2.0 ) 4 0 ARMY END
rpg02 = CREATE_CHAR ( 159.5 , 122.5 , 2.0 ) 4 0 ARMY END
rpg03 = CREATE_CHAR ( 170.5 , 122.5 , 2.0 ) 4 0 ARMY END
rpg04 = CREATE_CHAR ( 171.5 , 122.5 , 2.0 ) 4 0 ARMY END
SET intank = 1
ENDIF */

DO_NOWT

ENDWHILE

LEVELEND



This is the decompiled script. Currently just commands, no values.
Just to show where i am atm.


Image

Yes, level_end is missing. I have some weird kind of loop bug in my code.
The loop hangs for some reason and it stops decompiling.
But the result for one day of work is pretty awesome for me. Im very happy.

I have the command values also, but i didn't bother to parse and display it.
Also i have looked how SCR stores WHILE_EXEC etc loops but first i must fix the bug with loop.


So currently everything is calculated, nothing is hardcoded anymore.
Basically i can supply him any .scr and it will take it apart.

Forget the Lines in mainscript. The calculation is messed up atm.


See ya soon.
Im gonna work on that bug now.

_________________
Always wear safety glasses while programming.


Top
 Profile  
 
 Post subject: Re: SCR decompiler
PostPosted: Sun Oct 09, 2011 9:53 pm 
Offline
Boss
User avatar

Joined: Tue Mar 04, 2008 6:51 am
Posts: 1357
Location: GTAMP.com
Nice.


Top
 Profile  
 
 Post subject: Re: SCR decompiler
PostPosted: Sun Oct 09, 2011 10:13 pm 
Offline
User avatar

Joined: Sat Dec 26, 2009 11:53 pm
Posts: 1111
yeah, great process.

_________________
yur sa'nok ngeyä


Top
 Profile  
 
 Post subject: Re: SCR decompiler
PostPosted: Mon Oct 10, 2011 1:04 am 
Offline
User avatar

Joined: Wed Mar 17, 2010 4:07 am
Posts: 414
Location: Wales, UK
Very nice stuff! :shock:

_________________


Top
 Profile  
 
 Post subject: Re: SCR decompiler
PostPosted: Sat Oct 15, 2011 2:21 pm 
Offline
User avatar

Joined: Fri Apr 24, 2009 9:43 pm
Posts: 525
Location: Estonia - Finland
Thank you guys.

Decompiler is rewritten now from scratch. This fixed alot of problems and code "uglyness".
Some problems still present, but it's just a matter of time.

More nice stuff:

GTA2\data\Industrial-6P.scr

Image

Code:
PLAYER_PED player1 = ( 129.5, 121.0, 2.0 ) 0 90
PLAYER_PED player2 = ( 41.5, 192.0, 2.0 ) 8 0
PLAYER_PED player3 = ( 166.0, 220.5, 2.0 ) 9 270
PLAYER_PED player4 = ( 199.0, 45.5, 2.0 ) 10 180
PLAYER_PED player5 = ( 44.5, 102.0, 2.0 ) 7 0
PLAYER_PED player6 = ( 242.5, 168.0, 2.0 ) 5 180
ARROW_DATA
ARROW_DATA
ARROW_DATA
ARROW_DATA
ARROW_DATA
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
GENERATOR
CRANE_DATA
CAR_DATA
CAR_DATA
CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
CAR_DATA
CAR_DATA
CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
PARKED_CAR_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
OBJ_DATA
LEVEL_START
SET_AMBIENT_LEVEL
SET_SHADING_LEVEL
PUT_CAR_ON_TRAILER
PUT_CAR_ON_TRAILER
PUT_CAR_ON_TRAILER
GIVE_WEAPON
GIVE_WEAPON
GIVE_WEAPON
GIVE_WEAPON
GIVE_WEAPON
GIVE_WEAPON
GIVE_WEAPON
GIVE_WEAPON
GIVE_WEAPON
GIVE_WEAPON
GIVE_WEAPON
GIVE_WEAPON
GIVE_WEAPON
GIVE_WEAPON
GIVE_WEAPON
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
SWITCH_GENERATOR
LEVEL_END


Player_ped's with coordinates. Number of players in SCR is not "guessed" anymore, by filename or anything such. But just correctly calculated from .scr info.

There are still some slight problems with bigger scripts, like bil.scr but it's probably a bug in calculation / reading of different stuff.

And not all commands are included, it's very boring work to do continuously.
I just add them once by one, in different times, until all are there.

PLAYER_PED player# is also calculated and variable name is automatically created.
Same will be done for other commands.

_________________
Always wear safety glasses while programming.


Top
 Profile  
 
 Post subject: Re: SCR decompiler
PostPosted: Sat Oct 15, 2011 3:23 pm 
Offline
User avatar

Joined: Sat Dec 26, 2009 11:53 pm
Posts: 1111
it looks really good!

if you need some scripts to test specific criteria, you can ask me. i know most maps and which are doing something special in their scripts. you can also browse for scripts on your own if you need something quickly:
http://gta2dare.omnitude.net/maplist/li ... mode=exist just search for .mis

_________________
yur sa'nok ngeyä


Top
 Profile  
 
 Post subject: Re: SCR decompiler
PostPosted: Sat Oct 15, 2011 4:27 pm 
Offline
User avatar

Joined: Fri Jan 29, 2010 3:00 pm
Posts: 957
Location: F21B3EED
B-$hep, check my PM.

_________________
My GTA2 related projects:


Top
 Profile  
 
 Post subject: Re: SCR decompiler
PostPosted: Sat Oct 15, 2011 5:58 pm 
Offline
User avatar

Joined: Fri Apr 24, 2009 9:43 pm
Posts: 525
Location: Estonia - Finland
@T.M done.

If somebody has time and wants to be included in aboutbox, then please clean up this mess:
http://pastebin.com/VYZgbr5i

And make a list of only OBJECTS in "".
Get rid of everything, except dd # and strings in " ".
For ex:
BOXES
4

I need it to be in same order. Nr's are also important, there are some numbers skipped, i dunno, if there are missing objects in GTA2.
I got this list from miss2 and if it's not gonna be in same order then probably decompiler will show wrong object types.

So:

.data:004D5958 off_4D5958 dd offset aBin_lid ; "BIN_LID"
.data:004D595C dd 1
.data:004D5960 dd offset aBollard ; "BOLLARD"
.data:004D5964 dd 2

1
BIN_LID
2
BOLLARD


etc. Skipped numbers should be marked or just left out. Then i will run through list and if there is a skipped number then i will just ignore the object in decompiler.


I could code a little tool with regex to extract the data, but i think im too lazy for that.


Thanks, even if nobody will do that.


EDIT

Did it by myself anyway. Hacked simple parser together quickly.


Im currently just trying to complete the GENERATOR command, only objects are left.
So i can display them as: COLLECT_00 etc in decompiled script.
But this list will be used by other commands also i believe.

edit: Topic split viewtopic.php?f=4&t=447

_________________
Always wear safety glasses while programming.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 57 posts ]  Go to page Previous  1, 2, 3

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group