IOCT Masters in Creative Technogies
Major Project
An augmented reality game based on "Breakout"

Tuesday 22 July 2008

Separating the code

Having all of the code for the game in one file was making working on the file difficult, especially when trying to find certain sections of the code. I have created a header file, which is then called by each of the other .c files, allowing them to compile.

The header file includes:
  • Libraries and includes
  • Define constants
  • Structures
  • Global variables
  • Game items
  • Image
  • Function prototypes











The code has been separated into suitable sections, with the .c files including:
  • Breakout_v3.c
  • Breakout_v3.h
  • Collision_Detection.c
  • Drawing.c
  • High_Score.c
  • Levels.c
  • Sound.c