@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet


Comments:

<0> It seems that if I have an array of SDL_Surfaces* I can't blit them to my main surface, unless I lock them. Yet if I lock my surface(s), I still cannot blit
<0> is there a problem with arrays of surfaces?
<1> no reason for an array of surfaces to work differently
<1> well, as long as you aren't p***ing the array itself to SDL_BlitSurface :P
<0> no
<0> SDL_BlitSurface(SurfaceArray[0],NULL,screen,NULL)
<1> and SurfaceArray is defined as...?
<0> I tried: std::vector<SDL_Surface*> SurfaceArray; /* with insertions of course */, and SurfaceArray[2] /* just a test */
<1> that should work; how are you creating the surfaces?
<0> sending each individual surface to a function that loads a BMP. It looks as such:
<0> int LoadImg(std::string from, SDL_Surface* to) { to = SDL_LoadBMP(from.c_str());
<1> aha... well, the caller's version of the surface is never changed



<0> if (to == NULL) { /* throw an error and exit abnormally */ } return 0; }
<1> you're changing the local version of the variable inside the LoadImg function
<0> ya that is what is weired :/
<0> thats I guess is what I needed to know BUT
<0> if I make my own struct, and make it a pointer, and I make a function the same as above (without the loading of an image, instead a number), I get my number :/
<0> well, whatever, it doesn't work for SDL_Surface* I guess
<0> thanks though PovAddict I needed the info
<1> you need a double pointer; SDL_LoadBMP returns a pointer itself
<0> ya I just thought about that :)
<0> thanks PovAddict , I'm going to go try now
<1> or a C++ reference :)
<2> try int LoadImg(std::string from, SDL_Surface** to) { *to = SDL_LoadBMP(from.c_str());
<0> kk
<0> I remember having a problem with SDL_Surface*&
<1> if (*to == NULL)
<3> JucaBlues got it, i think
<0> nvmd :D a c++ reference works too :)
<0> thanks again
<2> anybody here has any clue about what is happening with my keyboard when I run dosbox under framebuffer? Some keys are crashing my pc when touched
<2> why would SDL behave differently under framebuffer? Under X11 it is working alright
<4> checked bugzilla ?
<4> framebuffer is pretty niche
<2> ive searched at bugzilla but didnt find anything related
<2> I just found 1 bug when searching for "framebuffer"
<3> yep, esoteric ;)
<4> then i'd try gdb
<2> well... I supose I wont be able to use gdb since the whole machine freezes
<2> but ill try
<3> ouch
<2> it freezes when I touch ESC, 1, 2, 3, 4, 5, or 6
<2> all the other keys are misplaced
<3> very weird
<3> US QWERTY?
<2> I have used the dosbox keyboard mapper utility to put the keys at the right places
<2> brazilian keyboard
<2> qwerty
<2> with a key
<2> i guess it is called abnt
<5> JucaBlues: ABNT2
<2> or abnt2, im not sure
<2> yes
<5> JucaBlues: btw, your Party Land remake is awesome =D
<2> oh! thanks!
<2> the keys 7 and Pause are described by dosbox keymapper utility as "unknown key"
<5> JucaBlues: hmm, what OS?
<2> linux
<5> ah, Linux, nvm



<2> the same thing happens on 2 diferent machines
<5> well, you're on the framebuffer, I don't expect it to work very well
<5> you have the right keymap? (or does SDL ignore that?)
<2> dosbox created a file with the remapping of the keys
<5> you could try some program that just dumps the keycodes
<2> where can I post it for reference?
<5> rafb.net/paste
<1> recently discovered fact: rafb stands for "read a f***ing book"
<5> yeah
<5> it's the ##C++ site
<2> http://rafb.net/p/8WtGQr74.html
<2> any idea?
<2> as I said the problem happens identically on 2 different machines:
<4> remote gdb
<2> an ubuntu with a abnt2 keyboard (ps2 conector) and a slackware with a qwerty (without the key) and DIN conector
<4> or X11
<2> X11 works fine
<2> the sabe binary that misbehaves on framebuffer, works fine on X11. I would like to know why does it behaves differently
<2> (same)
<5> JucaBlues: I notice that key_esc, key_[1-6] are missing
<2> thats because I couldnt configure them
<5> ah, right
<2> the system crashes as I touch them (so, the config file isnt written)
<5> tried with anything else that uses SDL?
<2> this keymap file was generated by dosbox tool
<2> no
<2> ill try it
<2> thanks
<5> maybe it's a dosbox bug
<2> i will try it. brb
<2> btw... are you from brazil, yuriks ?
<5> yeah, I am =
<5> =]*
<2> i supposed because of your fast answer about abnt2 and then your ip confirmed:-)
<5> hehe
<2> yuriks: I have compiled this SDL keyboard handling example: http://gpwiki.org/index.php/C:SDL_Keyboard_Input_using_an_Event_Loop and it works fine under framebuffer, so now I am sure that it is dosbox that is problematic under fb
<2> sorry about the confusion
<2> i'll take a look at dosbox source code
<5> JucaBlues: might want to check the forums or the IRC channel
<2> i surely will
<2> yuriks: when I finish partyland remake I can invite you to test it
<2> i'm building it at my home in so paulo
<5> JucaBlues: heh, not likely
<5> I'm on RS =P
<5> in*
<2> :-(
<2> every year I go to Porto Alegre for the FISL
<5> I live on "the interior" (dunno how you say that, heh)
<2> countryside
<5> yeah
<5> JucaBlues: how'll paint the playfield?
<2> i know a friend that works with playfield artwork
<2> Ill ask him for doing it for me
<2> but this will be the last thing I ll do on this project
<2> shouldnt we chat in pvt? this is a bit offtopic here...
<5> I guess


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #sdl
or
Go to some related logs:

#physics
update statement conflicted with column foreign key
play iTunes shared music linux
#gentoo
#gentoo
can't ping knoppix client
zipsplit howto
#perl
+ torrent + macedonija
mplayer /dev/null on ubuntu



Home  |  disclaimer  |  contact  |  submit quotes