I answer to myself...
I have just correcting the misplacing image problem. This is a problem
of camera, widget use image->Draw(x, y) instead of doing
image->Blit(sdlwindow, x, y). The Draw method takes care of the camera,
the Blit don't.
But, I still have the problem for playing, it is quite strange because I
have no problem of displaying in the option menu, or the main menu, even
if I play, then stop, then play, then stop, then...
Matt
Matthieu Fertré a écrit :
Hi,
I have another problems here. Translations doesn't work but this is
not the main problem.
Let's see on an example,
- I run Wormux
- I press Play
- I play ... then press Escape, then yes to quit
- I arrive to main menu, the texts are correctly placed but the images
of the buttons are misplaced in Y, correctly placed in X. A problem of
camera ?
- then I press again Play, I can play, but the screen seems to use
only one buffer, not clearing it at each frame. At the beginning, I
can the main menu in the background, then It is invisible due to wind
particles that are added and added...
Matt
lds a écrit :
Hi!
It seems like the bug comes from the option menu.
#3 0x08061f81 in Box::Draw (this=0x1e, mouse_x=519, mouse_y=737) at
gui/box.cpp:54
The adress of the box is wrong. I have added some "assert" in the box
class, which shows that a NULL Widget* is in the stdlist
(mysteriously added...).
As for the Sprite class, i get the highlight of the main menu button
displayed at a random position after a game. I can see this since i
added support of the "translation" xml option to the sprite class.
It's like the translation variable aren't initialised.. but they are
initialised!!
Can you see this as well? Any idea where it comes from?
I fear some memory is corrupted somewhere in the code, and bugs
appear in other parts... valgrind nor gdb have been able to tell
something useful..
Lodesi
Le Samedi 10 Décembre 2005 19:15, Matthieu Fertré a écrit :
Hello,
It seems that there is a bug in class Sprite. Here is the trace :
Couldn't open audio:
[Sound] Error : No sound found for sample menu/clic
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1217472832 (LWP 11038)]
0xb7f1d4e5 in rotozoomSurfaceXY (src=0x8dd0298, angle=-0,
zoomx=-6.8654969628226121, zoomy=0.9375, smooth=0) at
SDL_rotozoom.c:630
630 is32bit = (src->format->BitsPerPixel == 32);
Current language: auto; currently c
(gdb) bt
#0 0xb7f1d4e5 in rotozoomSurfaceXY (src=0x8dd0298, angle=-0,
zoomx=-6.8654969628226121, zoomy=0.9375, smooth=0) at
SDL_rotozoom.c:630
#1 0x080754d8 in Sprite::Blit (this=0x8debc38, dest=0x81c7280,
pos_x=512, pos_y=718) at graphic/sprite.cpp:531
#2 0x0807576b in Sprite::Draw (this=0x8debc38, pos_x=512,
pos_y=718) at
graphic/sprite.cpp:643
#3 0x08061f81 in Box::Draw (this=0x1e, mouse_x=519, mouse_y=737) at
gui/box.cpp:54
#4 0x0808295d in OptionMenu::Lance (this=0x8dd0210) at
menu/options_menu.cpp:446
#5 0x0804fcff in AppWormux::main (this=0x8113fd8, argc=1,
argv=0xbfe45c24) at main.cpp:250
#6 0x0804febe in main (argc=1, argv=0xbfe45c24) at main.cpp:285
(gdb)
The bug appears (but not always) when mouse goes over the ok button of
the options menu.
Matt
_______________________________________________
Wormux-dev mailing list
Wormux-dev@gna.org
https://mail.gna.org/listinfo/wormux-dev
___________________________________________________________________________
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo!
Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com
_______________________________________________
Wormux-dev mailing list
Wormux-dev@gna.org
https://mail.gna.org/listinfo/wormux-dev
_______________________________________________
Wormux-dev mailing list
Wormux-dev@gna.org
https://mail.gna.org/listinfo/wormux-dev