This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PImage generateTex(int w, int h) { | |
PImage img = createImage(w, h, ARGB); | |
//size of each checker square | |
int size = 64; | |
color c = color(0); | |
//loop through each pixel in the image (img) | |
for(int i = 0; i < img.width; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void draw_line(int x1, int y1, int x2, int y2) { | |
int dx = x2 - x1; | |
int dy = y2 - y1; | |
float slope = (float)dy / (float)dx; | |
float error = 0; | |
int y = y1; | |
int i; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Global variables | |
SDL_Surface *title_screen; | |
int load_image(char filename[], SDL_Surface *surface) { | |
SDL_Surface *temp; | |
//load image | |
temp = SDL_LoadBMP(filename); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
create a program that will allow you to enter events organizable by hour. | |
There must be menu options of some form, and you must be able to easily edit, add, and delete events | |
without directly changing the source code. | |
(note that by menu i dont necessarily mean gui. as long as you can easily access the different | |
options and receive prompts and instructions telling you how to use the program, it will probably be fine) | |
*/ | |
#include <stdio.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
create a program that will ask the users name, age, and reddit username. | |
have it tell them the information back, in the format: | |
your name is (blank), you are (blank) years old, and your username is (blank) | |
for extra credit, have the program log this information in a file to be accessed later. | |
*/ | |
#include <stdio.h> |