List Info

Thread: RE: A SDL Input wrapper class problem




RE: A SDL Input wrapper class problem
user name
2007-09-12 03:53:12

Hi Dominique,

Thanks for your reply. I've just downloaded the latest SDL installer
(which worked fine with my Delphi 7) and studied the SDLInput unit. It
confirmed that my code was correct so I did a few more tests. I think
the problem was that I was testing my functions in a really tight loop
so the events weren't given a chance to update. Once I added the test to
the code that moved some sprites on the screen, it appeared to work
fine. I have changed my code to use the SDL consts as you suggested.

For the moment I'll stick to my lightweight wrapper but if it starts
to grow too much I'll probably use your one (no point in re-inventing
the wheel).

Thanks again for you helpful input.

Ian

Dominique wrote:

> Hi Ian,
> Have you looked at the sdlinput unit I created, which was enhanced by

> Dean? It is a class wrapper that supports Mouse, Keyboard and
Joysticks.
> It supports both event hooks or input polling. If this is too heavy a

>; wrapper for you ( though I have tried to keep it as light as possible
),
> then you can have a quick look at how I have put it together.

> I may be wrong, but I believe Dean is using it in his own projects as
well.

> Btw, what you have there looks right, but if you can throw together a

>; small test case, it may be easier to track down any issues.

> Also in the IsKeyPressed method I would suggest using the SDL
supplied
> Button pressed constants, just in case for some strange reason they
> change in future.
<mailto: JEDI-SDL-unsubscribe%40yahoogroups.com">JEDI-SDL-unsubscribeyahoogroups.com?subject=>

.

<http://geo.yahoo.com/serv?s=97359714/grpId=3077490/grpspId=1705006497/m
sgId=4265/stime=1189537684/nc1=4025338/nc2=4699084/nc3=4776346>


[Non-text portions of this message have been removed]

__._,_.___
Recent Activity
Visit Your Group
Sell Online

Start selling with

our award-winning

e-commerce tools.

Yahoo! Groups

Moderator Central

An online resource

for moderators.

Yoga Groups

Find Enlightenment

&amp; exchange insights

with other members

How to convert a PSDL_Surface to a bitmap ?
user name
2007-10-11 03:55:05

Hello,

I'm designing a level editor for my game and hold the required tiles
as "PSDL_Surface&quot; items. As the editor is a mixture of SDL and normal
Windows menus etc I'm displaying the SDL surface on a panel. What I want
to do now is show all the available tiles on another panel in an image
control (shows thumbnail images). My question is: How can I convert a
PSDL_Surface into a bitmap ? I need it in this format to be able to add
it to my control. The image control can also load from a stream so if
anyone has a routine to stream the PSDL_Surface, that could also work.

Ian



This email is intended solely for the person to whom it is addressed and may contain confidential or legally privileged information. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing or copying of this email is strictly prohibited. Please notify the author by replying to this email and destroying all copies of the email and attachments. Access to this email by anyone else is unauthorised.

Email may be susceptible to data corruption, interception, unauthorised amendment, viruses and delays or the consequences thereof. Any views or opinions presented are solely those of the author and do not necessarily represent those of Grosvenor Technology Ltd.

Grosvenor Technology Ltd. (incorp. Newmark Technology Ltd.) is a company registered in England with company number 2412554.
The Grosvenor Technology Ltd. Registered Office address is Millars Three, Southmill Road, Bishop's Stortford, Herts, CM23

[Non-text portions of this message have been removed]

__._,_.___
.

__,_._,___
Re: How to convert a PSDL_Surface to a bitmap ?
user name
2007-10-11 05:40:42

Or you could use http://sdlcontrols.sourceforge.net and do the entire
gui inside sdl window. You wouldn't even have to bother with placing
sdl inside a panel.

On 10/11/07, Ian Munro < ian.munro%40grosvenortechnology.com">ian.munrogrosvenortechnology.com> wrote:
&gt;
> Hello,
&gt;
> I'm designing a level editor for my game and hold the required tiles
&gt; as "PSDL_Surface&quot; items. As the editor is a mixture of SDL and normal
&gt; Windows menus etc I'm displaying the SDL surface on a panel. What I want
>; to do now is show all the available tiles on another panel in an image
&gt; control (shows thumbnail images). My question is: How can I convert a
> PSDL_Surface into a bitmap ? I need it in this format to be able to add
> it to my control. The image control can also load from a stream so if
> anyone has a routine to stream the PSDL_Surface, that could also work.
&gt;
> Ian
>

--
Pozdrav,
Igor Stojkovic mailto: stojkovic.igor%40gmail.com">stojkovic.igorgmail.com

__._,_.___
.

__,_._,___
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )