cmdfx 0.2.0
Lightweight game engine for your terminal
Loading...
Searching...
No Matches
motion.h
Go to the documentation of this file.
1
11#pragma once
12
13#include "cmdfx/core/sprites.h"
14
36
43
50int Sprite_setVelocityX(CmdFX_Sprite* sprite, double velocity);
51
58
65int Sprite_setVelocityY(CmdFX_Sprite* sprite, double velocity);
66
73
80int Sprite_setAccelerationX(CmdFX_Sprite* sprite, double acceleration);
81
88
95int Sprite_setAccelerationY(CmdFX_Sprite* sprite, double acceleration);
96
108
120
132
142
152
162
double Sprite_getAccelerationY(CmdFX_Sprite *sprite)
Gets the Y acceleration of a sprite.
int Sprite_setAccelerationY(CmdFX_Sprite *sprite, double acceleration)
Sets the Y acceleration of a sprite.
double Sprite_getVelocityY(CmdFX_Sprite *sprite)
Gets the Y velocity of a sprite.
int Sprite_isAboutToCollide(CmdFX_Sprite *sprite1, CmdFX_Sprite *sprite2)
Whether a sprite is about to collide with another sprite.
double * Sprite_getMotion(CmdFX_Sprite *sprite)
Gets the motion array of a sprite.
void Engine_applyMotion(CmdFX_Sprite *sprite)
Applies the motion of a sprite.
void Engine_enableMotionDebug()
Enables motion debugging.
int Sprite_setVelocityX(CmdFX_Sprite *sprite, double velocity)
Sets the X velocity of a sprite.
int Sprite_setVelocityY(CmdFX_Sprite *sprite, double velocity)
Sets the Y velocity of a sprite.
CmdFX_Sprite ** Sprite_getAboutToCollideSprites(CmdFX_Sprite *sprite)
Gets all of the sprites the sprite is about to collide with.
double Sprite_getVelocityX(CmdFX_Sprite *sprite)
Gets the X velocity of a sprite.
int Sprite_setAccelerationX(CmdFX_Sprite *sprite, double acceleration)
Sets the X acceleration of a sprite.
double Sprite_getAccelerationX(CmdFX_Sprite *sprite)
Gets the X acceleration of a sprite.
void Engine_disableMotionDebug()
Disables motion debugging.
int Sprite_resetAllMotion(CmdFX_Sprite *sprite)
Resets all motion of a sprite.
int Engine_isMotionDebugEnabled()
Whether motion debugging is enabled.
Sprites API for CmdFX.
Represents a sprite that can be drawn to the terminal.
Definition sprites.h:30