Space Type 1.0
A retro typing trainer, test and game set in space
Loading...
Searching...
No Matches
spacetype_test.c File Reference

Test Mode of Space Type. More...

This graph shows which files directly or indirectly include this file:

Functions

void test ()
 main function for test mode
 
void test_menu ()
 main menu for test screen
 
void test_process (char test_text[])
 Handles the typing test process.
 

Variables

Passages for Test mode
char text1 [300] = {"Wealth, fame, power. Gold Roger, the King of the Pirates, attained everything this world has to offer. And so, many men head for the Grand Line to find the great treasure he left behind, the One Piece. The world has truly entered a Great Pirate Era!"}
 Passages for Test Mode.
 
char text2 [381] = {"The Tale of Jiraiya the Gallant. Now it'll end a bit better, I hope. The final chapter. I'll call it: Frog at the bottom of the well drifts off into the great ocean. Just barely glorious. But glorious indeed. Now I suppose it's about time I put down my pen. Oh, right. What should I name the sequel? I wonder. Let's see: The Tale of Naruto Uzumaki. Yes, that has a nice ring to it."}
 
char text3 [450] = {"A late 20th century trend in typing, primarily used with devices with small keyboards (such as PDAs and Smartphones) is thumbing or thumb typing. This can be accomplished using one or both thumbs. Similar to desktop keyboards and input devices, if a user overuses keys which need hard presses and/or have small and unergonomic layouts, it could cause thumb tendonitis or other repetitive strain injury."}
 
char text4 [450] = {"Today, historians relate that, as a general rule, buying and selling securities was very much unorganized before the year 1792. Every person who owned a security faced the problem of finding interested buyers who might consider the purchase of a debt-free investment. This meant most people were somewhat slow in investing in stocks and bonds because these securities could not readily be converted into money."}
 
char text5 [287] = {"The Master of Business Administration (MBA or M.B.A.) degree originated in the United States. The core courses in an MBA program cover various areas of business such as accounting, applied statistics, business law, finance, managerial economics, management, entrepreneurship & marketing."}
 
char text6 [438] = {"When we talk about motivating others, the justification is the end result (either we want to avoid the pain or go towards pleasure) or what we want to get the person to do. How we achieve the end result, are our alternatives. As a manager, we need to understand the other person's justification and then come up with alternatives. We may then choose the right alternative. Typically people stop at this level of analysis and start to act."}
 
char text7 [456] = {"A data entry clerk is a member of staff employed to enter or update data into a computer system. Data is often entered into a computer from paper documents using a keyboard. The keyboards used can often have special keys - Alt, Ctrl, Fn, Shift - multiple colors to help in the task & speed up the work. Proper ergonomics at the workstation is a common topic considered. The Data Entry Clerk may also use a mouse, and a manually-fed scanner may be involved."}
 
char text8 [530] = {"An ever-growing number of complex rules plus hard-to-cope-with regulations are now being legislated from state to state. Key federal regulations were formulated by the FDA, FTC, and the CPSC. Each of these federal agencies serves a specific mission. One example: Laws sponsored by the Office of the Fair Debt Collection Practices prevent an agency from purposefully harassing clients in serious debt. The Fair Packaging and Labeling Act makes certain that protection from misleading packaging of goods is guaranteed to each buyer."}
 
char text9 [400] = {"Business casual is an ambiguously defined Western dress code that is generally considered casual wear but with smart (in the sense of 'well dressed') components of a proper lounge suit from traditional informal wear, adopted for white-collar workplaces. This interpretation typically including dress shirt, necktie, & trousers, but worn with an odd-colored blazer or a sports coat instead."}
 
char text10 [520] = {"Many touch typists also use keyboard shortcuts or hotkeys when typing on a computer. This allows them to edit their document without having to take their hands off the keyboard to use a mouse. An example of a keyboard shortcut is pressing the Ctrl key + the S key to save a document as they type, or the Ctrl key + the Z key to undo a mistake. Many experienced typists can feel or sense when they have made an error & can hit the Backspace key & make the correction with no increase in time between keystrokes."}
 
Extern variables from main

different variables initialized before needed for this portion

Music music
 background music
 
int screenWidth
 screen width for graphical operations
 
int screenHeight
 screen height for graphical operations
 
Font retroFont
 
Font regularFont
 
Texture2D cockpitTexture
 
Texture2D cockpitTextureKeyboard
 Textures for background.
 
General variables for Test process
bool exitTest
 
bool exitTestProcess
 
char input [550] = {}
 
int check
 

Detailed Description

Test Mode of Space Type.

Author
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

◆ test()

void test ( )

main function for test mode

Initializes the background texture, continues the background music, draws the background and calls test_menu function for further navigation

Here is the call graph for this function:

◆ test_menu()

void test_menu ( )

main menu for test screen

Draws the menu for the test mode. Gives the user the option to choose the difficulty that they want their test to be in.

Here is the call graph for this function:

◆ test_process()

void test_process ( char  test_text[])

Handles the typing test process.

This function divides the large text into smaller parts, and displays it on the screen to make it easier for the user. Gets the key pressed by the user, checks with the letter from the text, and highlights if its correct. The second part of the text only displayed once the displayed part is enterred correctly. Statistics like typing speed, accuracy are shown at the end.

Parameters
test_textIndicates which passage is to be displayed
Here is the call graph for this function:

Variable Documentation

◆ cockpitTextureKeyboard

Texture2D cockpitTextureKeyboard

Textures for background.

Background Texture.

◆ text1

char text1[300] = {"Wealth, fame, power. Gold Roger, the King of the Pirates, attained everything this world has to offer. And so, many men head for the Grand Line to find the great treasure he left behind, the One Piece. The world has truly entered a Great Pirate Era!"}

Passages for Test Mode.

These string contains various texts of varying difficulty and types for the test mode.