dos-vga-arena-shooter-game/const.h

86 lines
2.1 KiB
C
Raw Normal View History

#ifndef __CONST_H__
#define __CONST_H__
#include "system/vga.h"
2024-02-20 17:51:59 +00:00
#define TILE_SIZE (20)
2024-02-21 13:25:55 +00:00
#define ARENA_WIDTH_TILES (10)
#define ARENA_HEIGHT_TILES (10)
2024-02-25 20:48:19 +00:00
#define COLLISION_GRID_SIZE (ARENA_WIDTH_TILES / 2 * TILE_SIZE)
2024-02-21 13:25:55 +00:00
#define MOUSE_DISTANCE (32)
#define RABBIT_MOTION_DRAG (2)
#define RABBIT_MOTION_ACCELERATION (5)
2024-03-01 12:55:01 +00:00
#define RABBIT_MOTION_MAX_SPEED (10)
2024-02-21 13:25:55 +00:00
#define RABBIT_MOTION_VELOCITY_DECAY (5)
2024-02-27 01:40:05 +00:00
#define RABBIT_BULLET_LIMIT (9)
2024-02-25 21:59:04 +00:00
#define RABBIT_BULLET_VELOCITY ((RABBIT_MOTION_ACCELERATION / 2) + 1)
2024-02-21 13:25:55 +00:00
#define RABBIT_BULLET_COOLDOWN (10)
#define RABBIT_BULLET_HEIGHT_START (8)
2024-02-27 01:40:05 +00:00
#define RABBIT_BULLET_SHOTGUN_SPREAD (15)
2024-02-26 12:52:59 +00:00
#define RABBIT_HEALTH_MAX (100)
2024-02-21 13:25:55 +00:00
#define MOUSE_LIMIT_TOP (TILE_SIZE)
#define MOUSE_LIMIT_BOTTOM ((ARENA_HEIGHT_TILES - 1) * TILE_SIZE - 1)
#define MOUSE_LIMIT_LEFT (TILE_SIZE)
#define MOUSE_LIMIT_RIGHT ((ARENA_WIDTH_TILES - 1) * TILE_SIZE - 1)
2024-02-20 17:51:59 +00:00
#define RAD2DEG (180/3.14159)
#define DEG2RAD (3.14159/180)
#define ENEMY_MAX_COUNT (50)
2024-02-26 23:12:39 +00:00
#define ENEMY_BULLET_LIMIT (ENEMY_MAX_COUNT / 4)
2024-02-25 21:59:04 +00:00
#define ENEMY_MOVE_SPEED (1)
#define ENEMY_MOVE_DELAY (3)
#define ENEMY_BULLET_VELOCITY (RABBIT_BULLET_VELOCITY - 2)
2024-02-26 23:12:39 +00:00
#define ENEMY_FIRE_MIN_DELAY (45)
2024-02-26 12:52:59 +00:00
#define ENEMY_FIRE_VARIABLE_DELAY (60)
2024-02-26 23:12:39 +00:00
#define ENEMY_BULLET_DAMAGE (3)
#define ENEMY_COLLISION_DAMAGE (6)
2024-02-26 12:52:59 +00:00
#define ENEMY_KILL_HEALTH_GAIN (1)
2024-02-26 23:12:39 +00:00
#define ENEMY_HIT_POINT_DIFFICULTY_INCREASE_EVERY (4)
2024-02-25 21:59:04 +00:00
#define BASE_ENEMY_SPAWN_COOLDOWN (30)
2024-02-26 12:52:59 +00:00
#define DIFFICULTY_SPAWN_COOLDOWN_REDUCTION (2)
2024-02-25 21:59:04 +00:00
#define MINIMUM_ENEMY_SPAWN_COOLDOWN (3)
#define VARIABLE_ENEMY_SPAWN_COOLDOWN (10)
2024-02-27 13:16:16 +00:00
#define POWERUP_RESPAWN_COOLDOWN_PER_LEVEL (10)
#define SHOTGUN_ROUNDS_PER_LEVEL (25)
2024-03-01 12:55:01 +00:00
#define MAX_DIFFICULTY (20)
#define BASE_KILLS (10)
#define KILLS_NEEDED_FOR_NEXT_LEVEL_MULTIPLIER (2.1)
#define WEAPON_TYPE_SINGLE_SHOT_GUN (0)
#define WEAPON_TYPE_SPREAD_SHOT_GUN (1)
#define POWERUP_TYPE_SHOTGUN (0)
#define POWERUP_TYPE_SHIELD_KILLER (1)
#define KNOCKBACK_DISTANCE (3)
extern int difficultyBands[];
2024-03-01 12:55:01 +00:00
extern int hitPointRanges[MAX_DIFFICULTY][4];
extern struct SpriteBounds bounds;
extern struct CompiledSpriteRender rabbit,
mouse,
bullet,
enemy,
enemyBullet,
shotgun,
shieldKiller;
2024-03-01 12:55:01 +00:00
void buildDifficultyBands();
void buildHitPointRages();
#endif