Hi!

> Why not reload it when beginning a new game, is it so difficult ?
>
Je voulait pas passer trop de temps la-dessus, il y'a plusieurs parties de 
code qui rentrent en jeu.. Mais bon, maintenant c'est fait :)

> >For the 'translation' xml flag, I tried to make it work as it was working
> > in clanlib, but there is a problem with scaling/flipping function, as
> > they don't work the same way in clanlib and sdlgfx... Most of wormux code
> > have been adaptated to sdlgfx way, which make it impossible to find write
> > a perfect function to do translations.
> >So, I think we should do a copy and paste from clanlib's translations
> >functions, and then modify wormux to use Scale as it was in clanlib...
>
> La suite en français pour etre sur de ce comprendre... Quand tu parles
> de "translations", tu parles de translations "géométriques" ou de
> traductions linguistique ?
>
Maintenant que tu le dis, je me rends compte que c'est pas très clair :)
Je parlais de translations géométriques. Clanlib gère une option xml pour les 
sprites qui s'appelle "translation", pour laquelle on spécifie un paramètre x 
et y pour afficher automatiquement l'image décalée de (x,y) pixels.
Le problème est que j'arrive pas à reproduire comment ça marchait lorsque 
c'est utilisé en même temps que la fonction scale. L'option "translation" est 
utilisée essentiellement pour l'affichage de skins qui utilisent la fonction 
scale pour faire un flip de l'image...
Les fonctions scale de clanlib et de sdlgfx ne fonctionnent pas pareil et du 
coup, et wormux a déja été adapté pour foncitonner avec les fonctions sdlgfx, 
donc je me demande si on peut reproduire le même affichage sans avoir à 
modifier trop de choses...
Je pense qu'on a deux solutions, soit on utilise une translation adaptée au 
code actuelle et faudra modifier tout les fichiers xml qui utilisent la 
translation, et le resultat n'est pas garantit lorsque c'est combiné avec des 
rotations... soit on utilise les fonctions de translations de clanlib 
(copier/coller du code), et on adapte la fonction scale de wormux, et tout 
les bouts de code qui l'utilisent.
Je pense que réutiliser le code de clanlib est la solution la plus propre car 
elle donnera les meilleurs résultat, et on ne devrait pas avoir à revenir 
dessus plus tard, mais c'est lourd comme modif...
Si qqn à une idée de ce qu'il faut faire...

Lodesi

> ++
> Matt
>
> >Lodesi
> >
> >Le Mardi 13 Décembre 2005 01:18, 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
> >
> >__________________________________________________________________________
> >_ Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les
> > tarifs exceptionnels pour appeler la France et l'international.
> > Téléchargez 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





___________________________________________________________________________
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs 
exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com


Répondre à