[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUDs
. -> [Folder]  General
. . -> [Subject]  porting OasisOLC II to Smaug 1.4 - anyone have snippet instructions handy?

porting OasisOLC II to Smaug 1.4 - anyone have snippet instructions handy?

You need to log onto the forum to reply or create new threads.

  [Refresh] Refresh page


Posted by Gdub   (32 posts)  [Biography] bio
Date Mon 22 Apr 2024 09:04 PM (UTC)
Message
I've downloaded the Smaug 2.0 codebase, ported over the relevant files to our 1.4 code base. I have it compiling but only because I commented out some of the bits that aren't lining up. I don't quite understand (yet) the pieces that I've had to comment out and figured this might be a good place to ask questions?

specifically
- container_flags is a new array? previously was done with #defines?
- I had to comment out lines like this as its balking on the #define xTOGGLE_BIT(var, bit) ((var).bits[(bit) >> RSV] ^= 1 << ((bit) & XBM)) macro. Something about .bits not being a union

 ch_printf_color( d->character, "\n\rRoom flags: c%s&w\n\rEnter room flags, 0 to quit : ", ext_flag_string( &room->room_flags, r_flags ) );


I've searched all the sites and haven't come across the original installation instructions yet. any input would be greatly appreciated!
[Go to top] top

Posted by Nick Gammon   Australia  (23,000 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Tue 23 Apr 2024 05:21 AM (UTC)
Message
I don't have any snippets, but as for the define, can you copy and paste the exact error message?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Gdub   (32 posts)  [Biography] bio
Date Reply #2 on Tue 23 Apr 2024 10:17 PM (UTC)
Message
Thank you Nick.

here's one of the errors during compiling.


In file included from oredit.c:49:
oredit.c: In function 'redit_parse':
mud.h:3108:39: error: request for member 'bits' in something not a structure or union
 3108 | #define xTOGGLE_BIT(var, bit)   ((var).bits[(bit) >> RSV] ^= 1 << ((bit) & XBM))

this is the macro its calling:

#define xTOGGLE_BIT(var, bit)	((var).bits[(bit) >> RSV] ^= 1 << ((bit) & XBM))

I'm also a bit worried about adding this array to bypass a compile error as the 1.4 version uses defines for these flags

char* const   container_flags[] =
{
	"closeable", "pickproof", "closed", "locked", "eatkey", "r1", "r2", "r3",
	"r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
	"r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", "r24", "r25", "r26",
	"r27"
};
...
#define EX_DIG			  BV08
#define EX_EATKEY		  BV09
#define EX_NOPASSDOOR	          BV10
#define EX_HIDDEN		  BV11
#define EX_PASSAGE		  BV12
#define EX_PORTAL 		  BV13
...
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


240 views.

You need to log onto the forum to reply or create new threads.

  [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]