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

Commit 4e7ed76

Browse files
author
Patrick Rye
committed
Update to v1.5.2c
I know I said I am no looking updating this game; but I was looking through it today and thought I should do a few things. Added version.h to keep version stuff central Added Code blocks support Made Changelog central in docs folder (everything that was listed before in the specifc files is deleted) Added version infomation in boilderplate Added compile bat (which used MinGW) I have half a mind to come back and change this because now that I've learned so much more about c++ I can see a millions ways I could do this better. But I am already working on one project that is taking up a lot of my time, so I'm not sure if I'm ready to add something else on the list. Maybe in the future I'll revisit this but until then I won't do too much to this; maybe a small update every now and again.
1 parent 3d36388 commit 4e7ed76

File tree

18 files changed

+430
-318
lines changed

18 files changed

+430
-318
lines changed

.gitattributes

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# Custom for Visual Studio
5+
*.cs diff=csharp
6+
7+
# Standard to msysgit
8+
*.doc diff=astextplain
9+
*.DOC diff=astextplain
10+
*.docx diff=astextplain
11+
*.DOCX diff=astextplain
12+
*.dot diff=astextplain
13+
*.DOT diff=astextplain
14+
*.pdf diff=astextplain
15+
*.PDF diff=astextplain
16+
*.rtf diff=astextplain
17+
*.RTF diff=astextplain

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,24 @@
2626
*.exe
2727
*.out
2828
*.app
29+
30+
# Log file
31+
*.log
32+
33+
# Save Files
34+
*.bif
35+
36+
# Resource Files
37+
*.res
38+
39+
# Stackdump
40+
*.stackdump
41+
42+
# Code Blocks files
43+
/Project/bin/
44+
/Project/bin/*
45+
/Project/obj/
46+
/Project/obj/*
47+
*.layout
48+
*.depend
49+

Compile.bat

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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 final program not a debug verison
7+
8+
echo Deleting old files...
9+
::Delete the debug .exe if it exists
10+
IF EXIST Attacker-The-Game.exe del /F Attacker-The-Game.exe
11+
::Delete debug Stackdump if it exists (so as to not confuse me later)
12+
IF EXIST Attacker-The-Game.exe.stackdump del /F Attacker-The-Game.exe.stackdump
13+
echo.
14+
15+
::Move to the Resources directory
16+
cd %~dp0res
17+
echo Compiling Resources...
18+
::Compile the resource files of the icon and boilerplate
19+
windres my_icon.rc -O coff my_icon.res
20+
windres boilerplate.rc -O coff boilerplate.res
21+
echo.
22+
23+
24+
::Move to the source folder
25+
cd %~dp0src
26+
echo Compiling source files...
27+
::Complie each of the cpp files
28+
echo Compiling main.cpp...
29+
g++ -std=c++11 -w -Os -O3 -c main.cpp
30+
31+
::Move back to the main directory
32+
cd %~dp0
33+
34+
echo.
35+
36+
::Complie everything together!
37+
echo Linking everything together...
38+
g++ -std=c++11 -w -Os -O3 -o Attacker-The-Game.exe %~dp0src\main.o %~dp0res\my_icon.res %~dp0res\boilerplate.res
39+
40+
echo.
41+
::Delete all the leftover parts
42+
echo Deleting object files...
43+
IF EXIST %~dp0res\boilerplate.res del /F %~dp0res\boilerplate.res
44+
IF EXIST %~dp0res\my_icon.res del /F %~dp0res\my_icon.res
45+
IF EXIST %~dp0src\main.o del /F %~dp0src\main.o
46+
47+
echo.
48+
49+
echo Done!
50+

docs/ChangesLog.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
22 August 2015
2+
Released version 1.5.2c
3+
4+
Change log:
5+
-Fixed: Version info being wrong
6+
-Fixed: Compile issue
7+
8+
22 August 2015
9+
Released version 1.5.0c
10+
11+
Change log:
12+
-Added: Version.h
13+
-Removed: Change log at the start of every file
14+
-Updated: Folders of the program to be cleaner
15+
-Added: Code Blocks Support
16+
-Added: Icon
17+
-Added: Boilerplate info
18+
-Added: Compile.bat
19+
-New: Change log (everything before this one is considered "lost")
20+
-Changed: Compiler from Cygwin to MinGW / Code Blocks
21+
File renamed without changes.

project/Attacker-The-Game.cbp

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
2+
<CodeBlocks_project_file>
3+
<FileVersion major="1" minor="6" />
4+
<Project>
5+
<Option title="Attacker-The-Game" />
6+
<Option pch_mode="2" />
7+
<Option compiler="gcc" />
8+
<Build>
9+
<Target title="Debug">
10+
<Option output="bin/Attacker-The-Game" prefix_auto="1" extension_auto="1" />
11+
<Option object_output="obj/" />
12+
<Option type="1" />
13+
<Option compiler="gcc" />
14+
<Compiler>
15+
<Add option="-Wextra" />
16+
<Add option="-Wall" />
17+
<Add option="-pg" />
18+
<Add option="-g" />
19+
<Add option="-DDEFINED_BUILD_MODE_PRIVATE" />
20+
</Compiler>
21+
<Linker>
22+
<Add option="-pg -lgmon" />
23+
</Linker>
24+
</Target>
25+
<Target title="Release">
26+
<Option output="bin/Release/Attacker-The-Game" prefix_auto="1" extension_auto="1" />
27+
<Option object_output="obj/Release/" />
28+
<Option type="1" />
29+
<Option compiler="gcc" />
30+
<Compiler>
31+
<Add option="-O2" />
32+
<Add option="-w" />
33+
</Compiler>
34+
<Linker>
35+
<Add option="-s" />
36+
</Linker>
37+
</Target>
38+
</Build>
39+
<Compiler>
40+
<Add option="-Wall" />
41+
</Compiler>
42+
<Unit filename="../res/boilerplate.rc">
43+
<Option compilerVar="WINDRES" />
44+
<Option weight="100" />
45+
</Unit>
46+
<Unit filename="../res/my_icon.rc">
47+
<Option compilerVar="WINDRES" />
48+
<Option weight="99" />
49+
</Unit>
50+
<Unit filename="../src/basic.h" />
51+
<Unit filename="../src/battle.h" />
52+
<Unit filename="../src/main.cpp" />
53+
<Unit filename="../src/rooms.h" />
54+
<Unit filename="../src/save.h" />
55+
<Unit filename="../src/spells.h" />
56+
<Unit filename="../src/version.h" />
57+
<Extensions>
58+
<AutoVersioning>
59+
<Scheme minor_max="99" build_max="0" rev_max="0" rev_rand_max="999" build_times_to_increment_minor="500" />
60+
<Settings autoincrement="1" date_declarations="1" use_define="1" update_manifest="1" do_auto_increment="1" ask_to_increment="0" language="C++" svn="0" svn_directory="" header_path="..\src\version.h" />
61+
<Changes_Log show_changes_editor="1" app_title="Released version %M.%m.%b%t" changeslog_path="..\docs\ChangesLog.txt" />
62+
<Code header_guard="__VERSION_HEADER__" namespace="Version" prefix="DEFINED_VER" />
63+
</AutoVersioning>
64+
<code_completion />
65+
<envvars />
66+
<debugger />
67+
<lib_finder disable_auto="1" />
68+
</Extensions>
69+
</Project>
70+
</CodeBlocks_project_file>

project/ReadMe.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Project Folder
2+
3+
This folder will hold the project files that are generated by Code::Blocks
4+
5+
You will only need this if you are using Code::Blocks and even then only if you want the same settings I use.
6+
7+
You can ignore this.

res/Icon_App.ico

5.3 KB
Binary file not shown.

res/Readme.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
##Resources Folder
2+
3+
This folder holds resources that are used by the program.
4+
5+
Currently it holds the Icon I use for the program, as well as the boilerplate which hold infomation about the program that can be seen in the complied .exe
6+
7+
## Icon Credit
8+
9+
Credit for the Icon I use goes to [Mihaiciuc Bogdan] (http://bogo-d.deviantart.com/).
10+
11+
You can find the orginal [Here](http://www.iconarchive.com/show/kingdom-icons-by-bogo-d/Shield-Minor-Swords-icon.html).
12+

res/boilerplate.rc

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/**********************************************************************************************************************************************/
2+
#include <windows.h>
3+
#include "../src/version.h"
4+
/**********************************************************************************************************************************************/
5+
//General stuff that should need to be changed
6+
#define VER_COMPANYNAME_STR "Public Domain\0"
7+
#define VER_FILEDESCRIPTION_STR "A simple rougelike game to allow me to learn c++\0"
8+
#define VER_FILENAME_STR "Attacker-The-Game\0"
9+
#define VER_ORIGINALFILENAME_STR "Attacker-The-Game.exe\0"
10+
#define VER_LEGALCOPYRIGHT_STR "http://unlicense.org\0"
11+
#define VER_COMMENTS_STR "Source Code found at: https://github.com/GamerMan7799/Attacker-The-Game\0"
12+
/**********************************************************************************************************************************************/
13+
//If Private is define above, indicting that it was a build not meant to be released define these variables
14+
#ifndef DEFINED_BUILD_MODE_PRIVATE
15+
#define VER_DEBUG 0
16+
#define VER_PRIVATEBUILD 0
17+
#define VER_PRERELEASE 0
18+
#else
19+
#define VER_DEBUG VS_FF_DEBUG
20+
#define VER_PRIVATEBUILD VS_FF_PRIVATEBUILD
21+
#define VER_PRERELEASE VS_FF_PRERELEASE
22+
#endif
23+
/**********************************************************************************************************************************************/
24+
VS_VERSION_INFO VERSIONINFO
25+
FILEVERSION DEFINED_VER_RC_FILEVERSION
26+
PRODUCTVERSION DEFINED_VER_RC_FILEVERSION
27+
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
28+
FILEFLAGS (VER_PRIVATEBUILD|VER_PRERELEASE|VER_DEBUG)
29+
FILEOS VOS__WINDOWS32
30+
FILETYPE VFT_APP
31+
FILESUBTYPE VFT2_UNKNOWN
32+
BEGIN
33+
BLOCK "StringFileInfo"
34+
BEGIN
35+
BLOCK "040904E4"
36+
BEGIN
37+
VALUE "CompanyName", VER_COMPANYNAME_STR
38+
VALUE "FileDescription", VER_FILEDESCRIPTION_STR
39+
VALUE "FileVersion", DEFINED_VER_RC_FILEVERSION_STRING
40+
VALUE "InternalName", VER_FILENAME_STR
41+
VALUE "LegalCopyright", VER_LEGALCOPYRIGHT_STR
42+
VALUE "OriginalFilename", VER_ORIGINALFILENAME_STR
43+
VALUE "ProductName", VER_FILENAME_STR
44+
VALUE "ProductVersion", DEFINED_VER_FULLVERSION_STRING
45+
VALUE "Comments", VER_COMMENTS_STR
46+
END
47+
END
48+
49+
BLOCK "VarFileInfo"
50+
BEGIN
51+
VALUE "Translation", 0x409, 1252
52+
END
53+
END
54+
/**********************************************************************************************************************************************/

0 commit comments

Comments
 (0)