1233
This commit is contained in:
		
							parent
							
								
									b0199eed16
								
							
						
					
					
						commit
						a7fcc59ecd
					
				@ -1,10 +1,9 @@
 | 
				
			|||||||
CC=gcc
 | 
					CC=gcc
 | 
				
			||||||
CFLAGS=-Wall -std=c99
 | 
					CFLAGS=-Wall -std=c99 -g
 | 
				
			||||||
 | 
					OBJS=main.o game.o world.o
 | 
				
			||||||
 | 
					
 | 
				
			||||||
all: game
 | 
					game: $(OBJS)
 | 
				
			||||||
 | 
						$(CC) $(CFLAGS) $(OBJS) -lncurses -o game
 | 
				
			||||||
game: main.o game.o world.o
 | 
					 | 
				
			||||||
	$(CC) $(CFLAGS) -o game main.o game.o world.o -lncurses
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
main.o: main.c game.h world.h
 | 
					main.o: main.c game.h world.h
 | 
				
			||||||
	$(CC) $(CFLAGS) -c main.c
 | 
						$(CC) $(CFLAGS) -c main.c
 | 
				
			||||||
 | 
				
			|||||||
@ -1,13 +1,13 @@
 | 
				
			|||||||
#ifndef _WORLD_H_
 | 
					#ifndef _WORLD_H_
 | 
				
			||||||
#define _WORLD_H_
 | 
					#define _WORLD_H_
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <curses.h>
 | 
					#include <ncurses.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * World represented as a rectangular matrix of colorful characters.
 | 
					 * World represented as a rectangular matrix of colorful characters.
 | 
				
			||||||
 * 
 | 
					 *
 | 
				
			||||||
 * Point [0,0] is displayed the upper left corner of the screen.
 | 
					 * Point [0,0] is displayed the upper left corner of the screen.
 | 
				
			||||||
 * 
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
enum event_type {
 | 
					enum event_type {
 | 
				
			||||||
@ -67,7 +67,7 @@ struct event {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Sets cell to a state.
 | 
					 * Sets cell to a state.
 | 
				
			||||||
 * @param event 
 | 
					 * @param event
 | 
				
			||||||
 * @param x coordinate of cell
 | 
					 * @param x coordinate of cell
 | 
				
			||||||
 * @param y coordinate of cell
 | 
					 * @param y coordinate of cell
 | 
				
			||||||
 * @param new state of the cell
 | 
					 * @param new state of the cell
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user