Re: [Alephmodular-devel] High Level Modules
Status: Pre-Alpha
Brought to you by:
brefin
From: Br'fin <br...@ma...> - 2003-01-02 19:03:01
|
On Thursday, January 2, 2003, at 01:05 PM, Chris Pickel wrote: > On Thursday, January 2, 2003, at 12:50 AM, Br'fin wrote: >>> "Bio" modules? It's a little more interesting than calling them >>> "Definitions" modules. A "Map Scenario ala E:MR with M2's Bio." >> Bio certainly has a nicer ring to it than Personality :) Not >> convinced 100% but it does ring better. > > Fundamentals? Foundation? Trimmings? > > I should note that I missed a major bastion of them when I was making > the list of essentials - player.cpp. It has definitions for player > shapes, initial items, and damage responses. (One of my dreams has > always been to play as an Enforcer, so player_shapes_definitions is of > particular interest to me) Bio and Personality still fit better. Bio just seems to fit. Heh, not a problem, those definitions "They're everywhere!" why you also left off screen_definitions.h with the internal ids used for display rectangles and font specifications. >>> -------module_compatibility.cpp------- >> Mmm, good idea. Don't know if I'd quite phrase it like that... Or >> more to the point... most modules are compiled together. So something >> that was macro-based to complain during compilation would probably be >> better. > > Then the following is probably what you're looking for. In the header > file for a module, you put: > /------- > #define Module Version > \------- > ...and then in the implementation for another module that needs it you > add: > /------- > #ifndef Module > #error Module not available > #else > #if (Module != Version) // Module > Version instead? > #error Bad version of Module > #endif > #endif > \------- > Replace "Module" and "Version" with whatever you need, and you're set. > > -Sfiera Aww, there isn't a way this could be contained within macros? #include "AModules.h" // With definitions for the various macros. Then within a module have ANNOUNCE_VERSION(GuiModule, 0.6) And within other areas use REQUIRE_VERSION(GuiModule, 0.5) Hmm, drat. That's certainly a shame and a nuisance. Then again is this particular thread getting too paranoid? :) -Jeremy Parsons |