|
|
Search
|
|||||||
| Home | Register | Downloads | FAQ | Members List | Calendar | Arcade | Mark Forums Read |
» Less advertising throughout
» Post and participate in discussions
» Network with other forum members
» Free private messaging
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Emu author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: May 2008
Location: Netherlands
Posts: 123
|
Another simplification in Dxbx!
In a previous post, I told you about the ease with which we can detect game-functions. Now, I've been working on a way to ease the registration of patches. Before, we had to do this: - implement a patch (for now, translating it from Cxbx' code) - declare it's signature in the interface-section of the unit involved - assure this unit is known (via the 'uses'-clause) to a central unit - the function-name had to be added to a case-statment (in an include-file) - the same symbol had to be re-declared as a string (so we can also know it by name) Apart from step one and two, this required lots of manual house-keeping (and it was error-prone too). To remedy all this, I've changed to using the 'exports' directive. Using this, we can now suffice with one step besides the declaration & implementation: - add the function to an 'exports' section in the unit involved. Using the excellent Jcl library (and more specifically, the JclPeImage.pas unit), we can now iterate over the exported functions - resulting in precisely the two things we need : the location of our patch and it's name. As an example, I've exported all 38 patches that we've (mostly) translated up until now, and I must say : this feels like the way it's supposed to be done! Bottom line : Again we've made it a few more steps easier to add patches to Dxbx! I'd like to sign-off with a call-out to anyone considering to join our project : Developing for Dxbx is easier than ever, it's fun, and there's lots of challenge too be had - so don't hesitate and join us! |
|
|
|
| Advertisement | [Remove Advertisement] | ||
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|