Camelia, the Perl 6 bug

IRC log for #sdl, 2009-10-15

← Previous day | Index | Channel Index | Today | Next day → | Search | Google Search | Plain-Text | plain, newest first

All times shown according to UTC.

Time Nick Message
03:51 KatrinaTheLamia wait? SDLPerl on Wii?
03:51 well, since I learned how screwed I am anyways should my Wii need replacing--I dunno, I am conflicted here.
03:52 I enjoying buying games off of Wii Shop... but if I need to replace my Wii, that money is gone. I also want to do homebrew on my Wii =(
04:19 garu yeah
04:20 KatrinaTheLamia, but with the new update you can export them to a SIM card
04:21 KatrinaTheLamia well--just got told by my brother, Jappiy, that those games are tied to the Wii--and will not work on a different Wii.
04:21 Which again, makes it so that having to replace a Wii will eventually screw me over.
04:33 garu I'm not entirely sure that information is accurate... you should test it :)
06:17 acme kthakore: okay, will push what i have. it's not entirely working
06:18 CIA-1 SDL_perl: 03Leon Brocard 07redesign * r88a46ef 10/ (8 files in 4 dirs): try seperating out surface - not quite working yet - http://bit.ly/4eUDMA
06:20 acme also, i fell into the trap of trying to add useful methods to Surface.xs too
08:25 FullMetalHarlot joined #sdl
08:58 kthakore acme++
08:58 acme: move your useful method to TODO for SDL::Game::Surface
08:58 acme: let me work on the surface stuff I will show you what I meant
08:59 ok study time
08:59 bye guys tty guys from $work :P
08:59 hi FullMetalHarlot
08:59 morning Garu
09:00 FullMetalHarlot er... wait...
09:00 this is odd..
09:01 KatrinaTheLamia why the hell was this nick still connected?
09:45 kthakore KatrinaTheLamia: hi
09:46 KatrinaTheLamia hai~ sorry about not getting to KREPES of PerlSDL itself D=
09:47 kthakore KatrinaTheLamia: np
09:47 KatrinaTheLamia: make a ticket though some time outlining your plans
09:48 KatrinaTheLamia: that way if we overlap somewhere we can help each other out
09:48 KatrinaTheLamia: read the front page of the wiki on how to make tickets
09:48 KatrinaTheLamia ah, okay. Well, KREPES is more of an engine/framework, where as PerlSDL is merely a single API.
09:48 kthakore KatrinaTheLamia: don't tell me here write in Ticket
09:48 KatrinaTheLamia I mean, KREPES will likely pull stuff from other spots too.
09:48 kthakore :p
09:49 KatrinaTheLamia well, I am not certain why I am making a ticket for this >.>
09:49 kthakore SDL::Game is going to be framework
09:49 thats why
09:49 SDL::Game::2D
09:49 SDL::Game::3D so on
09:49 k gtg
09:49 KatrinaTheLamia ah okay.
09:49 kthakore bb later
09:50 KatrinaTheLamia c-ya
10:17 kthakore KatrinaTheLamia: break time
10:17 KatrinaTheLamia: so as I was saying
10:17 KatrinaTheLamia ah, okay
10:17 kthakore SDL::Game will have SDL bindings as Perlish niceties for several diff types of games
10:18 Game::Tools
10:18 will have modular algorithm and  Design patterns s
10:18 and Game::Base will package these Game::Tools
10:19 so if you want to make a 2D game of pong for example
10:19 you do this
10:19 use SDL::2D
10:19 use Game::Tools::Collision::Simpler
10:19 user Game::Base::Arcade
10:20 KatrinaTheLamia: catch my drift?
10:23 KatrinaTheLamia just writing down what I plan to do with KREPES right now.
10:24 kthakore yay!
10:25 KatrinaTheLamia: but what do you think of the modules?
10:25 put the Ticket in extend milestone
10:25 KatrinaTheLamia yeah, I know
10:26 kthakore acme and me have to fix the SDL:: layer first :|
10:29 KatrinaTheLamia: ok gtg get ready for $work!!!
10:29 KatrinaTheLamia: thanks let me about your thoughts on the Game::Tools/Game::Base/SDL::Game stuff
10:42 KatrinaTheLamia well, from what I have seen on the stuff, it really is not what I want.
11:02 kthakore KatrinaTheLamia: well what do you need then :)
11:03 * kthakore is always happy when he has real specs from real users
11:03 kthakore !!
11:05 KatrinaTheLamia okay--ticket sent it. Did not really go over it too much in preview.
11:05 kthakore np
11:07 KatrinaTheLamia http://sdlperl.ath.cx/projects/SDLPerl/ticket/38 << here we go... KREPES.
11:08 kthakore yay!!
11:09 KatrinaTheLamia from what I read from documentation on SDL::Game, that would be slightly hard to do, without including other stuff I really do not desire.
11:11 kthakore ok that means it need s to be more modular then
11:11 kk gtg
13:03 acme but yes, rewrite base SDL will before important first
13:28 kthakore back
13:28 acme: I am moving the stuff to proper src dirs
13:34 CIA-1 SDL_perl: 03Kartik Thakore 07redesign * rf9be87f 10/ (5 files in 3 dirs): Moved Rect and Color to Core/objects - http://bit.ly/4Etsjv
13:36 kthakore acme: what is the trouble with Surface Right now?
13:42 acme for some reason the screen wasn't actually updating
13:44 kthakore hmmm
13:44 ahh
13:44 I remember
13:44 ok I think I got it
13:46 acme: so now that Surface is a OBJECT in typemap
13:46 it is already blessed
13:46 so where ever in Surface.pm we need to use Update and so on
13:46 we don't need the pointer to the pointer of the surface anymore $$self
13:46 that was old implementation
13:47 more over whereever we pass stuff to UpdateRects (an example)
13:47 we use ${$surface}
13:47 now we just need $surface
13:47 I got this got this one
13:48 let me push and then check for me as  Idon't have GUI at the momemnt
13:49 acme: oh wait
13:49 we got rid of that right ...
13:51 acme one thing we'll need is lots of simple examples too ;-)
13:51 kthakore ya ...
13:52 acme: btw I only want the SDL_Surface struct and its accessors in Surface.xs
13:53 all the other stuff will got into Core/Video.xs or whereever it is in organized in the SDL docs
13:53 is bouncy using the new code?
13:54 acme: I want to try it ... and see why the XS Flip is not working
13:56 acme can you do this in bouncy where you want it to update
13:57 surface_update_rect($app, 0, 0, 0, 0);
13:57 acme: tell me if that updates?
13:57 acme kthakore: yup, i agree about the code
13:58 kthakore acme: lets try to make Surface work and then move
13:59 acme: also guess what our memleaks are down by 3 kb !!! after we did rects
13:59 and color
13:59 run the surfacememleak.t test
13:59 oops
13:59 surfaceML.t
14:00 I go get cofee let me knwo
14:02 acme so $app->update_rect(0, 0, $screen_width, $screen_height); just gives me a black screen on bouncy. no idea why
14:05 kthakore up
14:05 because update_rects was always a little broken
14:06 try SDL::Surface::surface_update_rect($app, 0, 0, 0, 0);
14:06 that updates the whole screen
14:07 acme SDL::Surface::update_rect($app, 0, 0, 0, 0); is the same thing. still all black
14:08 (this is where i got stuck ;-)
14:08 kthakore ok ... how are you writing to the surface ($app) blit or fill rect
14:08 acme a bit of both
14:08 kthakore ok
14:08 let me see
14:08 acme so better to come up with simple examples
14:08 kthakore yeah
14:08 ...
14:09 t/integration1.t
14:09 does that show the boxes?
14:09 red expanding and blue background?
14:10 acme well it segfaults, let me see
14:10 kthakore acme: how are doing blit and fill_rect
14:10 acme: there is our problem ... we are dying when we write to surface
14:51 CIA-1 SDL_perl: 03Leon Brocard 07redesign * ra0f3f32 10/ (lib/SDL/App.pm src/SDL.xs t/intergation1.t): Make surfaces work again (bad hack though) - http://bit.ly/ocsBY
14:52 kthakore acme: now I have to fix the organization of this Surface
14:53 also there are a gazillion memleaks I found in Surface ...
14:53 acme someone needs to figure out how to fix that better
14:53 kthakore I think I got an idea
14:54 acme: can you make the TODO for SDL::Game::Surface (stuff you found that would be nice to have)
14:54 I will work on making Surface only struct + accessors
14:54 and move the functions to Video.xs
14:56 fudge I segfaulted ...
14:56 umm ssh sucks for this
14:56 ok I gtg get code on $work
14:57 acme: gtg ttyl
21:08 acme: any clue on how we can make pixels writable in Surface.xs?
21:08 or give direct access to it>
21:19 TonyC why do you want to give access to a void *?
21:20 kthakore void * is pixels in Surface
21:21 void * can be multiple data types which is defined by pixelformat
21:21 TonyC yep, I had to deal with that in Imager::SDL
21:21 long ago
21:21 kthakore http://sdl.beuc.net/sdl.wiki/SDL_PixelFormat
21:22 TonyC: so the need for it is there and requested too http://rt.cpan.org/Public/Bug/[…]lay.html?id=48963
21:22 so how did you do it?
21:23 TonyC well, except I grab it at the XS level
21:23 kthakore TonyC: we only have XS level too
21:23 SDL:: is just XS -> C
21:23 TonyC urr, C level
21:23 kthakore ah
21:23 TonyC I don't pass the raw pixel pointer around
21:23 kthakore well share the wisdom oh mighty wizard
21:23 TonyC but, give me a sec
21:24 kthakore ok
21:24 well I gotta head home I will read your post here
21:25 TonyC http://nopaste.snit.ch/18349 something like that (untested)
21:26 kthakore that could work
21:26 ...
21:26 since pixel is just Uint
21:26 ...
21:26 TonyC IV is always large enough to store a pointer
21:27 of course, that doesn't late the caller directly modify pixel, except maybe with pack()
21:28 kthakore pack() ? where is that?
21:28 TonyC perldoc -f pack
21:28 kthakore ok thanks
21:28 I will be back
21:28 TonyC but I'd hate to go there, perhaps you'd be better giving him a setpixels() method that blits the whole (or part) of the surface
21:30 maybe it's time for Imager::SDL to solve this problem
21:31 time for a shower
23:04 kthakore ok
23:05 * kthakore kthakore really likes it when other people fix his problems
23:13 TonyC that XS I posted doesn't really solve the problem in that RT ticket
23:14 kthakore no it doesn't
23:15 TonyC: how would we do raw access to pixels like that?
23:16 'pump a string back in to SDL_Surface'
23:16 does that mean
23:16 TonyC unpack with P maybe
23:16 kthakore can we not just make a clone of pixels and pointer
23:17 TonyC but I wouldn't want to try it, or support people using it
23:17 kthakore provide a string for that with  your XS
23:17 TonyC Imager::SDL lets you draw on an SDL surface as if it were an Imager image
23:17 kthakore then later if they call surface_pixel_set($string)
23:18 just take the clone and equate it ot surface->pixels
23:18 and free the old pointer
23:18 ?
23:18 * TonyC checks the source
23:19 TonyC well, you wouldn't overwrite the pointer, if it's a device surface you're going to break things
23:20 you'd want to memcpy() the supplied data over the surface
23:20 kthakore oooh
23:20 ok
23:20 let me try that
23:20 what do you think a good test be for that?
23:21 TonyC make a run of white pixels in a string and set that to the image
23:22 kthakore ok
23:23 TonyC http://nopaste.snit.ch/paste something like that I guess
23:23 oops
23:23 http://nopaste.snit.ch/18351 that
23:52 kthakore TonyC: how do I catch a null pointer before I try to send it PTR2IV( ?
23:53 TonyC a null surface or a null pixels?
23:53 kthakore null pixels
23:53 TonyC though, I'm not sure how you'd get either in a valid surface
23:53 kthakore basically surface->pixels is null when first initialized
23:53 TonyC if (!surface->pixels) croak("Incomplete surface");
23:54 kthakore ok
23:54 thanks
23:55 wait I can do croak in XS?
23:55 ?
23:55 TonyC: I meant how do I do die in XS for null pixels?
23:56 TonyC that code was C
23:56 it croaks if surface->pixels is NULL
23:57 which is equivalent to die
23:57 kthakore I didn;t know croak was provided!
23:57 nice
23:57 I have been doing printf shit
23:57 ....
23:58 TonyC it takes printf() format specifiers too
23:59 croak("bad co-ordinate %dx%d", x, y); // for example

← Previous day | Index | Channel Index | Today | Next day → | Search | Google Search | Plain-Text | plain, newest first