Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef _GLOBALS_HPP
- #define _GLOBALS_HPP
- #include <kit/all.hpp>
- #include <kit/xmp_sfx.hpp>
- #define WINDOW_TITLE "platformer prototype"
- #define CANVSIZ_X 512
- #define CANVSIZ_Y 288
- //gl_ as in global, not opengl
- extern kit::TimerSimple* gl_frameTimer;
- extern kit::SoundEngine* gl_snd;
- extern kit::Window* gl_win;
- extern kit::BitmapFont* gl_text;
- extern kit::FStr* _gl_text_fstr;
- #define gl_textf(_x, _y, _fmt, _maxLen, ...) \
- gl_text->print((_x), (_y), _gl_text_fstr->fmt(_fmt, __VA_ARGS__), (_maxLen))
- //
- extern kit::Bitmap* gl_spritesheetPlayer;
- #define GRAVITY (0.0175f)
- #define PLAYER_JUMP_STRENGTH (2.0f)
- #define PLAYER_JUMP_CANCEL (0.33f) //multiplier of vel.y when canceling a jump while ascending
- #define PLAYER_SPEED (0.020f)
- #define PLAYER_SCALE (2.0f)
- #define PLAYER_HALF ( (s32)((8*PLAYER_SCALE)/2) ) //half of the character's size, in pixels
- #define PLAYER_NEUTRAL (0.1f) //'what +/- range should be considered neutral for vel/acc'
- #define PLAYER_AIR_FRICTION (0.5f) //multiplier for acc.x when in mid-air
- #define PLAYER_GND_FRICTION (1.0f) //multiplier of PLAYER_SPEED for on-ground deceleration
- #define PLAYER_RUN_MUL (0.075f) //vel.x's multiplier when adding to runningState
- #endif /* _GLOBALS_HPP */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement