Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Callahan committed Dec 13, 2014
0 parents commit 4b05f2b
Show file tree
Hide file tree
Showing 21 changed files with 573,048 additions and 0 deletions.
38 changes: 38 additions & 0 deletions CSCIx229.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#ifndef CSCIx229
#define CSCIx229

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <math.h>

#ifdef USEGLEW
#include <GL/glew.h>
#endif
#define GL_GLEXT_PROTOTYPES
#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif

#define Cos(th) cos(3.1415926/180*(th))
#define Sin(th) sin(3.1415926/180*(th))

#ifdef __cplusplus
extern "C" {
#endif

void Print(const char* format , ...);
void Fatal(const char* format , ...);
unsigned int LoadTexBMP(const char* file);
void Project(double fov,double asp,double dim);
void ErrCheck(const char* where);
int LoadOBJ(const char* file);

#ifdef __cplusplus
}
#endif

#endif
38 changes: 38 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
EXE = shift

# Main target
all: $(EXE)

CFLG=-O3 -Wall
LIBS=-lglut -lGLU -lGL -lm

CLEAN=rm -f $(EXE) *.o *.a


# Dependencies
gears.o: gears.c
shift.o: shift.c CSCIx229.h
fatal.o: fatal.c CSCIx229.h
loadtexbmp.o: loadtexbmp.c CSCIx229.h
print.o: print.c CSCIx229.h
project.o: project.c CSCIx229.h
errcheck.o: errcheck.c CSCIx229.h
object.o: object.c CSCIx229.h

# Create archive
CSCIx229.a:fatal.o loadtexbmp.o print.o project.o errcheck.o object.o
ar -rcs $@ $^

# Compile rules
.c.o:
gcc -c $(CFLG) $<
.cpp.o:
g++ -c $(CFLG) $<

# Link
shift:shift.o CSCIx229.a
gcc -O3 -o $@ $^ $(LIBS)

# Clean
clean:
$(CLEAN)
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Written By: Sean Callahan

In order to run. `make` and run `./shift`

Special Controls: Arrow keys for movement.
p: Switch between orthogonal and perspective
esc: Exit program.

Notes: I think the project ended up looking pretty good and most everyone I showed it too was fairly impressed. I am defintely happy with my work and plan on possibly sending a copy to New Belgium so they can see as well.
Loading

0 comments on commit 4b05f2b

Please sign in to comment.