|
Space Type 1.0
A retro typing trainer, test and game set in space
|
Word and Letter Typing train mode. More...

Functions | |
| void | train () |
| main function for train mode | |
| void | train_menu () |
| main menu for train screen | |
| void | mode_trainletters () |
| Letter Train sub menu. | |
| void | mode_trainwords () |
| Word Train sub menu. | |
| void | letter_train () |
| Handles processes regarding training typing letters. | |
| void | word_train () |
| Handles processes regarding training typing words. | |
| void | customized_train () |
| Handles processes regarding cuztomized train mode. | |
| void | train_select () |
| Option menu for choosing rows for both letter mode and word mode. | |
| void | select_letter () |
| function which selects letter to display for letter train process | |
| void | select_word () |
| function which selects words to display for word train process | |
Variables | |
Letter Train variables | |
3 character arrays to store characters of respective keyboard rows. | |
| char | TopRowLetters [10] = {'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p'} |
| char | MiddleRowLetters [9] = {'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l'} |
| char | BottomRowLetters [7] = {'z', 'x', 'c', 'v', 'b', 'n', 'm'} |
| char | RequiredLetter |
| Stores letter which will be displayed in Letter Train process. | |
Word Train variables | |
List of Words from toprow, middlerow and bottomrow to choose from when selecting word | |
| char | TopRowWords [][10] = {"queer", "wrought", "erode", "trope", "troupe", "youth", "utopia", "irony", "outhouse", "power"} |
| char | MiddleRowWords [][10] = {"lad", "slade", "glass", "fade", "grade", "hall", "jade", "klaus", "lathe"} |
| char | BottomRowWords [][10] = {"zoner", "xerox", "change", "vought", "broom", "noob", "mooncover"} |
| char * | customizedWords [] |
| char | RequiredWord [10] |
Boolean to control different modes and screen | |
Different booleans to control training process and also to indicatet which row is chosen for respective train modes | |
| bool | exitTrainWords |
| bool | exitTrainLetters |
| bool | MiddleRow |
| bool | TopRow |
| bool | BottomRow |
| bool | exitTrainProcess |
| bool | letterinput |
| bool | exitTrain |
| bool | trainMode |
| bool | wordinput |
| bool | exitResult |
Extern variables from main | |
different variables initialized before that were needed for this portion | |
| Music | music |
| background music | |
| int | screenWidth |
| screen width for graphical operations | |
| int | screenHeight |
| screen height for graphical operations | |
| Font | retroFont |
| Texture2D | cockpitTexture |
| Background Textures. | |
| Texture2D | cockpitTextureKeyboard |
| Background Texture. | |
| char | wordStored [20] |
| stores the presented word to later compare with fastestword and slowestword | |
Word and Letter Typing train mode.
| void customized_train | ( | ) |
Handles processes regarding cuztomized train mode.
This function is a child of word_train. So, it does everything the word_train does but the words it provides to train you are customized and contains the letters that you have typed wrong the most. It is done by storing wrongly typed letters and comparing them with the letters in the word that will be displayed.

| void letter_train | ( | ) |
Handles processes regarding training typing letters.
The function that handles resetting of variables by calling reset_counter, and contains the loop which selects the new letter (using select_letter) and a nested loop to check if the input letter matches with the displayed one.

| void mode_trainletters | ( | ) |
Letter Train sub menu.
function that handles lettere practice mode. Clears all boolean relatetd rows and train loops and calls the function which draws selection menu for rows.

| void mode_trainwords | ( | ) |
Word Train sub menu.
The function that handles words practice mode. Clears all boolean relatetd rows and train loops and calls the train_select function which draws selection menu for rows.

| void select_letter | ( | ) |
function which selects letter to display for letter train process
letter using the the three choices, random number generator and a switch case based on the choice and number generated. Stores that letter in RequiredLetter.
| void select_word | ( | ) |
function which selects words to display for word train process
Selects a word using the the three choices, random number generator and a switch case based on the choice and number generated. Stores that word in RequiredWord.
| void train | ( | ) |
main function for train mode
the background texture, continues the background music and calls train_menu function for further navigation

| void train_menu | ( | ) |
main menu for train screen
Draws the menu for the train mode. Gives the user the option to choose between practicing letters or practicing words.

| void train_select | ( | ) |
Option menu for choosing rows for both letter mode and word mode.
This function generates the option menu for the user to choose the rows that he wants to practice. Checkbox indicator are present to indicate the rows chose. letter_train or word_train are called based on the user's previous selection

| void word_train | ( | ) |
Handles processes regarding training typing words.
The function that handles resetting of variables by calling reset_counter, and contains the loop which selects the new word (using select_word) and a nested loop which ends when the user has finished enterring the word. It calls remove_firstletter each time the letter input matches the letter displayed. Once the user chooses to leave the train process, by pressing ESC, a stats screen is displayed which shows their WPM, fastest word, slowest word, etc.

|
extern |
Background Texture.
Background Texture.
| char* customizedWords[] |