Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Forum
1 2 Previous Next  
Search
Topic Gosu 0.7.37 released By TheOm3ga Date 2011-09-12 23:59
About Gosu::language, if anyone is interested, some months ago I wrote a tutorial about internationalization of projects using Gettext, which is the most common way of translating projects. You can find it here: http://rodin.uca.es:8081/xmlui/bitstream/handle/10498/10772/gettext.pdf?sequence=1 (however, it's in spanish).
Topic Compiling Gosu 2D with MinGw on Windows By TheOm3ga Date 2011-08-27 19:16
There you got it:
https://github.com/jlnr/gosu/wiki/Compiling-in-Windows-using-MinGW
Topic Compiling Gosu 2D with MinGw on Windows By TheOm3ga Date 2011-08-27 18:32
YEAAHH I did it! Full fledged compilation, sound included!

I'm gonna try to write an article in the wiki trying to explain all the steps, which are a few.
Topic Compiling Gosu 2D with MinGw on Windows By TheOm3ga Date 2011-08-27 16:26
Definitely, the sound is broken somewhere when trying to compile with MinGW. Whenever there's a Gosu::Sample, I get this error "This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information".

The rare thing is that, neither the compilation of libgosu nor the compilation of the test.cpp file requested anything related to OpenAL, no include or lib files.
Topic Compiling Gosu 2D with MinGw on Windows By TheOm3ga Date 2011-08-27 15:47
So far it works - more or less. I've been able to compile freegemas (http://freegemas.googlecode.com) and run it. The main menu and help section works, but the normal gameplay launches a runtime exception, I think it's related to the sound.
Topic Compiling Gosu 2D with MinGw on Windows By TheOm3ga Date 2011-08-27 14:59
Finally, looking at the dependences in the VS project file, I managed to wonder what the remaining ones were:
g++ -o programa prueba.cpp -I. lib/libgosu.a -lopengl32 -lglu32 -LSDL_mixer/lib -lSDL_mixer -LFreeImage/Dist -lfreeimage -LSDL/lib -llibsdl -lgdi32 -lwinmm -mwindows -ldxguid -lws2_32 -ldinput8
Topic Compiling Gosu 2D with MinGw on Windows By TheOm3ga Date 2011-08-27 14:42
One more step: adding -lgdi32 resolves the undefined references in WindowWin.cpp. Now only the ones in InputWin and TimingWin remain. Come on! We gotta do it! :D
Topic Compiling Gosu 2D with MinGw on Windows By TheOm3ga Date 2011-08-27 14:31
It does not seem to be that simple. So far I've been able to create the libgosu.a file. For this, I had to hardcode the path to the DirectX SDK in the Makefile, and also had to download FreeImage, SDL and SDL_Mixer

DXINCLUDE = "C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include"

CXXFLAGS  = -g -I. -I$(DXINCLUDE) -DUNICODE -D_UNICODE -DMINGW
CXXFLAGS += -IFreeImage/Dist -ISDL/include/SDL -ISDL_mixer/include


Now, I'm trying to compile a simple test file, I'm getting lots of undefined references, basically because I don't know which libraries to link against. So far I have this command:
g++ -o programa test.cpp lib/libgosu.a -lopengl32 -lglu32 -LSDL_mixer/lib -lSDL_mixer -LFreeImage/Dist -lfreeimage -LSDL/lib -llibsdl

And the remaining undefined references seem to be related to DirectX or something:

lib/libgosu.a(WindowWin.o): In function windowClass':
c:\gosu/GosuImpl/WindowWin.cpp:163: undefined reference to
CreateSolidBrush@4'
lib/libgosu.a(WindowWin.o): In function Window':
c:\gosu/GosuImpl/WindowWin.cpp:239: undefined reference to
ChoosePixelFormat@8'
c:\gosu/GosuImpl/WindowWin.cpp:241: undefined reference to SetPixelFormat@12'
lib/libgosu.a(WindowWin.o): In function
ZN4Gosu6Window13handleMessageEjjl':
c:\gosu/GosuImpl/WindowWin.cpp:484: undefined reference to SwapBuffers@4'
lib/libgosu.a(InputWin.o): In function
Input':
c:\gosu/GosuImpl/InputWin.cpp:288: undefined reference to IID_IDirectInput8W'
c:\gosu/GosuImpl/InputWin.cpp:288: undefined reference to
DirectInput8Create@20'
c:\gosu/GosuImpl/InputWin.cpp:306: undefined reference to GUID_SysKeyboard'
c:\gosu/GosuImpl/InputWin.cpp:310: undefined reference to
c_dfDIKeyboard'
c:\gosu/GosuImpl/InputWin.cpp:324: undefined reference to GUID_SysMouse'
c:\gosu/GosuImpl/InputWin.cpp:328: undefined reference to
c_dfDIMouse'
lib/libgosu.a(InputWin.o): In function ZN4Gosu5Input4Impl15gamepadCallbackEPK17DIDEVICEINSTANCEWPv@8':
c:\gosu/GosuImpl/InputWin.cpp:120: undefined reference to
c_dfDIJoystick'
lib/libgosu.a(TimingWin.o): In function resetTGT':
c:\gosu/GosuImpl/TimingWin.cpp:14: undefined reference to
timeEndPeriod@4'
lib/libgosu.a(TimingWin.o): In function ZN4Gosu12millisecondsEv':
c:\gosu/GosuImpl/TimingWin.cpp:23: undefined reference to
timeBeginPeriod@4'
c:\gosu/GosuImpl/TimingWin.cpp:30: undefined reference to `timeGetTime@0'


I think I'm quite close to do it, but looks like I'm lacking a final library to link.
Topic Compiling Gosu 2D with MinGw on Windows By TheOm3ga Date 2011-08-27 13:26
Could you elaborate a bit on the steps to compile using mingw?
Topic Gosu 0.7.35 released By TheOm3ga Date 2011-08-19 11:54
Looks like adding -DSWIG to the compilation options fixes it.

Edit: no, it does not work. Indeed it fixes the audio warning, but breaks other things :(
Topic Gosu 0.7.35 released By TheOm3ga Date 2011-08-19 11:37
I've found a little weird warning that's bugging me quite a lot. Whenever I compile a project I get this warning for every single file:

In file included from gosu/Gosu/Gosu.hpp:13,
                 from test.cpp:1:
gosu/Gosu/Fwd.hpp:10: warning: attribute ignored in declaration of ‘struct Gosu::Audio’
gosu/Gosu/Fwd.hpp:10: warning: attribute for ‘struct Gosu::Audio’ must follow the ‘struct’ keyword


Content of test.cpp is just

#include <Gosu/Gosu.hpp>

int main(){
  return 0;
}


Any clue?
Topic Gosu 0.7.35 released By TheOm3ga Date 2011-08-17 01:24
OMG a Makefile for MinGW, that sounds hot! Will check it out asap, I hope I can get rid of Visual Studio for once.
Topic Gosu 0.7.29 released By TheOm3ga Date 2011-03-30 21:26
Did you mean 0.7.29?
Topic Game development with Gosu Workshop By TheOm3ga Date 2011-03-29 10:09
I'm not a big fan of installing system-wide libraries using Makefile, because if later I need to delete them, it's hard to track what files were installed. On the other hand, if it were packaged as a .deb file for instance, there would be no problem in having it installed.

Anyways, static linkage is faster :)
Topic Game development with Gosu Workshop By TheOm3ga Date 2011-03-28 16:39
I used SVN right for that. Googlecode allowed me to easily create a project, upload the code and also have a downloads section. Actually the CVS was not used too much, as I was the only developer. It was more like a free hosting :)

By the way, the students liked Gosu a lot, specially after having dealt with SDL's low level madness.
Topic Game development with Gosu Workshop By TheOm3ga Date 2011-03-28 16:36
It's getting really hard for me to move from svn to git, but I guess I have no choice... :D
Topic Game development with Gosu Workshop By TheOm3ga Date 2011-03-28 16:35
Thanks!

About your question, There was not enough time to develop it from scratch, so I developed the game entirely, then deleted some pieces of code for the students to fill in. For instance, if you download the materials and go to the "Part 2" folder, you'll see that the game lacks a background, the blocks are gray, the scoreboard is not drawn and the board does not move. I told the students to try to code the missing parts using their knowledge.
Topic Game development with Gosu Workshop By TheOm3ga Date 2011-03-27 01:56
Hi there.

Last week I gave a workshop about game development using Gosu at my university. It went pretty well, about fifty people came and the overall results were very good. It was a two-part workshop, the first part was about Gosu's basics (Window, Image, Font and events), and then we worked on an small arkanoid (conveniently called gosunoid).

You can find all the materials in the official repository. In particular, you can download the workshop materials here (there's a project for MSVC 2008 Express and Linux) and the presentation is uploaded here (although it's in spanish).

You can see a couple of photographs of the workshop too.

It maybe useful for anyone looking for ideas to make a workshop like this.
Topic Freegemas - Open source Bejeweled clone By TheOm3ga Date 2011-03-24 23:46
Hey. I had thought about it, but the only apple-related gear I've got is an iPod touch 2G I won in a xhtml competition, so I have no way of compiling it for iOS.

However, I'm still interested. Also, I didn't know anything about it needing be relicensed. Why is that?
Topic Font antialiasing in Windows By TheOm3ga Date 2011-03-16 21:50
Hi there!

I was wondering, is there any way of improving text antialiasing in Windows? Here's a comparison using SDL ttf (top) and using Gosu::Font (bottom, guess it uses Windows font rendering engine or something like that)

[http://img291.imageshack.us/img291/1341/comparisoni.png]

I've used sdl ttf on windows with great results, althought there are a few additional DLL's, but I think it's worth it.
Topic OMG Audiere can't play sounds if there're other programs... By TheOm3ga Date 2011-02-06 15:52
Ok, this is serious shit. Looks like Audiere (and therefore Gosu) cannot open the audio device if there are other programs playing sounds in Linux, (I don't know about Windows). The audiere::OpenDevice function fails to open /dev/dsp (/dev/dsp: Device or resource busy).

I think this is quite serious, as it breaks every gosu game that handles sounds even if you have a browser with a youtube video open, for instance.
Topic Ideas for a 3-hour Gosu workshop By TheOm3ga Date 2011-02-05 09:05
I should have mentioned I have no idea about Ruby, the workshop is c++ based :D
Topic Ideas for a 3-hour Gosu workshop By TheOm3ga Date 2011-02-04 18:46
Hi there.

I'm gonna be giving a 3-hour Gosu introductory workshop here in my college. I think I'll explain the basics of Gosu as we develop a little game, so the students can see the results immediately. The question is, what game could we develop in about three hours? I started thinking about an arkanoid clone (because we previously used a Pong in an older edition of the workshop) but it may be a bit complex for so little time.

What do you think?

EDIT: C++ always :D
Topic Window::needsCursor is not working By TheOm3ga Date 2011-02-04 14:57
Hi.

Looks like Window::needsCursor is not working (using Gosu 0.7.27 under Ubuntu 10.04 64bits, also tried on Ubuntu 10.10 32bits). The cursor will always show regardless of what needsCursor returns.

The solution is simple. Basically, open GosuImpl/WindowX.cpp, go to line 161, where you will find:


        if (showingCursor && !window->needsCursor())

        {

            XUndefineCursor(display, this->window);

            showingCursor = false;

        }

        else if (!showingCursor && window->needsCursor())

        {

            XDefineCursor(display, this->window, emptyCursor);

            showingCursor = true;

        }


You just have to change that for:

        if (showingCursor && !window->needsCursor())
        {
      XDefineCursor(display, this->window, emptyCursor);
            showingCursor = false;
        }
        else if (!showingCursor && window->needsCursor())
        {
      XUndefineCursor(display, this->window);
            showingCursor = true;
        }


That's it.
Topic Testcases for ToDo list problems By TheOm3ga Date 2011-01-30 23:18
Hi there!

I had some spare time and I gave a look at the problems listed in the toDo wiki page. I found one that says "Linux: Support Unicode in title bar", so I set up a testcase, tried using setCaption(L"ááá"); but it worked properly.

My point is that it would be interesting to have a thread like this to list testcases for the mentioned problems, so people trying to fix them may have a starting point.
Topic Gosu 0.7.27 released (& 0.7.27.1 hotfix) By TheOm3ga Date 2011-01-30 19:58
This is great! Previously, with SDL_Mixer, every time I used a Gosu::Song, it took a while to close the game, it was some kind of lag. Now with that Audiere lib, it works flawlessly.

I'm also glad to have that speed control over the samples now in Linux. It will be very helpful to mimic, for instance, the rising sound of an engine acelerating.

Thanks.
Topic Gosu 0.7.27 released (& 0.7.27.1 hotfix) By TheOm3ga Date 2011-01-30 19:49
I guess you're talking about GNU/Linux. What distribution are you using?
Topic Building Gosu on Windows for Mingw/GCC By TheOm3ga Date 2011-01-16 01:06
Hi there.

Have any of you tried to compile Gosu on Windows for MinGW and GCC? I'm not used to Visual Studio, I'd prefer to use CodeBlocks or Cygwin.
Topic Workaround to use Custom Fonts in LINUX By TheOm3ga Date 2011-01-15 19:42
I guess with the new changes in 0.7.26 (http://code.google.com/p/gosu/source/detail?r=1711) now this works properly, doesn't it? I'll check it out tonight.
Topic Gosu on Linux Magazine By TheOm3ga Date 2010-12-04 01:16
Hi all.

I've been talking to the editor and unfortunately he (and actually also the contract) says that they've got the sole rights of the articles for three months. However, after that It gets released with an open license (probably CC-BY or something like that). I'll let you know when it's available :)

Thanks all.
Topic Gosu on Linux Magazine By TheOm3ga Date 2010-12-01 15:28
Hi there.

I've written a series of three articles for the spanish edition of Linux Magazine about game development using Gosu (and a little introduction to Boost). The first of them is getting published on the december issue. In the articles I explain how I developed freegemas (http://code.google.com/p/freegemas/) from scratch.

As you may be aware of, Linux Magazine is one of the most popular magazines about Linux in Europe. There are editions in English, German, Polish, Romanian, Brazilian Portuguese and Spanish. I hope these articles give some fair popularity to Gosu, and the number of users increase.

If they were written in english I'd scan them, but I guess there are not many spanish speakers here.
Topic Workaround to use Custom Fonts in LINUX By TheOm3ga Date 2010-08-09 15:08
When you tell SDL_ttf to open a font with size=30, it doesn't actually mean that all characters should fit in 30 px height. In fact, there's a function called TTF_FontHeight that will tell you the actual total height of the font, which in 99% of cases, it's higher than the font size you passed to TTF_OpenFont. For example, for the font I'm using (Lake Wobegon), it returns 41px for a 30px loaded font. But that does not happen just in SDL ttf, but in many other systems as well, like Photoshop: take a look at how Photoshop renders the same font at the same size.

[http://img641.imageshack.us/img641/4491/comp2.png]

Anyway, what I meant is that the appearance of font rendering should be the same across platforms. It's ok that the pixel hinting and such things be different, but it's a pain in the a$$ to have to use different font sizes for each platform, even though it happens with some fonts and not with others.

Given SDL ttf works the same across platforms, why not use it as a single good solution for all the platforms?
Topic Workaround to use Custom Fonts in LINUX By TheOm3ga Date 2010-08-07 17:50
Yes, there's a clipping problem, but I'm using a workaround (explained in this post)to avoid that clipping. Without using the workaround it looks like this:
[http://img843.imageshack.us/img843/8093/seleccin002.png]

In my opinion, it's not that SDLTTFRenderer is rendering things too big, because if you look at the other image, it's the one that fits the actual size (30px) passed to the Gosu::Font constructor, but the windows's rendering stuff too small. I don't know...
Topic Workaround to use Custom Fonts in LINUX By TheOm3ga Date 2010-08-07 15:20
Watch out! I'm talking about my ancient customFont class, not Gosu::Font. The problem is that the font sizes in Windows and Linux render differently. In windows, some fonts appear smaller than they should, whereas in Linux they render properly.

[http://img40.imageshack.us/img40/3425/comp1v.png]

Then, given I can't force Gosu to use SDLTTFRenderer under Windows, I thought I could use my customFont class to render the texts using SDL on both platforms. That's when the problem appears. If you create a customFont object (obviously keeping the object alive as a class member or something like that) and draw a line of text, there's no problem. BUT, if you try to draw two lines of text (calling customFont::draw twice) on the same game loop iteration, it fails. I think it's because the image that customFont creates with the first line of text gets overwritten when draw is called for the second time. Pretty obvious I think, but I can't think of a good way of being able to call customFont::draw as many times as I want on the same game loop iteration.

Somehow, when you implemented my sdl idea on Gosu two months ago, I discovered a solution for my problem based on your implementation, but now I forgot it. It must be the heat of the summer :(
Topic Workaround to use Custom Fonts in LINUX By TheOm3ga Date 2010-08-07 01:57
Two months later, I've got stuck again on the same segmentation fault errors, even though I solved them some time ago, but I lost the files.
Julian, could you give it a look? I've been trying to debug the error but not been able to solve it. It only happens when I try to draw twice using the same font on the same game loop iteration. The debugger stack says that the error appears on the TexName method. It's quite strange because, even using new objects every time customFont::draw is called, it fails. Why? There is not supposed to be anything in common between each call.
Topic Freegemas - Open source Bejeweled clone By TheOm3ga Date 2010-07-17 23:24
Freegemas v0.3 is now available on Windows and Linux (and guess it works in Mac OS X as well), featuring time trial mode, ingame music and sound effects and more. Check it out at https://code.google.com/p/freegemas/
Topic Font Doesn't Draw As Expected By TheOm3ga Date 2010-07-17 23:22
Or you can pass 0 as the fontFlags parameter.
Topic Freegemas - Open source Bejeweled clone By TheOm3ga Date 2010-07-17 12:17
Thanks. Right now I'm filling the left part with a timer, a "get hint" button and a "restart" button. Classic stuff :D

> BTW: not many people have released/developed a C++ game on Linux. Did anything in Gosu get in your way? I guess my makefile is hopelessly buggy and inflexible? ;)


Not at all! The only thing that got in my way was not being able to load ttf files and hey, we made it work ;)

About the makefiles, many people (me included) find autotools really hard to use and you used it flawlessly. The ./configure && make then link libgosu.a has always worked for me very well. No problem here.
Topic Freegemas - Open source Bejeweled clone By TheOm3ga Date 2010-07-16 22:32
Hey.

I was bored last week and created Freegemas, an open source clone of the classic Bejeweled. It's written on C++ and obviously uses Gosu. It's a really small project, it's more like a rapid development exercise for me, because the main functionality and all of the graphics were built in pretty much one night.

This has also helped me to try Visual Studio (ver. 2005) for the first time, because I had never programmed on Windows before. I may say it has pleasantly suprised me, the auto-completion system is effing amazing, all the reference just a ctrl + space away. Also, forgetting about Makefiles for a couple of hours has been a great relief. However, the amount of configuration options is overwhelming, and sometimes there are weird errors only solvable by recreating the msvc project file from scratch..

In the googlecode repository you will find some videos and information about the project. I'm running out of ideas, so any suggestion will be greatly appreciated.

P.S.: I used Visual Studio 2005 because, the first time, I tried with Visual Studio 2010 and I was not able to link the library. The error I was getting was the same one they explained here.
Topic Gosu text consistency By TheOm3ga Date 2010-07-02 09:06
You rock!
Topic Workaround to use Custom Fonts in LINUX By TheOm3ga Date 2010-06-09 23:11
Hi,

I'm afraid I've found a bug. Take a look at the "g" letter:

[http://img824.imageshack.us/img824/2295/pantallazo.png]

The top image is using my customFont class, the bottom image is using the new Gosu::Font.

What happens?
When we use Font::draw, Gosu::Font::Impl::getChar is called. This method creates a bitmap (Font.cpp, line 59):

Bitmap bmp;
bmp.resize(charWidth, height);


Then, drawText is called. Depending on the font, drawText may call PangoRenderer's or SDLTTFRenderer's drawText.

The problem is that usually the surface created by SDLTTFRenderer.drawText has a bigger height than fontHeight. In my example, for instance, the height I passed as argument is 30, but the surface generated is 34 pixels tall, so the bottom pixels are cut off.

The only solution I've thought is checking if the bitmap is too small, and resizing it to fit the text; At TextUnix.cpp, line 235, I would add right before bmp.insert:

if(bmp.height() < temp.height()){
    bmp.resize(bmp.width(), temp.height());
}


so the height is enough to hold the text.
Topic Gosu text consistency By TheOm3ga Date 2010-06-09 22:04
Hello,

I've been chatting about this on IRC, but I think it's worth writing it on the forum as well.

I think Gosu::createText is almost perfect, but I don't understand why it's got no color argument. "Use Gosu::drawText, it does have color" you may say; the problem is that drawText draws on an already initialized Bitmap, and createText creates that bitmap, automatically resizing it to properly fit the text.

Of course, I can do:

Gosu::Bitmap b;
b.resize(Gosu::textWidth(text, font, fontHeight), fontHeight);
Gosu::drawText(b, text, x, y, color, font, fontHeight);


But that's three lines, and those three lines are literally the ones that appear in Gosu::createText (from Text.cpp, lines 312-314). Just adding a fifth parameter to Gosu::createText would do the trick.

On IRC it was also said that I could use createText and then colorize the created image using .draw. Yep, but I would have to clutter my draw event with color logic, and I think the proper place to choose the color is the creation.

What do you think?
Topic Different appearance of drawText and Gosu::Font By TheOm3ga Date 2010-06-09 20:21
O HAI,

Looks like drawing a text using drawText renders it differently than using a Gosu::Font. I've been looking at the code and, I think, it's because Gosu::Font doubles the height and then scales down the text, messing it up big time. For big texts may work properly, but small texts like menu items, scaling it down blurs the text, hence drawText is sharper.

In Font.cpp, line 73, there's a "    pimpl->height = fontHeight * 2; // Auto-AA! " statement. I guess that Auto-AA is some kind of trick to get auto antialiasing, but given that the new SDL_ttf engine that Gosu uses automatically anti aliases text, there's no need to use it.

To get the same appearance with drawText and Gosu::Font, you have to change in Font.cpp:

line 73: remove "* 2"
line 88: remove "/ 2"
line 101: remove "/ 2"
remove or comment out lines 107 and 108

That will do the trick ;)
Topic Workaround to use Custom Fonts in LINUX By TheOm3ga Date 2010-06-09 17:47
Really nice!! I don't know how you solved it (I'll take a look at the code), but my customFont class was giving me a segfault if I tried something like this:
void draw(){
  wstring a = L"Perro";
  fuente -> draw(a, 10, 10, 1., 1,1, Gosu::Color(0xffffffff));
  fuente -> draw(a, 10, 30, 1., 1,1, Gosu::Color(255, 255,0,0));
    }


But with your implementation it works! Thanks a lot.

Edit: I looked at the code and see how you did it. It's more or less the same I was doing as a workaround, nice.

By the way, could you implement in Gosu::Font that uses TTF_FontLineSkip? It would be really very useful, specially when using Gosu::createText, the lineSpacing argument could be automatically calculated.
Topic Workaround to use Custom Fonts in LINUX By TheOm3ga Date 2010-05-16 11:53
You can do what you want with the code, although some credit would be appreciated :D

About the project, I'm actually encouraging all of my mates to use Gosu instead of plain SDL for all of their projects. I think it's a huge step in comparison to using plain SDL. Sometimes people spend a lot of time dealing with SDL_Surfaces, SDL_Images, trying to create their own object oriented adaptation of SDL, instead of actually programming games. After being suffering SDL for all of these years, Gosu has been like a gift to me. I like it a lot.

My project is musical, but I haven't used Gosu's sound features yet, because I don't actually play any sounds (at least at this point of the project). I'm using PortAudio library to get the microphone input, the user has to play the recorder (flute). Then I analyse the input using FFT and calculate the sound pitch, to check if the user is playing the instrument properly. You can see it in action at http://www.youtube.com/watch?v=UU7YMdi-2bY
Topic [Gosu C++] Animation class By TheOm3ga Date 2010-05-16 02:20
I've been using an Animation class for my project that features dynamic movement with different types of easing. It's based on Robert Penner's easing equations [http://www.robertpenner.com/easing/], which have been broadly used for Flash development, and I think they work really well for games.

The way it works is very simple. You create an animation object, choosing the initial and final values, duration, type and initial delay of the animation. Then, in every iteration you call the update() method to update the position of the animation one frame at a time. You can retrieve the current position using getX and getY methods.

There are 8 types of animation so far:
    enum tipoAnim {tEaseInQuad, tEaseOutQuad, tEaseInOutQuad,
       tEaseInCubic, tEaseOutCubic, tEaseInOutCubic,
       tEaseInQuart, tEaseOutQuart, tEaseInOutQuart,
       tEaseOutBack, tLinear};


Example:
boost::scoped_ptr<Animacion> myAnim (new Animacion(initialX, initialY, finalX, finalY, duration, Animation::tipoAnim, delay));
myAnim -> update();
myImage -> draw(myAnim -> getX(), myAnim -> getY(), 1);


Source file: https://forja.rediris.es/plugins/scmsvn/viewcvs.php/trunk/animacion.cpp?root=cusl4-oflute&view=log
Header file: https://forja.rediris.es/plugins/scmsvn/viewcvs.php/trunk/animacion.h?root=cusl4-oflute&view=log

Hope you find it useful!
Topic Workaround to use Custom Fonts in LINUX By TheOm3ga Date 2010-05-16 02:06
Hey there.

I've been improving the customFont class, because it was giving me some segfaults from time to time. There had been some changes, so you should check it out. I think that performance is a little bit better now, but it could be definitely better. Also some doxygen comments have been added.

You can fetch it at
https://forja.rediris.es/plugins/scmsvn/viewcvs.php/trunk/customFont.h?root=cusl4-oflute&view=log

By the way, the class is part of my final degree project, it's a musical game called oflute. You can check it out (and svn checkout it, too ;) )  at http://oflute.wordpress.com/about/
Topic Workaround to use Custom Fonts in LINUX By TheOm3ga Date 2010-03-17 23:05
I'm improving the customFont class. Right now I've just added bold, italics and underline support. Also, latest SDL_ttf version features different types of pixel hinting and more.

I've attached a testcase for you to check it out. Just decompress it. In the same folder the program expects to find a gosu folder with a proper installation of gosu (check the makefile if you have doubts)
Attachment: testcase.tar.gz - Testcase for customFont class (198k)
Topic Workaround to use Custom Fonts in LINUX By TheOm3ga Date 2010-03-08 01:08
Ouch, looks like SDL ttf lacks the ability to use a already installed font. Too bad.
Topic Workaround to use Custom Fonts in LINUX By TheOm3ga Date 2010-03-08 00:32
The quality is really good. In fact, there are three different methods in SDL ttf, depending on the quality you need. In my class I'm using the best one, TTF_RenderUTF8_Blended. It's fully anti-aliased, with alpha channel support and all. Also, looks like SDL ttf offers some options like built-in outline.

BTW, I hadn't seen the attach button until I had already posted the message, but it's good to know it :)

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill