Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, DotBot, Sogou, Yandex

Members: 0
Guests: 6
Stats
Files
Topics
Posts
Members
Newest Member
481
3,734
19,366
618
Micheal64X
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » converting to smaugfuss 1.6
Forum Rules | Mark all | Recent Posts

converting to smaugfuss 1.6
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Sep 12, 2005, 9:01 pm   Last edited Mar 10, 2008, 6:55 pm by Samson
Go to the top of the page
Go to the bottom of the page

chey

GroupMembers
Posts2
JoinedSep 12, 2005

first post here and hopefully this is posted to the correct forum

For the past year, I've been putting a mud together using "smaug 1.5". According to "smaug15-fixes.txt" this code dates back to roughly
August 2003. For reasons that I can't quite pin down, it's become somewhat unstable and given that there have been so many fixes between then and now for Smaugfuss 1.6 and that it's actively supported, we've decided to start converting to it.

I understand that one of the major changes is a full redesign of the reset code. Basically my question has to do with converting code snippets based on the old reset system to the fuss 1.6 one. For example the old function delete_reset required area to be passed to it whereas the new delete_reset doesnt. I'm fairly new to C coding but picking it up as fast as I can. The first piece I tried to convert was a housing snip but I ran into snags - Is there any info on how to convert snippet old reset code ?

Also, I figured looking at the "reset system" patch might help me understand. I thought it was in the d/l area of smaugmuds.org but I cant seem to find it anymore.

Thanks in advance!

chey
       
Post is unread #2 Sep 13, 2005, 5:49 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

The new reset system is entirely room based, with only some hooks to areas for lists of rooms they contain.

We would need to know what kind of things the particular snippet needs to do with resets to know how they need to be modified. Have you got a link to one you want looked at?

The reset system patch is in the codebase downloads section, although I suppose that probably isn't the best place for it.
       
Post is unread #3 Sep 13, 2005, 12:25 pm
Go to the top of the page
Go to the bottom of the page

chey

GroupMembers
Posts2
JoinedSep 12, 2005

Here are three files that together make up the housing snippet house.c house.h and how-to text file
After some minor edits, it was working well in Smaug 1.5.

Trying to get it to work in fuss 1.6, I've followed the how-to instructions except needed to change all of the sh_int to short (these were giving errors).

Here's a copy of the error log. Most of the errors have to do with to many or to few arguments to a few functions. Hopefully if I can fix one of those, especially the reset ones, the others will go easy. BTW, this is being compiled on linux. Any pointers are much appreciated!

make -s smaug
SMAUG is now compiling... o/act_comm.o
SMAUG is now compiling... o/act_info.o
SMAUG is now compiling... o/act_move.o
SMAUG is now compiling... o/act_obj.o
SMAUG is now compiling... o/act_wiz.o
SMAUG is now compiling... o/ban.o
SMAUG is now compiling... o/boards.o
SMAUG is now compiling... o/build.o
SMAUG is now compiling... o/clans.o
SMAUG is now compiling... o/color.o
SMAUG is now compiling... o/comm.o
SMAUG is now compiling... o/comments.o
SMAUG is now compiling... o/const.o
SMAUG is now compiling... o/db.o
SMAUG is now compiling... o/deity.o
SMAUG is now compiling... o/fight.o
SMAUG is now compiling... o/grub.o
SMAUG is now compiling... o/handler.o
SMAUG is now compiling... o/hashstr.o
SMAUG is now compiling... o/house.o
house.c: In function `do_accessories':
house.c:850: error: structure has no member named `class'
house.c:850: error: structure has no member named `class'
house.c:851: error: structure has no member named `class'
house.c:924: warning: passing arg 1 of `add_reset' from incompatible pointer type
house.c: In function `remove_house':
house.c:1670: error: structure has no member named `first_reset'
house.c:1676: warning: passing arg 1 of `delete_reset' from incompatible pointer type
house.c:1676: error: too many arguments to function `delete_reset'
house.c:1762: error: structure has no member named `first_reset'
house.c:1767: warning: passing arg 1 of `delete_reset' from incompatible pointer type
house.c:1767: error: too many arguments to function `delete_reset'
house.c: In function `add_room':
house.c:1803: error: too few arguments to function `make_room'
house.c: In function `fwrite_house':
house.c:1934: error: too few arguments to function `fwrite_obj'
house.c: In function `load_homedata':
house.c:1955: error: `fpReserve' undeclared (first use in this function)
house.c:1955: error: (Each undeclared identifier is reported only once
house.c:1955: error: for each function it appears in.)
house.c:1981: error: `NULL_FILE' undeclared (first use in this function)
house.c: In function `load_player':
house.c:2988: error: too few arguments to function `load_char_obj'
make[1]: *** [o/house.o] Error 1
make: *** [all] Error 2
       
Post is unread #4 Sep 13, 2005, 4:16 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

As for load_char_obj, hotboot was put in, so you'll need to fix those to work with hotboot. (It requires adding one more bool)

With the class.. I assume class was renamed to Class to allow an easier conversion to C++.
       
Post is unread #5 Sep 13, 2005, 5:34 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

class was changed to Class - allows for compiling in g++ if wanted.
make_room needs an additional argument - see the declaration for it in mud.h
fpReserve no longer exists, neither does NULL_FILE, you can safely remove any statements dealing with either.
load_char_obj and fwrite_obj both require an extra argument to indicate if called for a hotboot.

As for the reset parts... I'll need more time to examine how the snippet needs to use them.
       
Post is unread #6 Sep 14, 2005, 7:08 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

This is untested because I don't want to install the code, but give this a shot:

house.c:

add_reset( location->area, 'M', 1, mobindex->vnum, mobindex->count, location->vnum );


Becomes:

add_reset( location, 'M', 1, mobindex->vnum, mobindex->count, location->vnum );


	 for ( mreset = location->area->first_reset; mreset; mreset = mreset_next )
	 {
		 mreset_next = mreset->next;

		 if ( is_room_reset( mreset, location, location->area ) )
			 delete_reset( location->area, mreset );

	 }


Becomes:
	 for ( mreset = location->first_reset; mreset; mreset = mreset_next )
	 {
		 mreset_next = mreset->next;

		 delete_reset( mreset );

	 }


			for ( mreset = addloc->area->first_reset; mreset; mreset = mreset_next )
			{

				mreset_next = mreset->next;

				if ( is_room_reset( mreset, addloc, addloc->area ) )
					delete_reset( addloc->area, mreset );

			}


Becomes:
			for ( mreset = addloc->first_reset; mreset; mreset = mreset_next )
			{

				mreset_next = mreset->next;

				delete_reset( addloc->area, mreset );

			}


house.h:

/*Function declarations from reset.c used for house mobs resets and removal of resets in general.*/

/* void delete_reset( RESET_DATA * pReset );         Chey13Sep05           SmaugFUSS 1.6 uses this one  */
void delete_reset   ( AREA_DATA *pArea, RESET_DATA *pReset ); 
bool is_room_reset  ( RESET_DATA *pReset, ROOM_INDEX_DATA *aRoom, AREA_DATA *pArea );


Becomes:
/*Function declarations from reset.c used for house mobs resets and removal of resets in general.*/

void delete_reset( RESET_DATA * pReset );
       
Pages:<< prev 1 next >>