Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
PierceLBrooks committed Dec 30, 2024
0 parents commit 016c66c
Show file tree
Hide file tree
Showing 52 changed files with 8,380 additions and 0 deletions.
80 changes: 80 additions & 0 deletions #Makefile#
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
OBJS = Main.o\
FourD.o\
Hyper.o\
Asserts.o\
Board.o\
GenPiece.o\
CubePiece.o\
DList.o\
LPiece.o\
StraightPiece.o\
TPiece.o\
SPiece.o\
CornerPiece.o\
TwistyPiece.o\
ZPiece.o\
ThreeLinePiece.o\
TriPiece.o\
TwoPiece.o\
SimplePiece.o\
Rotor.o


#**************************************************************************
# Change this line if you don't like 'a.out'.

EXENAME = a.out


#**************************************************************************
# Macros defining the C/C++ compiler and linker.

CC = CC
CCOPTS = +w
LINK = CC
LINKOPTS = /usr/lib/libgl_s.a /usr/lib/libc_s.a /usr/lib/libm.a /usr/lib/libX11_s.a

# don't remove /usr/lib/libgl_s.a from linkopts, the compiler doesn't
# know what it's talking about

GLINC = -I/usr/local/include
GLUTINC = -I/usr/local/include/GL
GLUTINC = -I/afs/ncsa.uiuc.edu/projects/MATH428/illiMath/glut

#GLUTLIB = -L/usr/local/lib -lglut
GLUTLIB = -L/afs/ncsa.uiuc.edu/projects/MATH428/illiMath/glut -lglut
GLLIB = -L/usr/local/lib -lGL -lGLU
SYSLIBS = -L/usr/X11R6/lib -lX11 -lXi -lXext -lXmu -lm

OPT = -o32
CFLAGS = ${OPT} ${GLINC} ${GLUTINC}
LDFLAGS = ${OPT} ${GLUTLIB} ${GLLIB} ${SYSLIBS}
#LDFLAGS = ${OPT} ${GLUTLIB}


#**************************************************************************
# Rules for building EXENAME from OBJS and OBJS from your source.

$(EXENAME): $(OBJS)
$(LINK) $(CFLAGS) $(LDFLAGS) $(OBJS)

clean:
-rm *.o $(EXENAME)
# -rm -rf Templates.DB
.C.o:
$(CC) $(CFLAGS) $(LDFLAGS) -c $<

.cc.o:
$(CC) $(CFLAGS) $(LDFLAGS) -c $<

.c.o:
$(CC) $(CFLAGS) $(LDFLAGS) -c $<









33 changes: 33 additions & 0 deletions Asserts.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Greg Kaiser
//
// CS290 with Prof. Francis
// 4D Tetris
//
// Asserts.C
// Last modified: April 17, 1996
//
// (C) 1996 Board of Trustees University of Illinois

#include "Asserts.h"

// Given: A SafeCondition, in the form of a boolean expression, and a ErrMsg
// Task: If the SafeCondition isn't true, then the ErrMsg is displayed to
// to the screen as an error and the program is terminated
// Return: Nothing
void Assert(int SafeCondition, char* ErrMsg)
{
if (!SafeCondition) {
cerr << "***Error: " << ErrMsg << endl;
exit(1);
}
}

// Given: A SafeCondition, in the form of a boolean expression, and a ErrMsg
// Task: If the SafeCondition isn't true, then the ErrMsg is displayed to
// to the screen as a warning
// Return: Nothing
void Warn(int SafeCondition, char* ErrMsg)
{
if (!SafeCondition)
cerr << "***Warning: " << ErrMsg << endl;
}
25 changes: 25 additions & 0 deletions Asserts.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Greg Kaiser
//
// CS290 with Prof. Francis
// 4D Tetris
//
// Asserts.h
// Last modified: April 17, 1996
//
// (C) 1996 Board of Trustees University of Illinois

//////////////////////////////////////////////////////////////////////////////
// Note: For descriptions of the functions, look at Asserts.C //
//////////////////////////////////////////////////////////////////////////////

#ifndef ASSERTS_H
#define ASSERTS_H

#include <stdlib.h> // for the exit(1)
#include <iostream.h>

void Assert(int SafeCondition, char* ErrMsg);

void Warn(int SafeCondition, char* ErrMsg);

#endif
Loading

0 comments on commit 016c66c

Please sign in to comment.