Jump to content
Eternal Lands Official Forums
Sign in to follow this  
mihaim

Map Markings Patch ( 00250 )

Recommended Posts

Entropy requested this patch. So i wrote it.

With this you can add map markings so you can remember places that you want to go or not to go.

Each map has his own marks file.

Usage: On the map screen right click and a yellow mark apears. Then type the marking text. When you have finish press enter and the marking will be on your map.

 

screenshot here:

http://el.tfm.ro/shots/markings1.jpg

 

I'll upload it to berlios in few minutes.

Edited by mihaim

Share this post


Link to post
Share on other sites

man, fold this into the client as soon as possible. i have a feeling that people will start posting marker files all over the place when this goes live :D

Share this post


Link to post
Share on other sites

Ccan you come up with a way to actually prompt someone to type in the name of the marker, and allow them to see the label they're typing?

Share this post


Link to post
Share on other sites

Bug: if you type in a too-long name, it will work ok until the next time the client is started, then it will segfault.

Share this post


Link to post
Share on other sites

Signal 11, SIGSEGV, segmentation violation, . . . it's something that happens when your operating system can make competent use of a MMU. Also known as a "bus error" on some systems.

 

Similar to, but very different from, have blue dysentery all over your screen and then ending your own life Kurt Cobain style.

Share this post


Link to post
Share on other sites
Signal 11, SIGSEGV, segmentation violation, . . . it's something that happens when your operating system can make competent use of a MMU. Also known as a "bus error" on some systems.

Bus error is not the same, although both can be caused by random pointers.

 

SegV: You tried to access an area you do now have permission to.

 

Bus error: You tried to access something that is not possible, like non-aligned memory access (32bit value on an odd address on a high performance CPU), or possibly outside the addressable memory.

Share this post


Link to post
Share on other sites

It is also a guild in some known game...:-)

 

Regards.

Share this post


Link to post
Share on other sites
Ccan you come up with a way to actually prompt someone to type in the name of the marker, and allow them to see the label they're typing?

Pop-up with changed flags maybe (So that it'd be visible overlaying the map)? :) (Just, as of yet, you'd have to be sure to re-set them when you finished with it...) ...As for the too long of a name, just use the pop-up's max_len to keep it within reasonable range.

Edited by crusadingknight

Share this post


Link to post
Share on other sites
Signal 11, SIGSEGV, segmentation violation, . . . it's something that happens when your operating system can make competent use of a MMU. Also known as a "bus error" on some systems.

Bus error is not the same, although both can be caused by random pointers.

 

SegV: You tried to access an area you do now have permission to.

 

Bus error: You tried to access something that is not possible, like non-aligned memory access (32bit value on an odd address on a high performance CPU), or possibly outside the addressable memory.

Interesting. I had only seen "bus error" once or twice before, on other systems, and I just assumed that it was their name for a SegV.

Share this post


Link to post
Share on other sites
Ccan you come up with a way to actually prompt someone to type in the name of the marker, and allow them to see the label they're typing?

Erm . An Edit widget would be nice ... Dunno if is implemented yet.

 

And about the segfault i will fix that tonight

Share this post


Link to post
Share on other sites
Ccan you come up with a way to actually prompt someone to type in the name of the marker, and allow them to see the label they're typing?

Erm . An Edit widget would be nice ... Dunno if is implemented yet.

 

And about the segfault i will fix that tonight

Yeah, yeah, the multi-input-display-text-edit-etc. widget is almost finished...How else do you think the popup works? :)

 

An edit is kinda in the future, by prompt I can do ->

http://www.freewebs.com/theironguard/elc/pop-prompt.PNG

I suspect mihaim could make the pop-up prompt look better though...I forget the flag

to make it appear over other windows :)

 

Hm, his works by strcpy, so I think it's possible for him to do the same I did for the pop-ups (mod put_text_in_buffer)...of course, it takes some other mods as well, but most of it is already done (just some vars to change) in my pop-up patch.

Edited by crusadingknight

Share this post


Link to post
Share on other sites
Bus error: You tried to access something that is not possible, like non-aligned memory access (32bit value on an odd address on a high performance CPU), or possibly outside the addressable memory.

Interesting. I had only seen "bus error" once or twice before, on other systems, and I just assumed that it was their name for a SegV.

Nope, but if your int16 * x = random() is an even number you'll get a segfault, where as an odd number will get a bus error. Excluding x86, which will just slow down to access an odd address.

 

The difference is not something you'll figure out without reading the manual :)

Share this post


Link to post
Share on other sites
Excluding x86, which will just slow down to access an odd address.

Which would be why I've only seen it on an UltraSPARC and an iBook :P

Share this post


Link to post
Share on other sites
Ccan you come up with a way to actually prompt someone to type in the name of the marker, and allow them to see the label they're typing?

Erm . An Edit widget would be nice ... Dunno if is implemented yet.

 

And about the segfault i will fix that tonight

Done (in my patch at least)...but it still takes displaying and click handling and accept handling on your end.

Share this post


Link to post
Share on other sites
Done (in my patch at least)...but it still takes displaying and click handling and accept handling on your end.

I took Patch 251 from berlios , applyed it and this is the result:

 

bash-2.05a# make -f Makefile.linux
cc -march=i686 -Wall -ggdb -pipe -DLINUX -DELC -I/usr/include/SDL -D_REENTRANT -I/usr/include/libxml2 -c 2d_objects.c
In file included from 2d_objects.c:4:
global.h:96:21: chatwin.h: No such file or directory
make: *** [2d_objects.o] Error 1

 

Where chatwin.h should be ?

Share this post


Link to post
Share on other sites

Updated the patch on berlios .

Changes:

- Now the text is shown on the map on mouse location while u type with yellow. It turnes green

after mark is done.

- Replaced strcpy with strncpy and fixed seg fault on long strings .

 

No need for text widget :) It's simpler this way. Ty wytter for sugestion

Share this post


Link to post
Share on other sites

Still crashing.

 

multiplayer.c:449 in strstr

 

My map data looks like this (yes, that's two lines, and only 1 mark):

 

14 159 fjkdslafjdlskjfalksdjfl;kasjflkdjsal;kfjdsl;kajfdsl;kjfl;skjfl;dsjl;fajdsl;kjfalskdj;a
fjdslk;ajfsdlkjfa;lksjfsldk;ajfdskla;jfdkls;a

Share this post


Link to post
Share on other sites

Tip for Mihai: It's because you're using the input_text_line and it's text gets wrapped.

Share this post


Link to post
Share on other sites
Done (in my patch at least)...but it still takes displaying and click handling and accept handling on your end.

I took Patch 251 from berlios , applyed it and this is the result:

 

bash-2.05a# make -f Makefile.linux
cc -march=i686 -Wall -ggdb -pipe -DLINUX -DELC -I/usr/include/SDL -D_REENTRANT -I/usr/include/libxml2 -c 2d_objects.c
In file included from 2d_objects.c:4:
global.h:96:21: chatwin.h: No such file or directory
make: *** [2d_objects.o] Error 1

 

Where chatwin.h should be ?

Hrm. I tkae it nobody bothers to read comments on the berlios.de page, so I'll stop posting stuff there (It listed required files...for some reason windows CVS screws up -N <_< )...

I'll try again though.

Share this post


Link to post
Share on other sites
Tip for Mihai: It's because you're using the input_text_line and it's text gets wrapped.

Arghhhh. That's why a second line was in the file. Fixing it now.

Uploading to berlios

Share this post


Link to post
Share on other sites

Is it possible to also add automated map-marking for certain quests? For example, a marking showing where you're supposed to go for the tutorials would be nice.

 

-Lyn-

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×