dos-vga-arena-shooter-game/game.c

39 lines
955 B
C

#include "vga.h"
#include "keyboard.h"
#include "mouse_io.h"
struct VGAColor colors[4] = {
{ 0, 0, 0 }, { 255, 255, 255 }, { 255, 0, 0 }, { 0, 0, 255 }
}
int main(void) {
int keepRunning = 1;
struct MouseStatus mouseStatus;
installKeyboardHandler();
activateMouse(&mouseStatus);
while (keepRunning) {
}
// states:
// * main menu
// * play
// * quit
// * play
// * draw base map
// * draw sidebar
// * Game loop
// * get mouse
// * get keyboard
// * set character position
// * check for enemy spawn and spawn enemy if needed
// * check for character firing and able to fire, spawn bullet if allowed
// * check for each enemy firing and able to fire, spawn enemy bullet if allowed
// * check for bullet collisions
// * enemies are destroyed
// * character is damaged
// * check for bullets hitting the edges of the screen and remove
// *
}