Skip to content
This repository was archived by the owner on Jun 12, 2025. It is now read-only.

Commit 5abaf8a

Browse files
Patrick RyePatrick Rye
authored andcommitted
Merge pull request #17 from GamerMan7799/dev
Update Master to v4.1.0
2 parents 90d486a + 9381ba1 commit 5abaf8a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1794
-468
lines changed

.gitignore

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,30 @@
4040
*.stackdump
4141

4242
# Code Blocks files
43-
*.cbp
44-
*.depend
43+
/Project/bin/
44+
/Project/bin/*
45+
/Project/obj/
46+
/Project/obj/*
4547
*.layout
48+
*.depend
49+
50+
# My stuff
51+
52+
# Archived images that don't need to be on Github
53+
*.zip
54+
*.rar
55+
56+
# I'll name files this if I don't want them on Github
57+
*.tmp
58+
59+
# I store my SDL2 include and lib here
60+
/SDL2Stuff/include/
61+
/SDL2Stuff/lib/
62+
63+
# Random stuff that also doesn't need to be on github
64+
/RandomCrap/
65+
/RandomCrap/*
66+
67+
# Other Libraries (such as libjpeg-9) that I store the dll & license files here in case I decide to use them later.
68+
/OtherLibraries/
69+
/OtherLibraries/*

Cleanup.bat

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
@echo off
2+
:: This batch file will go through the folders and delete files that are not needed.
3+
:: Once again really just for personal use
4+
:: There are a lot of random files that get throw about, this batch file will delete them if they are there.
5+
:: because I'm too lazy to go searching for them myself, but I want to keep my folders clean.
6+
7+
echo Cleaning Debug Folder...
8+
IF EXIST %~dp0Debug\build.rasm.log del /F %~dp0Debug\build.rasm.log
9+
IF EXIST %~dp0Debug\PlatformerExperiment-PRIVATE.exe.stackdump del /F %~dp0Debug\PlatformerExperiment-PRIVATE.exe.stackdump
10+
echo.
11+
12+
echo Cleaning Project Folder...
13+
IF EXIST %~dp0Project\bin RMDIR /S /Q %~dp0Project\bin
14+
IF EXIST %~dp0Project\obj RMDIR /S /Q %~dp0Project\obj
15+
IF EXIST %~dp0Project\Experimental-Platformer-AI.depend del /F %~dp0Project\Experimental-Platformer-AI.depend
16+
IF EXIST %~dp0Project\Experimental-Platformer-AI.layout del /F %~dp0Project\Experimental-Platformer-AI.layout
17+
echo.
18+
19+
echo Cleaning Resources Folder...
20+
IF EXIST %~dp0Resource\boilerplate.res del /F %~dp0Resource\boilerplate.res
21+
echo.
22+
23+
echo Cleaning Source Folder...
24+
IF EXIST %~dp0Source\main.o del /F %~dp0Source\main.o
25+
IF EXIST %~dp0Source\config.o del /F %~dp0Source\config.o
26+
IF EXIST %~dp0Source\map.o del /F %~dp0Source\map.o
27+
IF EXIST %~dp0Source\entity.o del /F %~dp0Source\entity.o
28+
IF EXIST %~dp0Source\tick.o del /F %~dp0Source\tick.o
29+
IF EXIST %~dp0Source\screen.o del /F %~dp0Source\screen.o
30+
echo.
31+
32+
echo Cleaning Main Folder...
33+
IF EXIST %~dp0Config.ini del /F %~dp0Config.ini
34+
IF EXIST %~dp0gmon.out del /F %~dp0gmon.out
35+
IF EXIST %~dp0Images.rar del /F %~dp0Images.rar
36+
IF EXIST %~dp0Images.zip del /F %~dp0Images.zip
37+
IF EXIST %~dp0PlatformerExperiment.exe del /F %~dp0PlatformerExperiment.exe
38+
IF EXIST %~dp0PlatformerExperiment-PRIVATE.exe del /F %~dp0PlatformerExperiment-PRIVATE.exe
39+
IF EXIST %~dp0PlatformerExperiment del /F %~dp0PlatformerExperiment
40+
IF EXIST %~dp0PlatformerExperiment-PRIVATE del /F %~dp0PlatformerExperiment-PRIVATE
41+
IF EXIST %~dp0Player.log del /F %~dp0Player.log
42+
echo.
43+
44+
echo All cleaning done.
45+

Debug/Compile-Debug.bat

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
@echo off
2+
:: A few quick notes about this.
3+
:: %~dp0 is the directory the batch file is in, and it ends with a '\' so don't add it
4+
:: The Batch file has to stay in the main to work as it is written right now
5+
6+
:: This will create the debug verison of the program
7+
:: I recommend using Code::Blocks instead but this is here is it is needed
8+
9+
echo Deleting old files...
10+
::Delete the old .exe if it exists
11+
IF EXIST PlatformerExperiment-PRIVATE.exe del /F PlatformerExperiment-PRIVATE.exe
12+
::Delete Stackdump if it exists (so as to not confuse me later)
13+
IF EXIST PlatformerExperiment-PRIVATE.exe.stackdump del /F PlatformerExperiment-PRIVATE.exe.stackdump
14+
echo.
15+
16+
::Move to the Resources directory
17+
cd %~dp0Resources
18+
echo Compiling Resources...
19+
::Compile the resource files of the icon and boilerplate
20+
windres boilerplate.rc -DDEFINED_BUILD_MODE_PRIVATE -O coff boilerplate.res
21+
echo.
22+
23+
24+
::Move to the source folder
25+
cd %~dp0Source
26+
echo Compiling source files...
27+
::Complie each of the cpp files
28+
echo Compiling main.cpp...
29+
g++ -std=c++11 -I..\SDL2Stuff\include -Wall -Wextra -g -pg -DDEFINED_BUILD_MODE_PRIVATE -c main.cpp
30+
31+
echo Compiling config.cpp...
32+
g++ -std=c++11 -I..\SDL2Stuff\include -Wall -Wextra -g -pg -DDEFINED_BUILD_MODE_PRIVATE -c config.cpp
33+
34+
echo Compiling map.cpp...
35+
g++ -std=c++11 -I..\SDL2Stuff\include -Wall -Wextra -g -pg -DDEFINED_BUILD_MODE_PRIVATE -c map.cpp
36+
37+
echo Compiling entity.cpp...
38+
g++ -std=c++11 -I..\SDL2Stuff\include -Wall -Wextra -g -pg -DDEFINED_BUILD_MODE_PRIVATE -c entity.cpp
39+
40+
echo Compiling tick.cpp...
41+
g++ -std=c++11 -I..\SDL2Stuff\include -Wall -Wextra -g -pg -DDEFINED_BUILD_MODE_PRIVATE -c tick.cpp
42+
43+
echo Compiling screen.cpp...
44+
g++ -std=c++11 -I..\SDL2Stuff\include -Wall -Wextra -g -pg -DDEFINED_BUILD_MODE_PRIVATE -c screen.cpp
45+
46+
::Move back to the main directory
47+
cd %~dp0
48+
49+
echo.
50+
51+
::Complie everything together!
52+
echo Linking everything together...
53+
g++ -std=c++11 -L"C:\Program Files (x86)\CodeBlocks\MinGW\lib" -L%~dp0SDL2Stuff\lib -Wall -Wextra -g -DDEFINED_BUILD_MODE_PRIVATE -o PlatformerExperiment-PRIVATE.exe %~dp0Source\main.o %~dp0source\config.o %~dp0source\map.o %~dp0source\entity.o %~dp0source\tick.o %~dp0source\screen.o %~dp0Resources\boilerplate.res -pg -lgmon -lmingw32 -lSDL2main -lSDL2 -lSDL2_Image -lSDL2_TTF
54+
55+
echo.
56+
::Delete all the leftover parts
57+
echo Deleting object files...
58+
IF EXIST %~dp0Resources\boilerplate.res del /F %~dp0Resources\boilerplate.res
59+
IF EXIST %~dp0Source\main.o del /F %~dp0Source\main.o
60+
IF EXIST %~dp0Source\config.o del /F %~dp0Source\config.o
61+
IF EXIST %~dp0Source\map.o del /F %~dp0Source\map.o
62+
IF EXIST %~dp0Source\entity.o del /F %~dp0Source\entity.o
63+
IF EXIST %~dp0Source\tick.o del /F %~dp0Source\tick.o
64+
IF EXIST %~dp0Source\screen.o del /F %~dp0Source\screen.o
65+
66+
echo.
67+
68+
echo Done!
69+
::Pause encase there was a complie error to allow user to see what the issue is.
70+
pause

Compile.bat renamed to Debug/Compile-Final.bat

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,19 @@
33
:: %~dp0 is the directory the batch file is in, and it ends with a '\' so don't add it
44
:: The Batch file has to stay in the main to work as it is written right now
55

6+
:: This will create the final program not a debug verison
7+
68
echo Deleting old files...
79
::Delete the old .exe if it exists
8-
IF EXIST Platformer-Experiment.exe del /F Platformer-Experiment.exe
10+
IF EXIST PlatformerExperiment.exe del /F PlatformerExperiment.exe
911
::Delete Stackdump if it exists (so as to not confuse me later)
10-
IF EXIST Platformer-Experiment.exe.stackdump del /F Platformer-Experiment.exe.stackdump
12+
IF EXIST PlatformerExperiment.exe.stackdump del /F PlatformerExperiment.exe.stackdump
1113
echo.
1214

1315
::Move to the Resources directory
1416
cd %~dp0Resources
1517
echo Compiling Resources...
1618
::Compile the resource files of the icon and boilerplate
17-
windres my_icon.rc -O coff my_icon.res
1819
windres boilerplate.rc -O coff boilerplate.res
1920
echo.
2021

@@ -24,19 +25,22 @@ cd %~dp0Source
2425
echo Compiling source files...
2526
::Complie each of the cpp files
2627
echo Compiling main.cpp...
27-
g++ -std=c++11 -Wall -g -c main.cpp
28+
g++ -std=c++11 -I..\SDL2Stuff\include -w -Os -s -c main.cpp
2829

2930
echo Compiling config.cpp...
30-
g++ -std=c++11 -Wall -g -c config.cpp
31+
g++ -std=c++11 -I..\SDL2Stuff\include -w -Os -s -c config.cpp
3132

3233
echo Compiling map.cpp...
33-
g++ -std=c++11 -Wall -g -c map.cpp
34+
g++ -std=c++11 -I..\SDL2Stuff\include -w -Os -s -c map.cpp
3435

3536
echo Compiling entity.cpp...
36-
g++ -std=c++11 -Wall -g -c entity.cpp
37+
g++ -std=c++11 -I..\SDL2Stuff\include -w -Os -s -c entity.cpp
3738

3839
echo Compiling tick.cpp...
39-
g++ -std=c++11 -Wall -g -c tick.cpp
40+
g++ -std=c++11 -I..\SDL2Stuff\include -w -Os -s -c tick.cpp
41+
42+
echo Compiling screen.cpp...
43+
g++ -std=c++11 -I..\SDL2Stuff\include -w -Os -s -c screen.cpp
4044

4145
::Move back to the main directory
4246
cd %~dp0
@@ -45,21 +49,20 @@ echo.
4549

4650
::Complie everything together!
4751
echo Linking everything together...
48-
g++ -std=c++11 -Wall -g -o Platformer-Experiment.exe %~dp0Source\main.o %~dp0source\config.o %~dp0source\map.o %~dp0source\entity.o %~dp0source\tick.o %~dp0Resources\my_icon.res %~dp0Resources\boilerplate.res
52+
g++ -std=c++11 -LC:\MinGW\lib -L..\SDL2Stuff\lib -w -Os -s -o PlatformerExperiment.exe %~dp0Source\main.o %~dp0source\config.o %~dp0source\map.o %~dp0source\entity.o %~dp0source\tick.o %~dp0source\screen.o %~dp0Resources\boilerplate.res -lmingw32 -lSDL2main -lSDL2 -lSDL2_Image -lSDL2_TTF
4953

5054
echo.
5155
::Delete all the leftover parts
5256
echo Deleting object files...
5357
IF EXIST %~dp0Resources\boilerplate.res del /F %~dp0Resources\boilerplate.res
54-
IF EXIST %~dp0Resources\my_icon.res del /F %~dp0Resources\my_icon.res
5558
IF EXIST %~dp0Source\main.o del /F %~dp0Source\main.o
5659
IF EXIST %~dp0Source\config.o del /F %~dp0Source\config.o
5760
IF EXIST %~dp0Source\map.o del /F %~dp0Source\map.o
5861
IF EXIST %~dp0Source\entity.o del /F %~dp0Source\entity.o
5962
IF EXIST %~dp0Source\tick.o del /F %~dp0Source\tick.o
63+
IF EXIST %~dp0Source\screen.o del /F %~dp0Source\screen.o
6064

6165
echo.
6266

6367
echo Done!
64-
::Pause encase there was a complie error to allow user to see what the issue is.
65-
pause
68+
pause

Debug/Object-Builder.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#This will make a dump of the objects for the exe
22
#use this with the stackdump to figure out what went wrong.
3-
objdump -D -S ../Platformer-Experiment.exe > build.rasm.log
3+
objdump -D -S ../PlatformerExperiment-PRIVATE.exe > build.rasm.log

Debug/complie.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,29 @@
33
#Move out of Debug directory
44
cd ../
55
#Delete the old .exe if it exists
6-
rm Platformer-Experiment.exe
6+
rm Platformer-Experiment-PRIVATE.exe
77
#Move to the Resources directory
88
cd ./Resources/
99
#Complie the resource files of the icon and boilerplate
10-
windres my_icon.rc -O coff my_icon.res
1110
windres boilerplate.rc -O coff boilerplate.res
1211
#Move to the source folder
1312
cd ../Source
1413
#Complie each of the cpp files
15-
g++ -std=c++11 -Wall -g -c main.cpp
16-
g++ -std=c++11 -Wall -g -c config.cpp
17-
g++ -std=c++11 -Wall -g -c map.cpp
18-
g++ -std=c++11 -Wall -g -c entity.cpp
19-
g++ -std=c++11 -Wall -g -c tick.cpp
14+
g++ -std=c++11 -I../SDL2Stuff/include -Wall -Wextra -pg -g -c main.cpp
15+
g++ -std=c++11 -I../SDL2Stuff/include -Wall -Wextra -pg -g -c config.cpp
16+
g++ -std=c++11 -I../SDL2Stuff/include -Wall -Wextra -pg -g -c map.cpp
17+
g++ -std=c++11 -I../SDL2Stuff/include -Wall -Wextra -pg -g -c entity.cpp
18+
g++ -std=c++11 -I../SDL2Stuff/include -Wall -Wextra -pg -g -c tick.cpp
19+
g++ -std=c++11 -I../SDL2Stuff/include -Wall -Wextra -pg -g -c screen.cpp
2020
#Move back to the main directory
2121
cd ../
2222
#Complie everything together!
23-
g++ -std=c++11 -Wall -g -o Platformer-Experiment.exe ./Source/main.o ./Source/config.o ./Source/map.o ./Source/entity.o ./Source/tick.o ./Resources/my_icon.res ./Resources/boilerplate.res
23+
g++ -std=c++11 -L./SDL2Stuff/lib -Wall -Wextra -pg -g -o PlatformerExperiment-PRIVATE.exe ./Source/main.o ./Source/config.o ./Source/map.o ./Source/entity.o ./Source/tick.o ./Source/screen.o ./Resources/boilerplate.res -lSDL2main -lSDL2 -lSDL2_Image -lSDL2_TTF
2424
#Delete all the leftover parts
2525
rm ./Resources/boilerplate.res
26-
rm ./Resources/my_icon.res
2726
rm ./Source/main.o
2827
rm ./Source/config.o
2928
rm ./Source/map.o
3029
rm ./Source/entity.o
3130
rm ./Source/tick.o
31+
rm ./Source/screen.o

0 commit comments

Comments
 (0)