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, Bing

Members: 0
Guests: 13
Stats
Files
Topics
Posts
Members
Newest Member
481
3,739
19,386
619
Alexander
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Smaug Snippets » Color Snippet..
Forum Rules | Mark all | Recent Posts

Color Snippet..
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Apr 24, 2004, 9:35 pm
Go to the top of the page
Go to the bottom of the page

Erria

GroupMembers
Posts10
JoinedApr 24, 2004

In the color snippet for customizable ansi color, you say to add color.o to Makefile, but when I try and compile the whole thing, it returns an error stating there is no file color.o, should this have come with the zip or does it get created on the fly and I'm doing something to prevent it from doing so?
       
Post is unread #2 Apr 25, 2004, 10:29 am
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,874
JoinedJul 26, 2005

color.o is made from color.c

Lets say instead of naming the file color.c you named it colors.c then
change color.o to colors.o
       
Post is unread #3 Apr 25, 2004, 1:53 pm
Go to the top of the page
Go to the bottom of the page

Erria

GroupMembers
Posts10
JoinedApr 24, 2004

Then... why is it when I try to compile the code it returns the error saying that it can't locate color.o?
       
Post is unread #4 Apr 25, 2004, 3:01 pm
Go to the top of the page
Go to the bottom of the page

Erria

GroupMembers
Posts10
JoinedApr 24, 2004

actually... this is my new error message...

make smaug
make[1]: Entering directory `/home/mud/kilenshi/jisseen/dist/src'
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG color.c
color.c: In function `do_color':
color.c:608: structure has no member named `colors'
color.c:665: structure has no member named `colors'
color.c:677: structure has no member named `colors'
color.c: In function `reset_colors':
color.c:695: structure has no member named `colors'
color.c: In function `color_str':
color.c:709: structure has no member named `colors'
color.c: In function `set_char_color':
color.c:991: structure has no member named `colors'
color.c: In function `set_pager_color':
color.c:1005: structure has no member named `colors'
rm -f smaug
gcc -lcrypt -o smaug act_comm.o act_info.o act_move.o act_obj.o act_wiz.o bo
ards.o build.o clans.o comm.o comments.o const.o db.o deity.o fight.o handler.o
hashstr.o ibuild.o ident.o interp.o magic.o makeobjs.o mapout.o misc.o mpxset.o
mud_comm.o mud_prog.o player.o polymorph.o requests.o reset.o save.o shops.o ski
lls.o special.o tables.o track.o update.o grub.o stat_obj.o ban.o services.o pla
nes.o imm_host.o color.o
gcc: color.o: No such file or directory
smaug: No such file or directory
smaug: No such file or directory
chmod g+w smaug
chmod: failed to get attributes of `smaug': No such file or directory
make[1]: *** [smaug] Error 1
make[1]: Leaving directory `/home/mud/kilenshi/jisseen/dist/src'
make: *** [all] Error 2
       
Post is unread #5 Apr 25, 2004, 5:11 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

Can you post the contents of your Makefile? It appears as though you may have missed a step.
       
Post is unread #6 Apr 26, 2004, 12:20 am
Go to the top of the page
Go to the bottom of the page

Erria

GroupMembers
Posts10
JoinedApr 24, 2004

hrmm... actually I ended up solving it... but it brought up the other question of how do I modify what the color thingy is, like instead of & if I wanted { or @ or something...?
and the problem I think was either that I didn't add color.h to the Makefile, which I dunno if I should have but the walkthrough didn't say to, but I changed that and one other thing, and it works now..
       
Post is unread #7 Apr 26, 2004, 4:02 pm
Go to the top of the page
Go to the bottom of the page

Greven
Magician
GroupMembers
Posts204
JoinedMar 5, 2005

Ummm, if you want to change the character, I could just do a search for &, and replece them in the appropriate places, though there might be a few places with hardcoded &'s.
       
Post is unread #8 Apr 26, 2004, 5:20 pm
Go to the top of the page
Go to the bottom of the page

Erria

GroupMembers
Posts10
JoinedApr 24, 2004

the problem with that is there's a lot of weird places where it's used, I guess in errortrapping, and also the large number of '&&'s used in if statements.. do ya maybe know which files actually use it, and which don't?

and I'd also like to remove the '^' coloring, not only for aesthetic purposes but also it sometimes interferes with the changes I'm doing to the color system, like having it automatically color in certain parts of the output..
       
Post is unread #9 Apr 26, 2004, 5:32 pm
Go to the top of the page
Go to the bottom of the page

Greven
Magician
GroupMembers
Posts204
JoinedMar 5, 2005

Sorry, I forgot to specify, it should be in color.c only that you wold need to change the characters for reading in, but everywhere else for actual hard coded color codes. If you want to remove backgrounds entirely, there are a few sections, I don't know exactly, just look for chunks of code that checks for "^".
       
Post is unread #10 Apr 26, 2004, 7:02 pm
Go to the top of the page
Go to the bottom of the page

Erria

GroupMembers
Posts10
JoinedApr 24, 2004

Okay... I take it that '&' isn't the only thing I wanna look for, because it basically crashes before I can get past the splash screen.. I'm almost too afraid to touch the stuff now...
But... I dunno where it sets what variables like AT_SAY equal in colors either... so erm.. I'm a bit frazzled

Oh, these are the entries C finds for '&'

in act_comm.c:
"_word[j]='&'; j++;"
in color.c:
four instances of " if ( argument[str] == '&' )"
else if ( *ctype != '&' && *ctype != '{' && *ctype != '}' )
bug( "colorcode: command '%c' not '&', '{' or '}'", *ctype );
else if ( *ctype != '&' && *ctype != '^' && *ctype != '}' )
bug( "colorcode: command '%c' not '&', '^' or '}'", *ctype );
if( *ctype == '&' )
in magic.c:
case '&': check = arg+2; val = 5; break;
in mapout.c
case '&':
return 68;
in misc.c
if ( (c=getc(fp)) != '&' )
*p++ = '&';
in mud_prog.c
#define isoperator ( =='='|| ==''|| =='!'|| =='&'|| =='|')

in webclient.c:
if (*in=='&')
case '&':
if (state==0)
       
Pages:<< prev 1 next >>