-
Notifications
You must be signed in to change notification settings - Fork 9
Engine Class
Stores the passed in values for use later when initializing the window. The height and width are set with the window and will make a full screen window.
Stores the passed in values for use later when initializing the window.
Cleans up the window and the graphics.
Builds the window and starts the graphics.
Begins an infinite loop that will
- grab the time change
- check for an SDL_Event
- update the graphics
- render the graphics
- swap out the window frame
Ends when m_running is set to false.
This will read the m_event to determine what what the event to process. At this point it only works with exiting.
Gets the difference in time from m_currentTimeMillis to current time.
Uses the sys/time.h gettimeofday() function to grab the current time and turns it into a long long.
The window of the program.
Name of the window.
Width of the window.
Height of the window.
Any SDL event is save in the m_event;
The graphics part of the program.
The updated change in time.
Stores the previous time.
Used to kill the infinite loop. Only set on the exit of the window or escape key hit.
The setup of this may need to change when incorporating new input logic.

.png)