Post by IsmAvatar on Nov 4, 2005 19:44:48 GMT -5
This is the first real product of the binary documentation. Anlizt is 1) not really a product, just a dev tool, and 2) not done yet.
A screenshot of AnswerMaker, a GUI for this program.
userweb.nni.com/cmagicj/room_sync.png
Room Synchronizer. Ever have like 20 rooms that you either a) just created or b) gave all different settings, and you want them all to have some of the settings be all the same, eg set them all to have a width of 768? I bet it gets really annoying to do it by hand after the 7th room!
Room Synchronizer is a program that will do this tedious process for you. It's a 2 step process, and it would be 3 steps if I didn't have a nice dll for you.
After downloading and unzipping, the first thing you do is open up AnswerMaker.gm6 (not compiled to keep it small), and press F1 and read how to work it (if you're too lazy to read all that, you can just read the Quick Reference near the bottom). Then start using it and tell it which elements to fix to what and which to leave alone etc. and save it to an .ans file.
The next step should be done in dos so you can see if it has anything to say, but if you're dos illiterate or too lazy, that's fine. Run room_sync.exe. It will ask you for the Answer file, so just tell it where it is and hit enter. If all goes well, it should say 'Success. Press any key' and will finish after you press a key (if you ran it from dos, it will return you to the prompt, if not, it will just close). If there's any problems, it will just crash. If you ran it from dos it will show the error message, but it's probably greek to you. The problem is either that you provided a bad (or no) answer file, or the answer file is incorrect, or the GM file is incorrect or missing or something. You probably just need to fix the answer file. Oh yeah, and you might need to check to make sure it didn't corrupt your GM6 file. If it does, just delete it and rename the .gb1 that it made before running.
Once it runs successfully, you're done. Go ahead and check out your GM6 file to see that all the rooms should be the same for whatever aspects you set. And for all the elements that you 'left alone' or 'disabled', you'll see that they should be unchanged. Happy programming.
The source code and .ans file documentation are available for those who are interested in development. AnswerMaker was made in GM6.1, whereas byte_finder (which you'll see several times later) and room_sync were made in Pascal.
Room Sync (zip) 44 KB
userweb.nni.com/cmagicj/RoomSync.zip
Includes AnswerMaker.gm6, byte_finder.dll, and room_sync.exe. AnswerMaker and byte_finder must be in the same directory. room_sync can go float off by itself if you want.
Dev Source Codes (zip) 4 KB
userweb.nni.com/cmagicj/DevRoomSync.zip
Includes AnsFormat.txt, room_sync.pas, and byte_finder.pas. Pascal files are just simple text files.
Resource Byte Position DLL
If you're wondering what the dll is, it kinda comes attached to this program. I don't know if you'd have much use for it other than for use with the programs that I make, but hey, who knows. It pretty much will tell you the byte location (in the gm6 file) of the resource count of a type (and then each resource of that type immediately follows). This program uses it to get the Rooms position, but later programs might use it for other purposes. Here's the info about it:
Function: _find
Type: stdcall
Returns: real (the position, or tries to return -1 on fail)
Arguments: 2
Argument0: string (the filename)
Argument1: real (the resource to find)
For argument1, it will accept numbers 1 through 9. These correspond with the resources as follows:
sounds sprites backgrounds paths scripts fonts timelines objects rooms
So since this gets the room, it will use 9 for argument1.
As I come out with more programs that use this, the dll might be updated with a few more numbers to find other things.
A screenshot of AnswerMaker, a GUI for this program.
userweb.nni.com/cmagicj/room_sync.png
Room Synchronizer. Ever have like 20 rooms that you either a) just created or b) gave all different settings, and you want them all to have some of the settings be all the same, eg set them all to have a width of 768? I bet it gets really annoying to do it by hand after the 7th room!
Room Synchronizer is a program that will do this tedious process for you. It's a 2 step process, and it would be 3 steps if I didn't have a nice dll for you.
After downloading and unzipping, the first thing you do is open up AnswerMaker.gm6 (not compiled to keep it small), and press F1 and read how to work it (if you're too lazy to read all that, you can just read the Quick Reference near the bottom). Then start using it and tell it which elements to fix to what and which to leave alone etc. and save it to an .ans file.
The next step should be done in dos so you can see if it has anything to say, but if you're dos illiterate or too lazy, that's fine. Run room_sync.exe. It will ask you for the Answer file, so just tell it where it is and hit enter. If all goes well, it should say 'Success. Press any key' and will finish after you press a key (if you ran it from dos, it will return you to the prompt, if not, it will just close). If there's any problems, it will just crash. If you ran it from dos it will show the error message, but it's probably greek to you. The problem is either that you provided a bad (or no) answer file, or the answer file is incorrect, or the GM file is incorrect or missing or something. You probably just need to fix the answer file. Oh yeah, and you might need to check to make sure it didn't corrupt your GM6 file. If it does, just delete it and rename the .gb1 that it made before running.
Once it runs successfully, you're done. Go ahead and check out your GM6 file to see that all the rooms should be the same for whatever aspects you set. And for all the elements that you 'left alone' or 'disabled', you'll see that they should be unchanged. Happy programming.
The source code and .ans file documentation are available for those who are interested in development. AnswerMaker was made in GM6.1, whereas byte_finder (which you'll see several times later) and room_sync were made in Pascal.
Room Sync (zip) 44 KB
userweb.nni.com/cmagicj/RoomSync.zip
Includes AnswerMaker.gm6, byte_finder.dll, and room_sync.exe. AnswerMaker and byte_finder must be in the same directory. room_sync can go float off by itself if you want.
Dev Source Codes (zip) 4 KB
userweb.nni.com/cmagicj/DevRoomSync.zip
Includes AnsFormat.txt, room_sync.pas, and byte_finder.pas. Pascal files are just simple text files.
Resource Byte Position DLL
If you're wondering what the dll is, it kinda comes attached to this program. I don't know if you'd have much use for it other than for use with the programs that I make, but hey, who knows. It pretty much will tell you the byte location (in the gm6 file) of the resource count of a type (and then each resource of that type immediately follows). This program uses it to get the Rooms position, but later programs might use it for other purposes. Here's the info about it:
Function: _find
Type: stdcall
Returns: real (the position, or tries to return -1 on fail)
Arguments: 2
Argument0: string (the filename)
Argument1: real (the resource to find)
For argument1, it will accept numbers 1 through 9. These correspond with the resources as follows:
sounds sprites backgrounds paths scripts fonts timelines objects rooms
So since this gets the room, it will use 9 for argument1.
As I come out with more programs that use this, the dll might be updated with a few more numbers to find other things.