-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
51 lines (43 loc) · 1.29 KB
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include <stdio.h>
#include <stdlib.h>
#include "funcs/init.h"
#include "funcs/event.h"
#include "funcs/motion.h"
#include "funcs/renderer.h"
int main(int argc, const char **argv)
{
if (!init())
{
printf("SYSTEM INIT FAILED!\n");
}
else
{
int granules = 20;
SDL_Texture *space;
// Set Target
space = fixedSpace(WINDOW_WIDTH, WINDOW_HEIGHT, SDL_PIXELFORMAT_RGBA8888);
setTarget(space);
// all paintings
SDL_SetRenderDrawColor(render, 137, 255, 48, 255);
drawSpace(granules);
//---Computer Graphic Experiment Homework---//
//******************************************//
// drawCircle(render, 200, 200, 100, 1);
// drawTriangle();
// drawSideFilling();
// TranslationTransformation(400, 0);
// RotationTransformation(18);
// positiveLeafLine();
// view texture space for graphic experiment
// viewSpace(space);
//******************************************//
// ---------------------------------- //
// drawRects(Rects, TotalRectsSubPos);
// ---------------------------------- //
// Clear Target
setTarget(NULL);
// drawFlower();
eventLoop(space, granules);
}
return 0;
}