It's set up perfect but it lacks a feature

Started by
4 comments, last by theOcelot 14 years, 5 months ago
Language: C++ IDE: MSV C++ Using: SDL, SDL image, SDL mixer, SDL ttf I created a 'Surface' Handler. It gathers all the surfaces that needs to be shown and sets them on the screen. The surfaces can be deleted from the list and nothing will get shifted or misplaced. I got this working but I noticed something; I created it without the clipping feature. The surfaces will clip the part that's on the screen and show it but It will not clip sections of the Surface(such as a sprite on a sprite sheet). I don't see how I can have both features. Is there a way to 'clip' a clip? Should I set the section of the image that I need in a new Surface(using get and set pixel)? I really don't want to go back and edit my code. Any motivation on this would be helpful(or painful). Thanks EDIT: I guess it wouldn't really be perfect if it wasn't really perfect. >.< [Edited by - rpg gamer 17 on November 7, 2009 10:17:48 PM]
-----------------------------I heard the voice of the fourth beast say, Come and see.And I looked, and behold a pale horse: and his name that sat on him was Death, and Hell followed with him. And power was given unto them over the fourth part of the earth, to kill with sword, and with hunger, and with death, and with the beasts of the earth.Revelation 6:7-8 (King James Version)
Advertisement
SDL_BlitSurface has an SDL_Rect* srcrect argument. This determines the portion of the source surface that is used.
The srcrect us what I am using to keep the image on the screen.
-----------------------------I heard the voice of the fourth beast say, Come and see.And I looked, and behold a pale horse: and his name that sat on him was Death, and Hell followed with him. And power was given unto them over the fourth part of the earth, to kill with sword, and with hunger, and with death, and with the beasts of the earth.Revelation 6:7-8 (King James Version)
You mean you're doing screen clipping by yourself? SDL does that for you automatically. It might be a good idea to show a little code.
Are you telling me I spent hours doing something I didn't need to do?
That just sucks.

>.<
-----------------------------I heard the voice of the fourth beast say, Come and see.And I looked, and behold a pale horse: and his name that sat on him was Death, and Hell followed with him. And power was given unto them over the fourth part of the earth, to kill with sword, and with hunger, and with death, and with the beasts of the earth.Revelation 6:7-8 (King James Version)
I don't know, I'm still asking what you did. But that's certainly what it sounds like.

This topic is closed to new replies.

Advertisement