Skip to content

Commit

Permalink
added makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
joerunde committed May 2, 2012
1 parent 66cbdba commit 35a40da
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 2 deletions.
1 change: 1 addition & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is a small program I wrote to generate .obj files that can be imported into any 3D modeling software. Based on user paramaters, it will generate a grid of terrain with hills and ridges. Could possibly be useful for quick terrain generation for an RTS. To run, use make, then a.out.
2 changes: 1 addition & 1 deletion hills.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ void Hills::adjustGridHeight()
/*
This function prints the contents of Hills in .obj file format to the file path provided
*/
void Hills::output(string path){
void Hills::output(char* path){
ofstream hGrid;
hGrid.open(path);
int i, c, current;
Expand Down
2 changes: 1 addition & 1 deletion hills.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Hills{
//Hills(); //constructor with command line prompts
Hills(int newLength, int newSideCount, int newHillCount, int newMaxRise, int newRidgeCount, int newNoise);
void adjustGridHeight();
void output(string path);
void output(char* path);
};

#endif
5 changes: 5 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
grid: Vert.h Vert.cpp hills.h hills.cpp common.h main.cpp
c++ -c Vert.cpp -o Vert.o
c++ -c hills.cpp -o hills.o
c++ -c main.cpp -o main.o
c++ Vert.o hills.o main.o
14 changes: 14 additions & 0 deletions resource.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by GridGen.rc

// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

0 comments on commit 35a40da

Please sign in to comment.