From ded8682f82d07e92a257d1230cf88a1bf9945b85 Mon Sep 17 00:00:00 2001 From: Michael Chen Date: Sun, 14 Jan 2018 13:47:05 +0100 Subject: [PATCH] Added fonts --- Makefile | 2 +- bin/assets/fonts/ae-bi.ttf | Bin 0 -> 22920 bytes bin/assets/fonts/ka1.ttf | Bin 0 -> 56908 bytes bin/assets/fonts/minecraft.ttf | Bin 0 -> 14488 bytes main.c | 55 +++++++++++++++++++++++++++++++-- 5 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 bin/assets/fonts/ae-bi.ttf create mode 100644 bin/assets/fonts/ka1.ttf create mode 100644 bin/assets/fonts/minecraft.ttf diff --git a/Makefile b/Makefile index 3d53552..5d10ccd 100644 --- a/Makefile +++ b/Makefile @@ -10,4 +10,4 @@ args = -o all: $(compiler) $(warningLevel) $(includes) $(sources) $(linker) $(libs) $(args) $(dir)\$(target) - start cmd /K "cd $(dir) && $(target)" + start cmd /C "cd $(dir) && $(target)" diff --git a/bin/assets/fonts/ae-bi.ttf b/bin/assets/fonts/ae-bi.ttf new file mode 100644 index 0000000000000000000000000000000000000000..017f3f6f2f12bc891920b3864e762786f2c014f3 GIT binary patch literal 22920 zcmeHP33MFAnf|MLdhS!#sK+`+l4bcqk}c~(0?XK%wZTrz8Dj#8u!Tk9LlMH9%M!@( zvdL}|!pnwT%rk*(NW$_Uv2x+$8J1(8+1)@mLLkZ87qYNRh}S@3PW9~fS9SOFjAjgB zU-s?3rvxS^J}DZ- zPw@T(-p}qH+co~{+i$uVc_?51)#RQ_rgw~N|0L0=cOd_#lT+i9FP!vxKWOR3{UpwM zu?V3$uB4Ofn4l~@Y{xaKqgU*>PLtwBJMNpf=5C$Ngk#yX?3sUnk)Up=_pK#TET3uIN{B zMZbzG`c+)fui}b+6_@4jUD4T{T{|^CHa)&Qd*Kz?GbgV2!1(qZ_Mt3=OV;+BjplW zvS#PS%1C@isaI zSvw_>8&KGod~sW8fm!bx?@%~?vTT`~#Adn;)G zA!=PRU8ppM*sh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I_6=IcgxJ*blx=romb+Z_)Y1%>U zFQHLCudd=jS}Ekn=pNR!>aa&j>SoiLwP(Pp$Y!zE7+k+y0ALrgBXTABM#PA<5Jo^tW<~s{FeAT&P zZ;Njkt$G&EVM9Or7x9jswcs=GW%93CuN$o{CHxv6r^}Sn=_446@}a?+8Ns-V=vKi` Gi~k1A;0NRY literal 0 HcmV?d00001 diff --git a/bin/assets/fonts/ka1.ttf b/bin/assets/fonts/ka1.ttf new file mode 100644 index 0000000000000000000000000000000000000000..d1df85235c97923dd54e9234999fe36452e309ba GIT binary patch literal 56908 zcmeHQ37lL-(XZ|~HhY8+Lc$$38#aJkd*y-vImiVe34{<11tzev16 z>g&y0PykR0=RypsX3aUE=81`y+z6n?Aotk%)>Qi|XCLxDCRhTHc(pOr*}iTari2xT zp}b#X%NYyqYrhyZ40#0L;ijf^s^PsGKAeEEC-E9Zi~&dYdll*b!)uSG)~>~0S)-Pr z{;L2=YFaY&sbsQdDZs$5p#EK3Q;XY+W~(2gd`C=Q-j-@jpY)9>4*)FN6?u=hXF9t+ zIDXf^0le@gz@QeOvg0+NuVzk@oT}8WL{8*2#@5MBD#gG@j-%tMm(htEh%3D;7`X+cG(YY?RMLPJ( zmDc4``IxspTTyc6aTzG2`z4)pZ>&34xXJ8O{cVqzUk6mj=6XH|lTx?eSPxj+}K81Bm zx@`H8Pcp+peUyh}(hl3B(5+i417Flme3^8phwbDG$u`*~{iZBb7g#332Dd%SOi1A~i{tS(P=+G}<#Wr&aY{>dofZ0RX6~EH zKp3Wa$1o=1Y^%_aFimNtUWpBR?^tHj2e1#BvXXrtcZqpkS&~ywhW#&wV??qBFC58| ziJ<=~e1G-sm(nHYd+C!8Vu<4p=a1it_OJHp z*tE?lNFy(P6JAtLU7kF45z=^1whc)}7y1zjW7m7K#03~)9mU?l@FNWO#_$xhS%o2% z&-fc0fvqjliE+%X@m_k9*Y7h$ z^_ULRnlz}-qLi z^5TP$M`<`e>N2*GPkE_+sqQE&8joquMLwo6Wu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oGeYSI$CI24pe*xM150(G` literal 0 HcmV?d00001 diff --git a/main.c b/main.c index e286a30..ba4d7f2 100644 --- a/main.c +++ b/main.c @@ -18,6 +18,7 @@ void DrawFrame(); void INITIALIZE(); void QUIT(); void GAMELOOP(); +void printFontStyle(TTF_Font * ffont); void mousePress(SDL_MouseButtonEvent b); void keyPress(SDL_KeyboardEvent b); void windowChanged(SDL_WindowEvent b); @@ -31,6 +32,7 @@ SDL_Window * window; SDL_Renderer * renderer; SDL_Event event; bool running = true, fullscreen = false; +TTF_Font * font = NULL; Ball ball; @@ -106,16 +108,61 @@ void DrawFrame(){ SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255); SDL_RenderClear(renderer); BREAKOUT_Draw(renderer); + + int w, h; + if (TTF_SizeText(font, "put your text here", &w, &h)) { + // perhaps print the current TTF_GetError(), the string can't be rendered... + } else { + printf("width=%d height=%d\n", w, h); + } + SDL_Color White = { 255, 255, 255 }; // this is the color in rgb format, maxing out all would give you the color white, and it will be your text's color + + SDL_Surface * surfaceMessage = TTF_RenderText_Solid(font, "put your text here", White); // as TTF_RenderText_Solid could only be used on SDL_Surface then you have to create the surface first + + SDL_Texture * Message = SDL_CreateTextureFromSurface(renderer, surfaceMessage); // now you can convert it into a texture + + SDL_Rect Message_rect = (SDL_Rect) {.x = 0, .y = 0, .w = w, .h = h }; // create a rect + SDL_RenderCopy(renderer, Message, NULL, &Message_rect); // you put the renderer's name first, the Message, the crop size(you can ignore this if you don't want to dabble with cropping), and the rect which is the size and coordinate of your texture + + SDL_FreeSurface(surfaceMessage); + SDL_DestroyTexture(Message); SDL_RenderPresent(renderer); +} /* DrawFrame */ + +void printFontStyle(TTF_Font * ffont){ + int style; + + style = TTF_GetFontStyle(ffont); + printf("The font style is:"); + if (style == TTF_STYLE_NORMAL) + printf(" normal"); + else { + if (style & TTF_STYLE_BOLD) + printf(" bold"); + if (style & TTF_STYLE_ITALIC) + printf(" italic"); + if (style & TTF_STYLE_UNDERLINE) + printf(" underline"); + if (style & TTF_STYLE_STRIKETHROUGH) + printf(" strikethrough"); + } + printf("\n"); } void INITIALIZE() { srand(time(NULL)); - if (SDL_Init(SDL_INIT_EVERYTHING) != 0) printf("SDL could not initialize! SDL_Error: %s\n", SDL_GetError()); + if (SDL_Init(SDL_INIT_EVERYTHING) != 0) printf("SDL could not initialize! Error: %s\n", SDL_GetError()); else printf("SDL was successfully initialized!\n"); - if (IMG_Init(IMG_INIT_PNG) != IMG_INIT_PNG) printf("IMG could not initialize! IMG_Error: %s\n", IMG_GetError()); + if (IMG_Init(IMG_INIT_PNG) != IMG_INIT_PNG) printf("IMG could not initialize! Error: %s\n", IMG_GetError()); else printf("IMG was successfully initialized!\n"); - TTF_Init(); + if (TTF_Init() == -1) printf("TTF could not initialize! Error: %s\n", TTF_GetError()); + else printf("TTF was successfully initialized!\n"); + +// load font.ttf at size 16 into font + font = TTF_OpenFont("assets/fonts/minecraft.ttf", 32); + if (!font) printf("Font could not initialize! Error: %s\n", TTF_GetError()); + else printf("Font was successfully initialized!\n"); + printFontStyle(font); window = SDL_CreateWindow("BreakING", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, SDL_WINDOW_OPENGL); SDL_SetWindowResizable(window, true); @@ -129,6 +176,8 @@ void QUIT(){ printf("De-initializing started...\n"); BREAKOUT_DEINITIALIZE(); free(keystate); + TTF_CloseFont(font); + font = NULL; // to be safe... TTF_Quit(); IMG_Quit(); printf("Quitting SDL_IMG finished!\n");