#include "constants.h" | |||||
const int k_window_height = 800; | |||||
const int k_window_width = 600; | |||||
const char *k_window_title = "Hello World"; |
#pragma once | |||||
extern const int k_window_width; | |||||
extern const int k_window_height; | |||||
extern const char *k_window_title; |
int x = 10; |
#pragma once | |||||
extern int x; |
#include <math.h> | |||||
#include <stdio.h> | |||||
//#bb pkgs := sdl2 | |||||
#include "hello world.h" | |||||
//#bb ldflags := -lm | |||||
#include <SDL.h> | |||||
#include "constants.h" | |||||
int main() { | int main() { | ||||
printf("sin(%i) is %f\n", x, sin(x)); | |||||
SDL_Init(SDL_INIT_VIDEO); | |||||
SDL_Window *win = SDL_CreateWindow(k_window_title, | |||||
SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, | |||||
k_window_width, k_window_height, 0); | |||||
SDL_Delay(5000); | |||||
SDL_DestroyWindow(win); | |||||
SDL_Quit(); | |||||
} | } |