Physics-Simulator  v1.4.0-beta.2
core Namespace Reference

Functions

void fireRandom (void)
 
char handleEvent (SDL_Event *)
 
int findSelectedBall (LOC)
 
void doFireTool (SDL_Event *)
 
void doDeleTool (SDL_Event *)
 
void doDragTool (SDL_Event *)
 
void doDropTool (SDL_Event *)
 
void doInfoTool (SDL_Event *)
 
void doRopeTool (SDL_Event *)
 

Variables

clsToolbar toolbar
 
clsTick tick
 
clsScreen cannonwindow
 
LOC oldmouse = {0,0}
 
LOC currentmouse = {0,0}
 
bool holding = false
 

Function Documentation

◆ doDeleTool()

void core::doDeleTool ( SDL_Event *  e)

Function for the delete tool

Parameters
e= SDL_event passed through handle event
Here is the call graph for this function:

◆ doDragTool()

void core::doDragTool ( SDL_Event *  e)

Function for the drag tool

Parameters
e= SDL_event passed through handle event
Here is the call graph for this function:

◆ doDropTool()

void core::doDropTool ( SDL_Event *  e)

Function for the drop tool

Parameters
e= SDL_event passed through handle event
Here is the call graph for this function:

◆ doFireTool()

void core::doFireTool ( SDL_Event *  e)

Function for the fire tool

Parameters
e= SDL_event passed through handle event
Here is the call graph for this function:

◆ doInfoTool()

void core::doInfoTool ( SDL_Event *  e)

Function for the info tool

Parameters
e= SDL_event passed through handle event
Here is the call graph for this function:

◆ doRopeTool()

void core::doRopeTool ( SDL_Event *  e)

Function for the rope tool

Parameters
e= SDL_event passed through handle event
Here is the call graph for this function:

◆ findSelectedBall()

int core::findSelectedBall ( LOC  mouseplace)

Finds the ball that was clicked on.

Parameters
mouseplace= Where the mouse clicked
Returns
int = id of the ball selected

◆ fireRandom()

void core::fireRandom ( void  )

Causes cannonballs to be fired randomly

Here is the call graph for this function:

◆ handleEvent()

char core::handleEvent ( SDL_Event *  e)

Checks an SDL event to see what the program should do.

Parameters
e= Pointer to the event that happened.
Returns
char for what main should do.
Here is the call graph for this function:

Variable Documentation

◆ cannonwindow

clsScreen core::cannonwindow

◆ currentmouse

LOC core::currentmouse = {0,0}

◆ holding

bool core::holding = false

◆ oldmouse

LOC core::oldmouse = {0,0}

◆ tick

clsTick core::tick

◆ toolbar

clsToolbar core::toolbar