Skip to content

MitchellShibilski-Unkel/MEngine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 

Repository files navigation

Documentation


Categories

  1. Begin (https://github.com/MitchellShibilski-Unkel/MEngine/blob/main/README.md#how-to-begin)
  2. Draw:
    a. Rectangles (https://github.com/MitchellShibilski-Unkel/MEngine/blob/main/README.md#drawing-rectangles)
    b. Lines (https://github.com/MitchellShibilski-Unkel/MEngine/blob/main/README.md#drawing-lines)

How To Begin

  1. Write the int main(int argc, char* argv[] loop
  2. Then, inside the loop, call MEngine and create a window by using __call_name__.createWindow(string title, int width, int height, boolean fullscreen, boolean resizable)
  3. Finally, write the rest function __call_name__.restRender() first, and then the show render __call_name__.showRender() and update functions __call_name__.updateRender(boolean run) in that order. *NOTE: You will be putting all your game assets that you want to render between the rest and show render function.

Drawing Rectangles

Between the rest and show render functions, use your call varaible to call the .drawRectangle(int (x, y), int width, int height, int r, int g, int b, boolean showOutlineOnly) function.

EXAMPLE:
int pos[2] = { 50, 50 };
screen.drawRectangle(pos, 50, 50, 155, 155, 155, false);


Drawing Lines

Between the rest and show render functions, use your call varaible to call the .drawLine(int point1 (x, y), int point2 (x, y), int r, int g, int b) function.

EXAMPLE:
int pos[2] = { 50, 50 };
int pos2[2] = { 100, 100 };
screen.drawRectangle(pos, pos2, 155, 155, 155);