Skip to content

Commit 965dc65

Browse files
author
Patrick Rye
committed
Update to v1.2.6-Beta
## [1.2.6-Beta] - 2015-09-24 ### Updated * Cleanup.bat to include doxygen files (also added wildcard support for some files) * Readme for the slight change to the config file ### Changed * Makefile (it should now work) * Doxygen now uses DOT to make graphs * Functions that were in main.cpp have been renamed and moved into a namespace * All line seprators from 170 charaters long to 80 to allow me to see if I am breaking Google's recommended 80 charaters length see [here] (https://google-styleguide.googlecode.com/svn/trunk/cppguide.html#Line_Length) * Made most lines to be less than 80 charaters ### Cleaned * Depencies on header files * Depencies on exteral libraries ### Added * More doxygen comments that I missed before
1 parent c85bd6e commit 965dc65

17 files changed

+475
-308
lines changed

ChangesLog.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,27 @@
33
All notable changes to this project will be documented here.
44
This project adheres to [Semantic Versioning](http://semver.org/)
55

6+
## [1.2.6-Beta] - 2015-09-24
7+
### Updated
8+
* Cleanup.bat to include doxygen files (also added wildcard support for some files)
9+
* Readme for the slight change to the config file
10+
11+
### Changed
12+
* Makefile (it should now work)
13+
* Doxygen now uses DOT to make graphs
14+
* Functions that were in main.cpp have been renamed and moved into a namespace
15+
* All line seprators from 170 charaters long to 80 to allow me to see if I am breaking Google's recommended 80 charaters length
16+
see [here] (https://google-styleguide.googlecode.com/svn/trunk/cppguide.html#Line_Length)
17+
* Made most lines to be less than 80 charaters
18+
19+
### Cleaned
20+
* Depencies on header files
21+
* Depencies on exteral libraries
22+
23+
### Added
24+
* More doxygen comments that I missed before
25+
26+
627
## [1.2.5-Beta] - 2015-09-23
728
### Added
829
* Doxygen Support

Cleanup.bat

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,47 @@
33
:: Really just for personal use
44
:: There are a lot of random files that get throw about, this batch file will delete them if they are there.
55
:: because I'm too lazy to go searching for them myself, but I want to keep my folders clean.
6+
set MAINDIR = %~dp0
7+
set PROJECTDIR = %MAINDIR%Project\
8+
set DOXYGENDIR = %PROJECTDIR%doxygen\
9+
set RESDIR = %MAINDIR%res\
10+
set SRCDIR = %MAINDIR%src\
611

712
echo Cleaning Project Folder...
8-
IF EXIST %~dp0Project\bin RMDIR /S /Q %~dp0Project\bin
9-
IF EXIST %~dp0Project\obj RMDIR /S /Q %~dp0Project\obj
10-
IF EXIST %~dp0Project\SDL-Cannon-Simulation.depend del /F %~dp0Project\SDL-Cannon-Simulation.depend
11-
IF EXIST %~dp0Project\SDL-Cannon-Simulation.layout del /F %~dp0Project\SDL-Cannon-Simulation.layout
13+
IF EXIST %PROJECTDIR%SDL-Cannon-Simulation.depend del /F %PROJECTDIR%SDL-Cannon-Simulation.depend
14+
IF EXIST %PROJECTDIR%SDL-Cannon-Simulation.layout del /F %PROJECTDIR%SDL-Cannon-Simulation.layout
1215
echo.
1316

14-
echo Cleaning res Folder...
15-
IF EXIST %~dp0res\boilerplate.res del /F %~dp0res\boilerplate.res
17+
echo Cleaning Doxygen Folder...
18+
IF EXIST %DOXYGENDIR%html RMDIR /S /Q %DOXYGENDIR%html
19+
IF EXIST %DOXYGENDIR%latex RMDIR /S /Q %DOXYGENDIR%latex
20+
IF EXIST %DOXYGENDIR%man RMDIR /S /Q %DOXYGENDIR%man
21+
IF EXIST %DOXYGENDIR%rtf RMDIR /S /Q %DOXYGENDIR%rtf
22+
IF EXIST %DOXYGENDIR%xml RMDIR /S /Q %DOXYGENDIR%xml
23+
IF EXIST %DOXYGENDIR%doxygen.log del /F %DOXYGENDIR%doxygen.log
1624
echo.
1725

18-
echo Cleaning src Folder...
19-
IF EXIST %~dp0src\main.o del /F %~dp0src\main.o
20-
IF EXIST %~dp0src\cannonball.o del /F %~dp0src\cannonball.o
21-
IF EXIST %~dp0src\config.o del /F %~dp0src\config.o
22-
IF EXIST %~dp0src\tick.o del /F %~dp0src\tick.o
23-
IF EXIST %~dp0src\screen.o del /F %~dp0src\screen.o
26+
echo Cleaning res Folder...
27+
IF EXIST %RESDIR%boilerplate.res del /F %RESDIR%boilerplate.res
2428
echo.
2529

2630
echo Cleaning Main Folder...
27-
IF EXIST %~dp0Config.ini del /F %~dp0Config.ini
28-
IF EXIST %~dp0gmon.out del /F %~dp0gmon.out
29-
IF EXIST %~dp0Cannon.exe del /F %~dp0Cannon.exe
30-
IF EXIST %~dp0Cannon-PRIVATE.exe del /F %~dp0Cannon-PRIVATE.exe
31-
IF EXIST %~dp0Cannon del /F %~dp0Cannon
32-
IF EXIST %~dp0Cannon-PRIVATE del /F %~dp0Cannon-PRIVATE
33-
IF EXIST %~dp0logfile.log del /F %~dp0logfile.log
34-
IF EXIST %~dp0time-log.log del /F %~dp0time-log.log
31+
IF EXIST %MAINDIR%Config.ini del /F %MAINDIR%Config.ini
32+
IF EXIST %MAINDIR%gmon.out del /F %MAINDIR%gmon.out
33+
IF EXIST %MAINDIR%Cannon.exe del /F %MAINDIR%Cannon.exe
34+
IF EXIST %MAINDIR%Cannon-PRIVATE.exe del /F %MAINDIR%Cannon-PRIVATE.exe
35+
IF EXIST %MAINDIR%Cannon del /F %MAINDIR%Cannon
36+
IF EXIST %MAINDIR%Cannon-PRIVATE del /F %MAINDIR%Cannon-PRIVATE
37+
IF EXIST %MAINDIR%logfile.log del /F %MAINDIR%logfile.log
38+
IF EXIST %MAINDIR%time-log.log del /F %MAINDIR%time-log.log
39+
IF EXIST %MAINDIR%*.stackdump del /F %MAINDIR%*.stackdump
40+
echo.
41+
42+
echo Cleaning .o files where they might exist...
43+
IF EXIST %MAINDIR%*.o del /F %MAINDIR%*.o
44+
IF EXIST %SRCDIR%*.o del /F %SRCDIR%*.o
45+
IF EXIST %DIR%Project\bin RMDIR /S /Q %DIR%Project\bin
46+
IF EXIST %DIR%Project\obj RMDIR /S /Q %DIR%Project\obj
3547
echo.
3648

3749
echo All cleaning done.

Makefile

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,38 @@
1+
# Set the Prefix of each line from \t (default) to >
2+
.RECIPEPREFIX = >
13
# Basic Make file (haven't tested it yet)
24
CC=g++
35
# Flags to be used
46
CFLAGS=-w -s -Os -std=c++11
57
# Linked libraries
6-
LDFLAGS=-lSDL2main -lSDL2 -lSDL2_image
8+
LDFLAGS=-L./SDL2Stuff/lib -lSDL2main -lSDL2 -lSDL2_image
79
# Path to .cpp files
810
SRCPATH = ./src/
911
# Name of the executable made
1012
EXECUTABLE=cannon
1113
# Include Flags to look in Src folder
12-
INCLUDEFLAGS=-I. -I$(SRCPATH)
14+
INCLUDEFLAGS=-I. -I$(SRCPATH) -I./SDL2Stuff/include
1315

1416
all: project
1517

1618
project: main.o cannonball.o config.o screen.o tick.o
17-
$(CC) $(CFLAGS) main.o cannonball.o config.o screen.o tick.o -o $(EXECUTABLE) $(LDFLAGS)
19+
> $(CC) $(CFLAGS) main.o cannonball.o config.o screen.o tick.o -o $(EXECUTABLE) $(LDFLAGS)
1820

1921
main.o: $(SRCPATH)main.cpp $(SRCPATH)version.h $(SRCPATH)global.h $(SRCPATH)screen.h $(SRCPATH)cannonball.h $(SRCPATH)tick.h $(SRCPATH)config.h
20-
$(CC) $(CFLAGS) $(INCLUDEFLAGS) $(SRCPATH)main.cpp -c main.o
22+
> $(CC) $(CFLAGS) $(INCLUDEFLAGS) -c $(SRCPATH)main.cpp
2123

2224
cannonball.o: $(SRCPATH)cannonball.cpp $(SRCPATH)cannonball.h $(SRCPATH)screen.h
23-
$(CC) $(CFLAGS) $(INCLUDEFLAGS) $(SRCPATH)cannonball.cpp -c cannonball.o
25+
> $(CC) $(CFLAGS) $(INCLUDEFLAGS) -c $(SRCPATH)cannonball.cpp
2426

2527
config.o: $(SRCPATH)config.cpp $(SRCPATH)config.h $(SRCPATH)version.h
26-
$(CC) $(CFLAGS) $(INCLUDEFLAGS) $(SRCPATH)config.cpp -c config.o
28+
> $(CC) $(CFLAGS) $(INCLUDEFLAGS) -c $(SRCPATH)config.cpp
2729

2830
screen.o: $(SRCPATH)screen.cpp $(SRCPATH)screen.h $(SRCPATH)image_ball.xpm $(SRCPATH)image_pixel.xpm
29-
$(CC) $(CFLAGS) $(INCLUDEFLAGS) $(SRCPATH)screen.cpp -c screen.o
31+
> $(CC) $(CFLAGS) $(INCLUDEFLAGS) -c $(SRCPATH)screen.cpp
3032

3133
tick.o: $(SRCPATH)tick.cpp $(SRCPATH)tick.h
32-
$(CC) $(CFLAGS) $(INCLUDEFLAGS) $(SRCPATH)tick.cpp -c tick.o
34+
> $(CC) $(CFLAGS) $(INCLUDEFLAGS) -c $(SRCPATH)tick.cpp
3335

3436
clean:
35-
rm *o $(EXECUTABLE)
37+
> rm *o $(EXECUTABLE)
3638

README.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
11
# Cannon-Simulation
22

3-
A really simple program that uses SDL library to simulate a cannon ball being fired.
3+
A really simple program that uses SDL library to simulate cannonballs being fired and colliding and bouncing off of each other.
44

5-
I used to to test the waters on using SDL for graphics. Putting it on GitHub so that I may easily reference it later.
5+
I used it to test the waters on using SDL for graphics, and collisions. Putting it on GitHub so that I may easily reference it later.
66

77
There are a few branches of this that use different programming languages.
88

9-
It has been released in the Public Domain meaning you can use it however you wish.
9+
# License
10+
11+
This program has been released in the Public Domain meaning you can use it however you wish, read the license file [here](https://github.com/GamerMan7799/Cannon-Simulation/blob/master/LICENSE.md)
12+
or you can read [here](http://unlicense.org) for infomation of the Unlicense in general.
13+
14+
## Summary of what license means
15+
16+
* First and foremost, this code is "AS IS", meaning we cannot be sued if it doesn't work
17+
18+
* You can modify this code any way you wish without credit (but we would certainty appreciate it)
19+
20+
* You can any/all of this code for private and/or commerical use
1021

1122
# Running the program
1223

@@ -31,11 +42,11 @@ Let me know if I am missing a dependences that I might have forgotten about due
3142

3243
# Using the Program
3344

34-
The first time you run the program a Config.ini will be created it should look something like below:
45+
The first time you run the program a "Config.ini" will be created it should look something like below:
3546

3647
```
3748
Config File for the Cannon.exe
38-
1.2.4.60-b
49+
1.2.5-Beta
3950
Screen Width: 640
4051
Screen Height: 480
4152
Log Ball's path: 0
@@ -52,10 +63,13 @@ online and I cannot verify how accurate it is.
5263

5364
"Draw Ball path on Screen" (if enabled with a 1 instead of 0), will cause small pixels to trail after each ball.
5465

55-
Once you start the program you will be greeted with a beautiful white screen. To create a new cannonball you click (and hold down the button)
66+
Once you start the program you will be greeted with a beautiful black screen. To create a new cannonball you click (and hold down the button)
5667
you can now move your move around to change the angle that the new cannonball will be fired at; as well as the longer the line the faster it will go.
5768
When you are happy with the angle and speed simply release the mouse button and it will be created at the point where you clicked the mouse button down.
5869

70+
The longer you hold down the mouse button the larger the radius of the ball will be and as a result, the more mass the ball will have. You can get an
71+
idea of how much mass a ball has based on how transparent it is, the more transparent it is the lighter its mass.
72+
5973
You can also press the following keys to yield effects
6074

6175
```

project/SDL-Cannon-Simulation.cbp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
<doxyfile_build extract_all="1" />
154154
<doxyfile_warnings />
155155
<doxyfile_output />
156-
<doxyfile_dot class_diagrams="1" />
156+
<doxyfile_dot class_diagrams="1" have_dot="1" />
157157
<general use_at_in_tags="1" />
158158
</DoxyBlocks>
159159
</Extensions>

project/doxygen/Doxyfile

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = Cannon-Simulation
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = v1.2.5-Beta
41+
PROJECT_NUMBER = v1.2.6-Beta
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a
@@ -765,16 +765,7 @@ WARN_LOGFILE = C:\Users\Patrick.Rye\Documents\GitHub\Cannon-Simulation
765765
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
766766
# Note: If this tag is empty the current directory is searched.
767767

768-
INPUT = "..\..\src\screen.h" \
769-
"..\..\src\cannonball.h" \
770-
"..\..\src\version.h" \
771-
"..\..\src\config.cpp" \
772-
"..\..\src\cannonball.cpp" \
773-
"..\..\src\main.cpp" \
774-
"..\..\src\screen.cpp" \
775-
"..\..\src\global.h" \
776-
"..\..\src\tick.h" \
777-
"..\..\src\config.h" \
768+
INPUT = ../../src \
778769
../../ChangesLog.md \
779770
../../README.md \
780771
../../LICENSE.md
@@ -2143,7 +2134,7 @@ HIDE_UNDOC_RELATIONS = YES
21432134
# set to NO
21442135
# The default value is: NO.
21452136

2146-
HAVE_DOT = NO
2137+
HAVE_DOT = YES
21472138

21482139
# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
21492140
# to run in parallel. When set to 0 doxygen will base this on the number of
@@ -2272,7 +2263,7 @@ CALL_GRAPH = YES
22722263
# The default value is: NO.
22732264
# This tag requires that the tag HAVE_DOT is set to YES.
22742265

2275-
CALLER_GRAPH = NO
2266+
CALLER_GRAPH = YES
22762267

22772268
# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
22782269
# hierarchy of all classes instead of a textual one.
@@ -2321,7 +2312,7 @@ INTERACTIVE_SVG = NO
23212312
# found. If left blank, it is assumed the dot tool can be found in the path.
23222313
# This tag requires that the tag HAVE_DOT is set to YES.
23232314

2324-
DOT_PATH =
2315+
DOT_PATH = "../../../../../../../Program Files (x86)/Graphviz2.38/bin"
23252316

23262317
# The DOTFILE_DIRS tag can be used to specify one or more directories that
23272318
# contain dot files that are included in the documentation (see the \dotfile

0 commit comments

Comments
 (0)