Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 22 Nov 2000
Offline Last Active Sep 28 2016 12:32 AM

#5253044 SDL Image

Posted by on 19 September 2015 - 09:10 AM

Hey Guy, help me install SDL Image on my DEV C++
I tried some ways , but i failed D:
I saw in some tutorials, but it did not work

Under project options-> Directories -> Library Directories add the folder that contains the SDL image library. You'll have to the same thing for the header files but under the Include Directory tab. Should be no different than the steps you followed to use SDL assuming you got SDL to work before trying to add SDL Image.

Then under Parameters in Project Properties in the Linker box add in order
-lmingw32 -lSDL2main -lSDL2 -lSDL2_image

Also, I am not family enough with Dev-C++ to know if using the add Library button means you don't have to set the search path.

I am assuming SDL 2 if not change names accordingly.

#5074057 Circular buffer usage

Posted by on 29 June 2013 - 09:39 PM

I know they are used in LZMA and LZSS compression as way to create a sliding window for the algorithm and in various aspects of digital signal processing.

#5003325 Custom File Editing, Hex, Binary, Text

Posted by on 22 November 2012 - 03:40 PM

At very least I would make a tool that convert formatted text files into the binary format, at least until you can write a proper editor. I don't know the specifics of your format but it shouldn't be too hard to write a tool that will take a say XML or JSON text file and do the conversion. There are parsers available like irrXML

#5001973 writing program in c

Posted by on 18 November 2012 - 12:41 AM

I will just add cplusplus.com's C library reference section may be useful as well.

#4976221 SDL Surface scale with no quality lose

Posted by on 03 September 2012 - 04:23 PM

That's what i feared.
I was asking because, for example, secret maryo chronicles uses 256*256 images and when
rendered they are scaled but doesn't seem pixelated.
Is this because it uses openGL?

They probably use tiling to avoid scaling. That said you can scale an image and still have it look decent, but their are limits and the further you go the more noticable it will be, interpolation algorithms like Lanczos resampling, bi-cubic filtering, and tri-linear filtering and others just help hide the effects.

#4976205 SDL Surface scale with no quality lose

Posted by on 03 September 2012 - 03:57 PM

Sorry, scaling a raster image invariably leads to some loss of quality, there are algorithms that try to minimize it's appearance like bi cubic scaling. I am afraid there isn't a way to take an 2000px x 1500px down to 150 x 80 without significant loss.

No, rotozooming, is just rotating an image while zoom in an out and will display the same problems of quality loss when zoomed far in or out.

#4896016 How to create User Interface's Graphics with a 3d look ?

Posted by on 20 December 2011 - 09:37 PM

Glad I could help. Pixel2life.com has tutorials for these kinds of effects for various software packages including Gimp, I am sure there are other sources as well. Play with it enough and you can probably start deconstructing images like the first one you posted to some degree and have an idea how the effects where achieved.

For example that bar along the bottom in said picture; one can reasonably duplicate it in Gimp using a sold background color and the HSV noise filter set to a value of roughly 13. Then applying a transparent to white Bi-linear Gradient and adjusting the layer opacity (probably should have raised the jpeg compression quality it's got a few artifacts). Not perfect, but not that bad either. :) Anyway hope this helps.

Posted Image

#4895946 How to create User Interface's Graphics with a 3d look ?

Posted by on 20 December 2011 - 06:32 PM

I don't know about 3D but the sparing use of a few gradients can make your interface appear less flat. For example the red button:
Posted Image

this is quickest way I found to do away with the flat look.

#4821691 3rd party code monitoring

Posted by on 10 June 2011 - 07:09 AM

The tools are called code profilers. AMD makes CodeAnalyst http://developer.amd.com/Pages/default.aspx I don't know any other free ones.  Using it won't always be as simple as just editing the code, you'll need to what's going on to make effective use of a profiler. MSVC is going to run your code through it's optimizer which is going to make changes, so some things aren't going come out of compilation process as one might expect. For example, it may try to unroll small loops.

#4802673 I want to do sprite drawing for a fighting game, is drawing by hand/using a s...

Posted by on 25 April 2011 - 08:54 AM

yea, for MK they used motion capture.

They didn't use motion capture. They photographed the actors in front of a green screen.

Doing pixel drawings is a pain in the ass, it seems like it'd be easier to draw them by hand, and scan them/retrace them.

Had you bothered to properly read anything, the articles showed you how to do just that. There really isn't an easy shortcut. It's a skill you have to learn.

This thread has been a huge waste of time.

I've been using Paint Tool SAI which has a nice adjustable line stabilizer for tablets. Which helps a lot until you get comfortable using a tablet.

In other software we usually use the shift key for that. Holding shift will lock drawing to a straight line along the current axis.
Shift + Click will draw a line from point to point. Also very useful for custom selections.

How does it work in paint tool sai?

It stabilizes for curves etc as well, it removes an adjustable about of jitter form your stroke so it's easier to make smooth clean lines and curves.

The first circle is stabilized, second is free hand.
New Canvas.jpg

#4777447 SDL game

Posted by on 22 February 2011 - 02:55 AM

SDL_LoadBMP() does what the name implies, it loads a Windows or OS/2 Bitmap and returns a pointer to an SDL_Surface that contains the image data in a form usable by other SDL functions.
filename is an instance of the string class, c_str() is a method within the string class that return the contents of the string as a const char* which is required since SDL_LoadBMP will only except const char * as it's prototype is SDL_Surface *SDL_LoadBMP(const char *file);

DEV-C++ is horribly out of date and buggy I recommend you switch to the express edition of Microsoft's Visual C++ Or Code::Blocks.