Space Type 1.0 A retro typing trainer, test and game set in space

Loading...
Searching...
No Matches
Functions
main.c File Reference

Main application file of Space Type. More...

`#include "spacetype_game.h"`
`#include "spacetype_game.c"`
`#include "spacetype_train.h"`
`#include "spacetype_train.c"`
`#include "spacetype_test.h"`
`#include "spacetype_test.c"`
Include dependency graph for main.c:

## Functions
int | main ()
| Main function of the application.
void | draw_menu ()
| Draws main menu for the application.

## Variables
Main application variables
FILE * | wrongChars
| To store mispressed characters to use in customized train mode.
int | screenWidth
| screen width for graphical operations
int | screenHeight
| screen height for graphical operations
bool | exitWindow = false
| To govern main application loop.
bool | exitGame = false
| To govern game mode loop.
bool | sorted
| to check if the WrongChars.txt is sorted or not
Main interface variables
Different textures for the main screen and hover, and other graphical components.
Texture2D | cockpitTexture
| Background Textures.
Texture2D | cockpitTextureTrain
Texture2D | cockpitTextureTest
Texture2D | cockpitTextureGame
Texture2D | cockpitTextureExit
| Main menu textures.
Font | retroFont
Font | regularFont
| Main application fonts.
Texture2D | qwertyTexture
| keyboard image for tutorial screen

## Detailed Description

Main application file of Space Type.

retro-interface typing trainer and game to help boost your typing speed. This project takes its inspration from Typeshala, Ztype and aims for the feels similar to retro-console space games like Space Invadors. SPDX-License-Identifier: LGPL-2.1-or-later

Author
  Praharsha Adhikari 078bc.nosp@m.t061.nosp@m..prah.nosp@m.arsh.nosp@m.a@pca.nosp@m.mpus.nosp@m..edu..nosp@m.np
  Mukunda Dev Adhikari 078bc.nosp@m.t049.nosp@m..muku.nosp@m.nda@.nosp@m.pcamp.nosp@m.us.e.nosp@m.du.np
  Pragalbha Acharya 078bc.nosp@m.t060.nosp@m..prag.nosp@m.albh.nosp@m.a@pca.nosp@m.mpus.nosp@m..edu..nosp@m.np

Bug:
  : No known Bug.

## Function Documentation

## ◆ draw_menu()

void draw_menu | ( |  | ) |

Draws main menu for the application.

Draws the main menu of the application by loading the cockpitTexture with mouse control for navigation. Has indicators for hover and mouse click calls the respective function associated with the menu entry.

Here is the call graph for this function:

## ◆ main()

int main | ( |  | ) |

Main function of the application.

Initializes Screen and audio device. Loads music, fonts and textures. Plays the music, calls the respective function to draw the background and menu.

Here is the call graph for this function: