diff --git a/Assignment3Project/Assignment3Project.sln b/Assignment3Project/Assignment3Project.sln deleted file mode 100644 index d8f531f..0000000 --- a/Assignment3Project/Assignment3Project.sln +++ /dev/null @@ -1,31 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28010.2050 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Assignment3Project", "Assignment3Project\Assignment3Project.vcxproj", "{8A067FEB-7D3A-45FB-BED3-77A1965E41D8}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8A067FEB-7D3A-45FB-BED3-77A1965E41D8}.Debug|x64.ActiveCfg = Debug|x64 - {8A067FEB-7D3A-45FB-BED3-77A1965E41D8}.Debug|x64.Build.0 = Debug|x64 - {8A067FEB-7D3A-45FB-BED3-77A1965E41D8}.Debug|x86.ActiveCfg = Debug|Win32 - {8A067FEB-7D3A-45FB-BED3-77A1965E41D8}.Debug|x86.Build.0 = Debug|Win32 - {8A067FEB-7D3A-45FB-BED3-77A1965E41D8}.Release|x64.ActiveCfg = Release|x64 - {8A067FEB-7D3A-45FB-BED3-77A1965E41D8}.Release|x64.Build.0 = Release|x64 - {8A067FEB-7D3A-45FB-BED3-77A1965E41D8}.Release|x86.ActiveCfg = Release|Win32 - {8A067FEB-7D3A-45FB-BED3-77A1965E41D8}.Release|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {31EA9156-58D8-4051-BF47-8493A2F999B2} - EndGlobalSection -EndGlobal diff --git a/Assignment3Project/Assignment3Project/Assignment3Project.vcxproj b/Assignment3Project/Assignment3Project/Assignment3Project.vcxproj deleted file mode 100644 index 6ac3c69..0000000 --- a/Assignment3Project/Assignment3Project/Assignment3Project.vcxproj +++ /dev/null @@ -1,201 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 15.0 - {8A067FEB-7D3A-45FB-BED3-77A1965E41D8} - Assignment3Project - 10.0.17134.0 - - - - Application - true - v141 - MultiByte - - - Application - false - v141 - true - MultiByte - - - Application - true - v141 - MultiByte - - - Application - false - v141 - true - MultiByte - - - - - - - - - - - - - - - - - - - - - true - true - true - true - true - true - true - - - true - true - true - true - true - true - true - true - true - true - true - - - true - true - true - true - true - true - true - true - true - true - true - - - - Level3 - Disabled - true - true - - - - - Level3 - Disabled - true - true - _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - - - Windows - - - - - Level3 - MaxSpeed - true - true - true - true - - - true - true - - - - - Level3 - MaxSpeed - true - true - true - true - - - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - \ No newline at end of file diff --git a/Assignment3Project/Assignment3Project/Assignment3Project.vcxproj.filters b/Assignment3Project/Assignment3Project/Assignment3Project.vcxproj.filters deleted file mode 100644 index 8e6ce7c..0000000 --- a/Assignment3Project/Assignment3Project/Assignment3Project.vcxproj.filters +++ /dev/null @@ -1,119 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - {b3cfe90b-396f-4928-8b95-6b453c9cdee6} - - - {079f6f25-ed43-4671-bb66-1a1c580b5f6b} - - - {e9904f71-fa80-4ab4-a0ee-7fc1c8c3f92e} - - - {60b0cc02-34f3-4b2f-a55d-aae1f622f730} - - - {df34ca78-eaef-42da-84e1-e081ee065499} - - - {d177d104-1e60-4cd4-81d4-232c379ac302} - - - - - Header Files\Engine - - - Header Files\Engine - - - Header Files\Screens - - - Header Files\Engine - - - Header Files\Assignment3 - - - Header Files\Screens - - - Header Files\Assignment3 - - - Header Files\Engine - - - Header Files\Assignment3 - - - Header Files\Engine - - - Header Files\Screens - - - Header Files\Assignment3 - - - Header Files\Screens - - - - - Source Files - - - Source Files\ScreensImplement - - - Source Files\EngineImplement - - - Source Files\EngineImplement - - - Source Files\ScreensImplement - - - Source Files\Assignment3Implement - - - Source Files\Assignment3Implement - - - Source Files\EngineImplement - - - Source Files\ScreensImplement - - - Source Files\ScreensImplement - - - Source Files\Assignment3Implement - - - - - Resource Files - - - - - - \ No newline at end of file diff --git a/Assignment3Project/Assignment3Project/mappy.exe b/Assignment3Project/Assignment3Project/mappy.exe deleted file mode 100644 index 999b6a1..0000000 Binary files a/Assignment3Project/Assignment3Project/mappy.exe and /dev/null differ diff --git a/Assignment3Project/Assignment3Project/packages.config b/Assignment3Project/Assignment3Project/packages.config deleted file mode 100644 index 0c6bbd7..0000000 --- a/Assignment3Project/Assignment3Project/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..49b11d8 --- /dev/null +++ b/Makefile @@ -0,0 +1,56 @@ +C=g++ +CFLAGS= +LDFLAGS=-L/usr/lib -lallegro -lallegro_font -lallegro_image -lallegro_acodec -lallegro_audio -lallegro_primitives +INCLUDE=-I. -I/usr/include/allegro5 + +OBJS=main.o +SCREEN_OBJS=start_screen.o game_screen.o help_screen.o result_screen.o +G_OBJS=game.o cursor.o ship.o object_manager.o star.o bullet.o +OUT=main + +all: main_game + +clean: + rm -rf *.o $(OUT) + +main_game: $(OBJS) $(G_OBJS) $(SCREEN_OBJS) + $(C) $(OBJS) $(G_OBJS) $(SCREEN_OBJS) -o $(OUT) $(INCLUDE) $(CFLAGS) $(LDFLAGS) + +main.o: main.cpp + $(C) -c main.cpp + +################# +# Game Objects +################# +game.o: game.cpp game.h + $(C) -c game.cpp game.h + +cursor.o: cursor.cpp cursor.h + $(C) -c cursor.cpp cursor.h + +ship.o: ship.cpp ship.h + $(C) -c ship.cpp ship.h + +object_manager.o: object_manager.cpp object_manager.h + $(C) -c object_manager.cpp object_manager.h + +star.o: star.cpp star.h + $(C) -c star.cpp star.h + +bullet.o: bullet.cpp bullet.h + $(C) -c bullet.cpp bullet.h + +################# +# Screen Objects +################# +start_screen.o: start_screen.cpp start_screen.h screen.h + $(C) -c start_screen.cpp start_screen.h + +game_screen.o: game_screen.cpp game_screen.h screen.h + $(C) -c game_screen.cpp game_screen.h + +help_screen.o: help_screen.cpp help_screen.h screen.h + $(C) -c help_screen.cpp help_screen.h + +result_screen.o: result_screen.cpp result_screen.h screen.h + $(C) -c result_screen.cpp result_screen.h diff --git a/Assignment3Project/Assignment3Project/README.TXT b/README.TXT similarity index 100% rename from Assignment3Project/Assignment3Project/README.TXT rename to README.TXT diff --git a/Assignment3Project/Assignment3Project/bullet.cpp b/bullet.cpp similarity index 100% rename from Assignment3Project/Assignment3Project/bullet.cpp rename to bullet.cpp diff --git a/Assignment3Project/Assignment3Project/bullet.h b/bullet.h similarity index 100% rename from Assignment3Project/Assignment3Project/bullet.h rename to bullet.h diff --git a/bullet.h.gch b/bullet.h.gch new file mode 100644 index 0000000..22a9c98 Binary files /dev/null and b/bullet.h.gch differ diff --git a/bullet.o b/bullet.o new file mode 100644 index 0000000..6fab864 Binary files /dev/null and b/bullet.o differ diff --git a/Assignment3Project/Assignment3Project/cheesetheme.wav b/cheesetheme.wav similarity index 100% rename from Assignment3Project/Assignment3Project/cheesetheme.wav rename to cheesetheme.wav diff --git a/Assignment3Project/Assignment3Project/cursor.cpp b/cursor.cpp similarity index 99% rename from Assignment3Project/Assignment3Project/cursor.cpp rename to cursor.cpp index 9d6620f..a6054e4 100644 --- a/Assignment3Project/Assignment3Project/cursor.cpp +++ b/cursor.cpp @@ -104,6 +104,7 @@ template void Cursor::up(); template void Cursor::down(); template string Cursor::get_selected(); template void Cursor::update_selector(); +template <> vector Cursor::get_item_strings() { return items; -} \ No newline at end of file +} diff --git a/Assignment3Project/Assignment3Project/cursor.h b/cursor.h similarity index 96% rename from Assignment3Project/Assignment3Project/cursor.h rename to cursor.h index 98df0d7..29067d5 100644 --- a/Assignment3Project/Assignment3Project/cursor.h +++ b/cursor.h @@ -2,6 +2,7 @@ #include #include #include +#include //Default object used for menues template @@ -29,4 +30,4 @@ private: std::vector get_item_strings(); void update_selector(); void redraw(); -}; \ No newline at end of file +}; diff --git a/cursor.h.gch b/cursor.h.gch new file mode 100644 index 0000000..1876d2d Binary files /dev/null and b/cursor.h.gch differ diff --git a/cursor.o b/cursor.o new file mode 100644 index 0000000..b293a0d Binary files /dev/null and b/cursor.o differ diff --git a/Assignment3Project/Assignment3Project/death.wav b/death.wav similarity index 100% rename from Assignment3Project/Assignment3Project/death.wav rename to death.wav diff --git a/Assignment3Project/Assignment3Project/enemies.txt b/enemies.txt similarity index 100% rename from Assignment3Project/Assignment3Project/enemies.txt rename to enemies.txt diff --git a/Assignment3Project/Assignment3Project/enemy.bmp b/enemy.bmp similarity index 100% rename from Assignment3Project/Assignment3Project/enemy.bmp rename to enemy.bmp diff --git a/Assignment3Project/Assignment3Project/enums.h b/enums.h similarity index 100% rename from Assignment3Project/Assignment3Project/enums.h rename to enums.h diff --git a/Assignment3Project/Assignment3Project/fire.wav b/fire.wav similarity index 100% rename from Assignment3Project/Assignment3Project/fire.wav rename to fire.wav diff --git a/Assignment3Project/Assignment3Project/font.tga b/font.tga similarity index 100% rename from Assignment3Project/Assignment3Project/font.tga rename to font.tga diff --git a/Assignment3Project/Assignment3Project/game.cpp b/game.cpp similarity index 100% rename from Assignment3Project/Assignment3Project/game.cpp rename to game.cpp diff --git a/Assignment3Project/Assignment3Project/game.h b/game.h similarity index 100% rename from Assignment3Project/Assignment3Project/game.h rename to game.h diff --git a/game.h.gch b/game.h.gch new file mode 100644 index 0000000..c2d4f09 Binary files /dev/null and b/game.h.gch differ diff --git a/game.o b/game.o new file mode 100644 index 0000000..c65efd0 Binary files /dev/null and b/game.o differ diff --git a/Assignment3Project/Assignment3Project/game_element.h b/game_element.h similarity index 100% rename from Assignment3Project/Assignment3Project/game_element.h rename to game_element.h diff --git a/Assignment3Project/Assignment3Project/game_screen.cpp b/game_screen.cpp similarity index 100% rename from Assignment3Project/Assignment3Project/game_screen.cpp rename to game_screen.cpp diff --git a/Assignment3Project/Assignment3Project/game_screen.h b/game_screen.h similarity index 100% rename from Assignment3Project/Assignment3Project/game_screen.h rename to game_screen.h diff --git a/game_screen.h.gch b/game_screen.h.gch new file mode 100644 index 0000000..305cf8e Binary files /dev/null and b/game_screen.h.gch differ diff --git a/game_screen.o b/game_screen.o new file mode 100644 index 0000000..a268934 Binary files /dev/null and b/game_screen.o differ diff --git a/Assignment3Project/Assignment3Project/help_screen.cpp b/help_screen.cpp similarity index 100% rename from Assignment3Project/Assignment3Project/help_screen.cpp rename to help_screen.cpp diff --git a/Assignment3Project/Assignment3Project/help_screen.h b/help_screen.h similarity index 100% rename from Assignment3Project/Assignment3Project/help_screen.h rename to help_screen.h diff --git a/help_screen.h.gch b/help_screen.h.gch new file mode 100644 index 0000000..193d442 Binary files /dev/null and b/help_screen.h.gch differ diff --git a/help_screen.o b/help_screen.o new file mode 100644 index 0000000..349e056 Binary files /dev/null and b/help_screen.o differ diff --git a/Assignment3Project/Assignment3Project/hit.wav b/hit.wav similarity index 100% rename from Assignment3Project/Assignment3Project/hit.wav rename to hit.wav diff --git a/Assignment3Project/Assignment3Project/level.fmp b/level.fmp similarity index 100% rename from Assignment3Project/Assignment3Project/level.fmp rename to level.fmp diff --git a/main b/main new file mode 100755 index 0000000..5561a34 Binary files /dev/null and b/main differ diff --git a/Assignment3Project/Assignment3Project/main.cpp b/main.cpp similarity index 100% rename from Assignment3Project/Assignment3Project/main.cpp rename to main.cpp diff --git a/main.o b/main.o new file mode 100644 index 0000000..9d52720 Binary files /dev/null and b/main.o differ diff --git a/Assignment3Project/Assignment3Project/music_off.bmp b/music_off.bmp similarity index 100% rename from Assignment3Project/Assignment3Project/music_off.bmp rename to music_off.bmp diff --git a/Assignment3Project/Assignment3Project/music_on.bmp b/music_on.bmp similarity index 100% rename from Assignment3Project/Assignment3Project/music_on.bmp rename to music_on.bmp diff --git a/Assignment3Project/Assignment3Project/object_manager.cpp b/object_manager.cpp similarity index 100% rename from Assignment3Project/Assignment3Project/object_manager.cpp rename to object_manager.cpp diff --git a/Assignment3Project/Assignment3Project/object_manager.h b/object_manager.h similarity index 100% rename from Assignment3Project/Assignment3Project/object_manager.h rename to object_manager.h diff --git a/object_manager.h.gch b/object_manager.h.gch new file mode 100644 index 0000000..4a62cff Binary files /dev/null and b/object_manager.h.gch differ diff --git a/object_manager.o b/object_manager.o new file mode 100644 index 0000000..cdd31aa Binary files /dev/null and b/object_manager.o differ diff --git a/Assignment3Project/Assignment3Project/parallax.bmp b/parallax.bmp similarity index 100% rename from Assignment3Project/Assignment3Project/parallax.bmp rename to parallax.bmp diff --git a/Assignment3Project/Assignment3Project/placeholder.bmp b/placeholder.bmp similarity index 100% rename from Assignment3Project/Assignment3Project/placeholder.bmp rename to placeholder.bmp diff --git a/Assignment3Project/Assignment3Project/result_screen.cpp b/result_screen.cpp similarity index 100% rename from Assignment3Project/Assignment3Project/result_screen.cpp rename to result_screen.cpp diff --git a/Assignment3Project/Assignment3Project/result_screen.h b/result_screen.h similarity index 100% rename from Assignment3Project/Assignment3Project/result_screen.h rename to result_screen.h diff --git a/result_screen.h.gch b/result_screen.h.gch new file mode 100644 index 0000000..c217720 Binary files /dev/null and b/result_screen.h.gch differ diff --git a/result_screen.o b/result_screen.o new file mode 100644 index 0000000..0e7b64f Binary files /dev/null and b/result_screen.o differ diff --git a/Assignment3Project/Assignment3Project/screen.h b/screen.h similarity index 100% rename from Assignment3Project/Assignment3Project/screen.h rename to screen.h diff --git a/Assignment3Project/Assignment3Project/ship.cpp b/ship.cpp similarity index 100% rename from Assignment3Project/Assignment3Project/ship.cpp rename to ship.cpp diff --git a/Assignment3Project/Assignment3Project/ship.h b/ship.h similarity index 100% rename from Assignment3Project/Assignment3Project/ship.h rename to ship.h diff --git a/ship.h.gch b/ship.h.gch new file mode 100644 index 0000000..4c39b38 Binary files /dev/null and b/ship.h.gch differ diff --git a/ship.o b/ship.o new file mode 100644 index 0000000..5604a16 Binary files /dev/null and b/ship.o differ diff --git a/Assignment3Project/Assignment3Project/spaceforce.bmp b/spaceforce.bmp similarity index 100% rename from Assignment3Project/Assignment3Project/spaceforce.bmp rename to spaceforce.bmp diff --git a/Assignment3Project/Assignment3Project/star.cpp b/star.cpp similarity index 100% rename from Assignment3Project/Assignment3Project/star.cpp rename to star.cpp diff --git a/Assignment3Project/Assignment3Project/star.h b/star.h similarity index 100% rename from Assignment3Project/Assignment3Project/star.h rename to star.h diff --git a/star.h.gch b/star.h.gch new file mode 100644 index 0000000..d88e3af Binary files /dev/null and b/star.h.gch differ diff --git a/star.o b/star.o new file mode 100644 index 0000000..4b2d105 Binary files /dev/null and b/star.o differ diff --git a/Assignment3Project/Assignment3Project/start_screen.cpp b/start_screen.cpp similarity index 100% rename from Assignment3Project/Assignment3Project/start_screen.cpp rename to start_screen.cpp diff --git a/Assignment3Project/Assignment3Project/start_screen.h b/start_screen.h similarity index 100% rename from Assignment3Project/Assignment3Project/start_screen.h rename to start_screen.h diff --git a/start_screen.h.gch b/start_screen.h.gch new file mode 100644 index 0000000..e10330e Binary files /dev/null and b/start_screen.h.gch differ diff --git a/start_screen.o b/start_screen.o new file mode 100644 index 0000000..10d0797 Binary files /dev/null and b/start_screen.o differ diff --git a/Assignment3Project/Assignment3Project/test32bpp.fmp b/test32bpp.fmp similarity index 100% rename from Assignment3Project/Assignment3Project/test32bpp.fmp rename to test32bpp.fmp diff --git a/Assignment3Project/Assignment3Project/test8bpp.fmp b/test8bpp.fmp similarity index 100% rename from Assignment3Project/Assignment3Project/test8bpp.fmp rename to test8bpp.fmp diff --git a/Assignment3Project/Assignment3Project/testhex.fmp b/testhex.fmp similarity index 100% rename from Assignment3Project/Assignment3Project/testhex.fmp rename to testhex.fmp diff --git a/Assignment3Project/Assignment3Project/testiso.fmp b/testiso.fmp similarity index 100% rename from Assignment3Project/Assignment3Project/testiso.fmp rename to testiso.fmp diff --git a/Assignment3Project/Assignment3Project/victory.wav b/victory.wav similarity index 100% rename from Assignment3Project/Assignment3Project/victory.wav rename to victory.wav