Compare commits

..

No commits in common. "12e5f2292945b3461c083a62eb4a8e536d9265a9" and "713d96d77039bdc3909ac4fec613791890d5bd75" have entirely different histories.

4 changed files with 1 additions and 63 deletions

View file

@ -2,16 +2,7 @@ BasedOnStyle: LLVM
IndentWidth: 4 # Use 4 spaces for indentation IndentWidth: 4 # Use 4 spaces for indentation
TabWidth: 4 # Tab width is also 4 spaces TabWidth: 4 # Tab width is also 4 spaces
UseTab: Never # Always use spaces instead of tabs UseTab: Never # Always use spaces instead of tabs
ColumnLimit: 120 # Wrap lines after 80 characters ColumnLimit: 80 # Wrap lines after 80 characters
AllowShortLoopsOnASingleLine: true AllowShortLoopsOnASingleLine: true
AllowShortFunctionsOnASingleLine: false
AlwaysBreakTemplateDeclarations: true AlwaysBreakTemplateDeclarations: true
BreakConstructorInitializers: BeforeComma BreakConstructorInitializers: BeforeComma
AlignConsecutiveDeclarations:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveMacros: true

View file

@ -2,7 +2,6 @@
#include <stdio.h> #include <stdio.h>
#include <sys/mman.h> // mmap and friends #include <sys/mman.h> // mmap and friends
#include <unistd.h> #include <unistd.h>
#include <stdbool.h>
int main(void) { int main(void) {
/* /*

View file

@ -1,12 +0,0 @@
CC ?= gcc
CFLAGS ?= -Wall -O2 -lSDL2
TARGET = main.elf
SRC = main.c
$(TARGET): $(SRC)
@echo CC $@
@$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
clean:
rm -f $(TARGET)

View file

@ -1,40 +0,0 @@
#include <SDL2/SDL.h>
#include <stdio.h>
int main() {
if (SDL_Init(SDL_INIT_VIDEO) != 0) {
printf("SDL_Init Error: %s\n", SDL_GetError());
return 1;
}
SDL_Window *win = SDL_CreateWindow("Simple Window", 100, 100, 640, 480, SDL_WINDOW_SHOWN);
if (!win) {
printf("SDL_CreateWindow Error: %s\n", SDL_GetError());
SDL_Quit();
return 1;
}
SDL_Renderer *renderer = SDL_CreateRenderer(win, -1, SDL_RENDERER_ACCELERATED);
if (!renderer) {
SDL_DestroyWindow(win);
printf("SDL_CreateRenderer Error: %s\n", SDL_GetError());
SDL_Quit();
return 1;
}
SDL_SetRenderDrawColor(renderer, 0, 0, 255, 255); // Blue background
SDL_RenderClear(renderer);
SDL_SetRenderDrawColor(renderer, 255, 0, 0, 255); // Red rectangle
SDL_Rect rect = {100, 100, 200, 150};
SDL_RenderFillRect(renderer, &rect);
SDL_RenderPresent(renderer);
SDL_Delay(3000); // Wait 3 seconds
SDL_DestroyRenderer(renderer);
SDL_DestroyWindow(win);
SDL_Quit();
return 0;
}