Clean start text parameters
This commit is contained in:
parent
267e6f7d5d
commit
134592d9f6
12
src/pong.c
12
src/pong.c
@ -64,9 +64,17 @@ Pong_render(Pong *p, int start) {
|
|||||||
+ Racket_render(p->racketR, p->renderer);
|
+ Racket_render(p->racketR, p->renderer);
|
||||||
|
|
||||||
if (!start) {
|
if (!start) {
|
||||||
Text *start_text = Text_init(50, 400, "Regular", 8);
|
Text *start_text;
|
||||||
const char *start_text_str = "Press any key to begin...";
|
const char *start_text_str = "Press any key to begin...";
|
||||||
error += Text_render(start_text, p->renderer, start_text_str, 400, 50);
|
const int start_text_posX = 50;
|
||||||
|
const int start_text_posY = 400;
|
||||||
|
const int start_text_width = 400;
|
||||||
|
const int start_text_height = 50;
|
||||||
|
const char *start_text_style = "Regular";
|
||||||
|
const int start_text_ptsize = 8;
|
||||||
|
|
||||||
|
start_text = Text_init(start_text_posX, start_text_posY, start_text_style, start_text_ptsize);
|
||||||
|
error += Text_render(start_text, p->renderer, start_text_str, start_text_width, start_text_height);
|
||||||
Text_free(start_text);
|
Text_free(start_text);
|
||||||
}
|
}
|
||||||
if (error > 0) {
|
if (error > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user