Render fixes + performance boost
This commit is contained in:
+5
-5
@@ -45,7 +45,7 @@ int menu_staticRender(void){
|
||||
running = false;
|
||||
}
|
||||
|
||||
RenderObject_t backgroundImage;
|
||||
RenderObject_t backgroundImage = EMPTY_RENDER_OBJECT;
|
||||
strcpy(backgroundImage.name, "BackgroundImg");
|
||||
backgroundImage.z = 0;
|
||||
backgroundImage.surface = backgroundImageSurface;
|
||||
@@ -54,14 +54,14 @@ int menu_staticRender(void){
|
||||
menuObjects[menuObjectsSize] = scene_addRenderObject(&menuScene, backgroundImage, 0, 0);
|
||||
++menuObjectsSize;
|
||||
|
||||
RenderObject_t legendOfAdam;
|
||||
RenderObject_t legendOfAdam = EMPTY_RENDER_OBJECT;
|
||||
strcpy(legendOfAdam.name, "TheLegendOfA");
|
||||
SDL_Color white = {255, 255, 255, 255};
|
||||
text_renderText(&legendOfAdam, 9, 1.f, white, "./assets/fonts/Quinquefive.ttf", 48, "The legend of adame");
|
||||
menuObjects[menuObjectsSize] = scene_addRenderObject(&menuScene, legendOfAdam, CAMERA_WIDTH * 0.095f, CAMERA_HEIGHT * 0.2f);
|
||||
++menuObjectsSize;
|
||||
|
||||
RenderObject_t shadowOfAdam;
|
||||
RenderObject_t shadowOfAdam = EMPTY_RENDER_OBJECT;
|
||||
strcpy(legendOfAdam.name, "shadowOfAdam");
|
||||
SDL_Color black = {0, 0, 0, 255};
|
||||
text_renderText(&legendOfAdam, 8, 1.f, black, "./assets/fonts/Quinquefive.ttf", 48, "The legend of adame");
|
||||
@@ -91,14 +91,14 @@ int menu_render(float delta){
|
||||
blinkDelta = 0;
|
||||
}
|
||||
|
||||
RenderObject_t startTextShadow;
|
||||
RenderObject_t startTextShadow = EMPTY_RENDER_OBJECT;
|
||||
strcpy(startTextShadow.name, "StartTextShadow");
|
||||
SDL_Color black = {0, 0, 0, textOpacity};
|
||||
text_renderText(&startTextShadow, 9, 1.f, black, "./assets/fonts/Quinquefive.ttf", 28, "Press space to start");
|
||||
menuObjects[menuObjectsSize] = scene_addRenderObject(&menuScene, startTextShadow, CAMERA_WIDTH * 0.245f, CAMERA_HEIGHT * 0.855f);
|
||||
++menuObjectsSize;
|
||||
|
||||
RenderObject_t startText;
|
||||
RenderObject_t startText = EMPTY_RENDER_OBJECT;
|
||||
strcpy(startText.name, "StartText");
|
||||
SDL_Color orange = {255,165,0, textOpacity};
|
||||
text_renderText(&startText, 10, 1.f, orange, "./assets/fonts/Quinquefive.ttf", 28, "Press space to start");
|
||||
|
||||
Reference in New Issue
Block a user