Demon
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > Hacking DOOM.EXE to add one more animation and switch
 
Author
All times are GMT. The time now is 04:03. Post New Thread    Post A Reply
printz
CRAZY DUMB ZEALOT


Posts: 8779
Registered: 06-06


If you search through DOOM.EXE with a hexadecimal editor, you'll find the switch and animation lists in the same format as Boom's SWITCHES and ANIMATED. Each of them has an empty padding at the end, the same length as a switch or animation entry. If I remember correctly, I managed to add one more switch in hacked vanilla Doom by replacing the empty padding with a new entry. Were there any side effects, other than Doom exiting with an error if the WAD lacked the specified entry in TEXTUREx?

__________________
Automatic Wolfenstein - Version 1.0 - also on Android

Old Post 01-08-14 05:44 #
printz is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
myk
volveré y seré millones


Posts: 15174
Registered: 04-02


How about you edit an example and we all test it?

Old Post 01-08-14 10:47 #
myk is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Graf Zahl
Why don't I have a custom title by now?!


Posts: 7694
Registered: 01-03


The empty entry at the end of the table is a termination marker. Whether it works to put meaningful data there depends on the following memory containing proper data to be interpreted as a termination marker as well.

For switches it may work because the value to be tested is 0.

For animations, though, the value is -1, so it will try to create animations from random data. Most likely this will fail and since the animations code is a lot more robust than the switch code you may get away with it.

Obviously it's a completely nonportable hack that would limit any mod using it to the vanilla EXE and therefore kill 99.9% of the potential user base.

Old Post 01-08-14 11:07 #
Graf Zahl is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Foxpup
Junior Member


Posts: 239
Registered: 09-05


There's really no reason to hack the EXE to get extra animations and switches in vanilla. For wall textures and switches, you can just make an existing texture wider and put your custom patches in this extra space, and use the X offsets on your sidedefs to make the appropriate portion of the texture appear (though you may need to split long lines, as the texture obviously won't tile correctly). Final Doom used this trick.

Animated flats can't be added this way, but all versions of Doom define SWATER1-SWATER4, but none actually use it, so you can use this if you want a custom animated flat. Remember, for flats to work in PWADs, there must be an F_END marker after your flats and there must not be an F_START marker (some WAD utilities add an FF_START marker for clarity, but this is not needed).

Last edited by Foxpup on 01-08-14 at 11:57

Old Post 01-08-14 11:42 #
Foxpup is online now Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Gez
Why don't I have a custom title by now?!


Posts: 10991
Registered: 07-07


There's no reason to add other animations in vanilla at all. Not when we have a thousand source ports out there. You want to map for vanilla? Then work with the limits instead of trying to hack your way past them. Isn't that the point of mapping for vanilla? That you have strict limits that bound what you can do and let you concentrate on the essential instead of getting bogged down in superfluous details?

It really isn't better in any way to use a hacky "vanilla-compatible (if you use a hex editor and follow these steps)" system than a port with features designed to do what you want in a clean, convenient, and transparent way.

Old Post 01-08-14 13:15 #
Gez is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Memfis
Forum Legend


Posts: 5408
Registered: 04-07


gez very not romantic person

Old Post 01-08-14 13:35 #
Memfis is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
myk
volveré y seré millones


Posts: 15174
Registered: 04-02



Graf Zahl said:
Obviously it's a completely nonportable hack that would limit any mod using it to the vanilla EXE and therefore kill 99.9% of the potential user base.
Not necessarily, since an author would include a SWITCHES lump in the WAD for Boom and up.


Foxpup said:
There's really no reason to hack the EXE to get extra animations and switches in vanilla. For wall textures and switches, you can just make an existing texture wider and put your custom patches in this extra space, and use the X offsets on your sidedefs to make the appropriate portion of the texture appear (though you may need to split long lines, as the texture obviously won't tile correctly).
Yeah, but that's more annoying than an extra switch where you don't have to mess much with texture alignment.

Old Post 01-08-14 18:19 #
myk is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
darkreaver
Senior Member


Posts: 1870
Registered: 05-08



myk said:


Yeah, but that's more annoying than an extra switch where you don't have to mess much with texture alignment.



does not make sense

Old Post 01-08-14 19:25 #
darkreaver is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 04:03. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > Hacking DOOM.EXE to add one more animation and switch

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.