From f62676b94b43b3741126eeaa087c4597a3f8a18f Mon Sep 17 00:00:00 2001 From: zombie Date: Thu, 12 May 2022 12:40:14 -0400 Subject: [PATCH] this code needs to be crusified --- src/a.out | Bin 0 -> 16696 bytes src/main.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100755 src/a.out create mode 100644 src/main.c diff --git a/src/a.out b/src/a.out new file mode 100755 index 0000000000000000000000000000000000000000..060e254151ce4360f6e9f626e824b3ae5f439b72 GIT binary patch literal 16696 zcmeHOeQX@n5r20{hy%oSLK2(+%_)#JP<)B=B~$9Mj(zsJjf0!mkV=JReYdu+obSxt zI1GWi_RUA_T~-REqi`QHs)#R^&oZ5@^+$Rv?4a)qEW?>Yp4KB6ZK*_ z96uy36X$`vSYoPPQw(YqO@~W)1>uW;qg@Ra%J54SESPhI$kEP^D$Z9m%tf`5(QXMA zN%nG+oHFNnr@aUo14ZP~;Xfmhx!VqNGhM3`rW;E6Y0AqKakfJd?dHgCj_jD9!GM66 zb3QSA{MA!FyB-C96KTJE?AG_i0haZ0b-px<{yycFEQop@r?H$K2 zMIAg3^ocr1h~bY3>-fjm2jS;~(aJK4+kJ41BT`2HZNSR;N&4U|KK^g?!7uf}pY!n# z>LLO^FWmt^xj28~gOB^*`+e|7eej2U@Zb61Ek5|wfJflxrHydH8@wROhSA%fNgFxa z%-V(_jJD2pBVlE&-ek_UvYqWssZ84HG`mxlsw-QwuX(qz*Ghw3N7l+&X=^7Hh#dg$IhSoqGL_nE z#Z`;SusLfU?8qc3ihY*705@e)8RZsY`II%>oiVeCg>ag!oSn@KyFzYDCvC`4e8@C< zl4&!QydCmjz(XIWl=Yj*G$4?__^n2~?^dJ7Os2#@7Mkx7pa+TATDvv61-pbT2*k0p zQ?%}G+tp-jjc$$ZaLU`A(zfkzX+i>e1NpZIo@G@!_o$xo5cCikxW?R{4X#Tr!yaIm zuvN+Aa_mL!BKe80-v`}fSbPm+Bp!FTzpti;V1~vO#`84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|-@V;x_Uro2QwQaJU=)@_8h0z-jTr= zeR2GgnyQ&3dv1sIu`M^@`e?*R-Kk=G@4G$QyE)%`jxiLDki&Vp;jkaR2!0$7_n*rE h //printf and shit + +#include + +const int width = 800; +const int height = 600; + + +int main(){ + //legally required print (it broke without it) + printf("asd"); + + //general setup + SDL_Init(SDL_INIT_EVERYTHING); + SDL_Window *window = SDL_CreateWindow("amogus", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, SDL_WINDOW_OPENGL); + SDL_Renderer *renderer = SDL_CreateRenderer(window, -1, 0); + + //clear + //this kinda doesnt work + SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255); + SDL_RenderClear(renderer); + + int mousex; + int mousey; + SDL_Rect rect; + rect.x = 250; + rect.y = 150; + rect.w = 10; + rect.h = 10; + + while (1) { + //update mouse + SDL_PumpEvents(); + const Uint8 *state = SDL_GetKeyboardState(NULL); + SDL_GetMouseState(&mousex, &mousey); + + if (state[SDL_SCANCODE_Q]) { + goto cleanup; + } + if (state[SDL_SCANCODE_W]) { + rect.y -= 1; + } + + if (state[SDL_SCANCODE_A]) { + rect.x -= 1; + } + + if (state[SDL_SCANCODE_S]) { + rect.y += 1; + } + + if (state[SDL_SCANCODE_D]) { + rect.x += 1; + } + + if (state[SDL_SCANCODE_T]) { + rect.x = 10; + rect.y = 10; + } + SDL_Delay(1); + + //render loop + SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255); + SDL_RenderClear(renderer); + + SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255); + SDL_RenderDrawPoint(renderer, mousex, mousey); + + SDL_RenderFillRect(renderer, &rect); + + SDL_RenderPresent(renderer); + } + SDL_RenderPresent(renderer); + +cleanup: + + //CLEANUP + SDL_DestroyWindow(window); + SDL_Quit; + return 0; +}