FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Getting SDL_suface, exitting draw, key thing

 
Post new topic   Reply to topic     Forum Index -> ArcLib
View previous topic :: View next topic  
Author Message
joelcnz



Joined: 23 Feb 2009
Posts: 76

PostPosted: Thu Aug 20, 2009 7:32 pm    Post subject: Getting SDL_suface, exitting draw, key thing Reply with quote

How do you get the SDL suface? So I can find my images width, height, and draw on it.

Like:
Code:
Texure t1=Texture("rock.jpg",true);
SDL_image st1=t1.getSDL_image();


I get this error exiting the draw.d example:
Quote:
object.Exception: Access Violation - Read at address 0x4cd001f


What key is ARC_QUIT? I looked in the libraries source code and it looks like it's 'clear', but what's that button? I don't think it's listed.
Code:
while(!arc.input.keyPressed(ARC_QUIT) ) {
   arc.input.process();
...
}
Back to top
View user's profile Send private message MSN Messenger
michaelp



Joined: 27 Jul 2008
Posts: 114

PostPosted: Fri Aug 21, 2009 7:07 am    Post subject: Reply with quote

For the ARC_QUIT, I'd guess that it's the equivalent of SDL_QUIT. Which is when the 'X' button on the window is pressed.
I don't know about Arclib much, so I can't answer your first question.
Back to top
View user's profile Send private message
joelcnz



Joined: 23 Feb 2009
Posts: 76

PostPosted: Sat Aug 22, 2009 1:52 am    Post subject: Reply with quote

Thanks for the reply michaelp, it helped. Smile
Back to top
View user's profile Send private message MSN Messenger
clayasaurus



Joined: 21 May 2004
Posts: 857

PostPosted: Tue Nov 03, 2009 12:18 pm    Post subject: Reply with quote

Texture t = Texture("img.img", true); then

SDL_Surface *s = t.getSDLSurface

should work, if not post a full code synopsis. In the draw.d example it is not crashing, at least.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> ArcLib All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group