[OSlib] Few questions

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
nDEV
Posts: 48
Joined: Fri Apr 13, 2007 1:26 am

[OSlib] Few questions

Post by nDEV »

Hello!
Im using this great library to write a small game, and now its time to create a few animated characters but i have no idea how to do it in oslib.
What i want is to create animations at a given position.
For example:

void make_anime(int x,int y)
{

c = new animation(x,y)
return...
}

Any ideas how to do it?

Also , what's the use of centerX & Y?


Thanks.
nDEV
Posts: 48
Joined: Fri Apr 13, 2007 1:26 am

Post by nDEV »

bump
Yodajr
Posts: 13
Joined: Sat Sep 24, 2005 7:04 pm

Post by Yodajr »

Animations ? try this : http://www.playeradvance.org/forum/show ... php?t=2178
(it is in french, but easy to understand with google translation)

CenterX & Y defines the center of the image. By default, they are at the upper left corner of the image.
If you try to rotate the image for example, the image will rotate around his center... try, you will understand.
Tutorials about OSLib here
nDEV
Posts: 48
Joined: Fri Apr 13, 2007 1:26 am

Post by nDEV »

Thanks , " oslSetImageTileSize" is what i need.
But still , i have no idea how to create a new image each time....any ideas?
Yodajr
Posts: 13
Joined: Sat Sep 24, 2005 7:04 pm

Post by Yodajr »

What you don't understand in the tuto ?
Tutorials about OSLib here
nDEV
Posts: 48
Joined: Fri Apr 13, 2007 1:26 am

Post by nDEV »

Well , i can do the animation , but i need to create a new object every time..

For example :

Each time one enemy is about to die i want to play the animation at his current position(i know how to this) , but the problem is that each time i kill an enemy the animation will just keep moving at different positions.
So , i need a way to create a new animation every time..!!
Yodajr
Posts: 13
Joined: Sat Sep 24, 2005 7:04 pm

Post by Yodajr »

Sorry, I can't help you, I do not understand what you want :/
Tutorials about OSLib here
nDEV
Posts: 48
Joined: Fri Apr 13, 2007 1:26 am

Post by nDEV »

What i want is to create a new instance of the object dynamically


Ce que je veux doit créer un nouvel exemple de l'objet dynamiquement(by babel fish)
Post Reply