cmdfx 0.3.1
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
39
46
53int Sprite_setVelocityX(CmdFX_Sprite* sprite, double velocity);
54
61
68int Sprite_setVelocityY(CmdFX_Sprite* sprite, double velocity);
69
76
83int Sprite_setAccelerationX(CmdFX_Sprite* sprite, double acceleration);
84
91
98int Sprite_setAccelerationY(CmdFX_Sprite* sprite, double acceleration);
99
111
124
136
146
156
166
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:31