Cleaned up the Message System

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Cleaned up the Message System

Post by Sophia »

The message system, as originally conceived, was actually something of a different design than what actually got implemented. To be honest, I'm not quite sure what I was trying to do-- I like the way it turned out, though. Anyway, I saw no use in keeping that strange gap between M_TOGGLE which uses msg id 2 and M_DESTROY at 255, and then putting a lot of extra messages above 255. There's also no reason, other than convention, to use such low numbers.

I've changed the base code around so that the base code uses message id's above 100000. That way designers can create whatever crazy message id they could think of (provided it's in the range 0-99999 anyway) and it won't clash with any present or future system messages.

Don't worry too much about compatibility, this change won't even be noticed. Unless you, for some reason, use hard-coded message numbers rather than the symbolic M_ constants!
(You also won't have to change anything if you were trying to work around the old system-- ids 3-254 and 261 and up are still well within the designer's space)
Post Reply