Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Peters Group Project Group Blue/BigApple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include "BigApple.h"
#include <iostream>
#include <cmath>

BigApple::BigApple()
{
Expand All @@ -10,7 +11,7 @@ BigApple::BigApple()

void BigApple::loadBigApple()
{
if (!m_texture.loadFromFile("ASSETS\\IMAGES\\bigAppleAnimated.png"))
if (!m_texture.loadFromFile("ASSETS/IMAGES/bigAppleAnimated.png"))
{
std::cout << "problem loading small apple texture" << std::endl;
}
Expand Down
14 changes: 7 additions & 7 deletions Peters Group Project Group Blue/Game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ void Game::render()
/// </summary>
void Game::setupFontAndText()
{
if (!m_gregorFont.loadFromFile("ASSETS\\FONTS\\GregorFont.ttf"))
if (!m_gregorFont.loadFromFile("ASSETS/FONTS/GregorFont.ttf"))
{
std::cout << "problem loading gregor font" << std::endl;
}
Expand All @@ -284,7 +284,7 @@ void Game::setupFontAndText()
m_appleCountText.setFillColor(sf::Color(229, 227, 222));
m_appleCountText.setPosition(0 + 60, 0 + 90);

if (!m_appleCountTexture.loadFromFile("ASSETS\\IMAGES\\apple_indicator.png"))
if (!m_appleCountTexture.loadFromFile("ASSETS/IMAGES/apple_indicator.png"))
{
std::cout << "problem loading apple indicator" << std::endl;
}
Expand All @@ -308,19 +308,19 @@ void Game::setupMouseDot() // circle shape

void Game::loadBackground()
{
if (!m_startBg.loadFromFile("ASSETS\\IMAGES\\bg.png")) // standard menu bg
if (!m_startBg.loadFromFile("ASSETS/IMAGES/bg.png")) // standard menu bg
{
// simple error message if previous call fails
std::cout << "problem loading start bg" << std::endl;
}

if (!m_gameplayBg.loadFromFile("ASSETS\\IMAGES\\tiles_lighter.png")) // standard gameplay bg
if (!m_gameplayBg.loadFromFile("ASSETS/IMAGES/tiles_lighter.png")) // standard gameplay bg
{
// simple error message if previous call fails
std::cout << "problem loading game bg" << std::endl;
}

if (!m_endBg.loadFromFile("ASSETS\\IMAGES\\bgdeath.png")) // menu bg after a game was played and stats are shown
if (!m_endBg.loadFromFile("ASSETS/IMAGES/bgdeath.png")) // menu bg after a game was played and stats are shown
{
// simple error message if previous call fails
std::cout << "problem loading end bg" << std::endl;
Expand All @@ -330,15 +330,15 @@ void Game::loadBackground()

m_backgroundSprite.setTexture(m_startBg);

if (!m_instructionsIconTexture.loadFromFile("ASSETS\\IMAGES\\instructions_icon.png"))
if (!m_instructionsIconTexture.loadFromFile("ASSETS/IMAGES/instructions_icon.png"))
{
std::cout << "Error loading instructions icon" << std::endl;
}
m_instructionsIconSprite.setTexture(m_instructionsIconTexture);
m_instructionsIconSprite.setScale(0.7, 0.7);
m_instructionsIconSprite.setPosition(0 + 120, SCREEN_HEIGHT_BIG_APPLE - 90);

if (!m_instructionsBg.loadFromFile("ASSETS\\IMAGES\\instructions_bg.png"))
if (!m_instructionsBg.loadFromFile("ASSETS/IMAGES/instructions_bg.png"))
{
// simple error message if previous call fails
std::cout << "problem loading instructions bg" << std::endl;
Expand Down
6 changes: 3 additions & 3 deletions Peters Group Project Group Blue/Gregor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Gregor::Gregor()

void Gregor::loadGregor()
{
if (!m_gregorTexture.loadFromFile("ASSETS\\IMAGES\\gregor.png"))
if (!m_gregorTexture.loadFromFile("ASSETS/IMAGES/gregor.png"))
{
std::cout << "Error loading gregor" << std::endl;
}
Expand All @@ -33,7 +33,7 @@ void Gregor::loadGregor()

void Gregor::loadSound()
{
if (!m_stepsBuffer.loadFromFile("ASSETS\\AUDIO\\gregor_walk.wav"))
if (!m_stepsBuffer.loadFromFile("ASSETS/AUDIO/gregor_walk.wav"))
{
std::cout << "Error loading gregor walk sound effect" << std::endl;
}
Expand Down Expand Up @@ -256,7 +256,7 @@ void Gregor::gregorReset()

void Gregor::loadHearts()
{
if (!m_heartsTexture.loadFromFile("ASSETS\\IMAGES\\hearts_spritesheet.png"))
if (!m_heartsTexture.loadFromFile("ASSETS/IMAGES/hearts_spritesheet.png"))
{
std::cout << "Error loading hearts" << std::endl;
}
Expand Down
12 changes: 6 additions & 6 deletions Peters Group Project Group Blue/Instructions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Instructions::Instructions()

void Instructions::loadInstructions()
{
if (!m_controlsFont.loadFromFile("ASSETS\\FONTS\\GregorFont.ttf"))
if (!m_controlsFont.loadFromFile("ASSETS/FONTS/GregorFont.ttf"))
{
std::cout << "Error loading controls font" << std::endl;
}
Expand All @@ -19,7 +19,7 @@ void Instructions::loadInstructions()
m_controlsText.setPosition(120, 630);
m_controlsText.setString(" Click once on small apples to deflect them \n\n Double click on big apples to deflect them \n\n Small apples deal 1 heart of damage; Big apples deal 2 hearts of damage. ");

if (!m_storyFont.loadFromFile("ASSETS\\FONTS\\GregorFont.ttf"))
if (!m_storyFont.loadFromFile("ASSETS/FONTS/GregorFont.ttf"))
{
std::cout << "Error loading controls font" << std::endl;
}
Expand All @@ -28,31 +28,31 @@ void Instructions::loadInstructions()
m_storyText.setPosition(35, 25);
m_storyText.setString("As Gregor Samsa awoke one day from uneasy dreams he found himself transformed in his bed into a gigantic insect.\n\nHis family, initially shocked by his metamorphosis, gradually became accustomed to his new form, yet their acceptance was short-lived.\n\n\"Mother has been fainting. She's better now. Gregor's broken loose.\" \n\"Just what I expected,\" said his father.\n\nTruly, this was not the father Gregor had imagined to himself;\nadmittedly he had been too absorbed of late in his new recreation of crawling over the ceiling\n- suddenly something lightly flung landed close behind him and rolled before him. \n\nIt was an apple; a second apple followed immediately.\n\nY o u r g o a l n o w i s t o s a v e G r e g o r f r o m t h e a p p l e s t h r o w n a t h i m . ");

if (!m_smallAppleExample.loadFromFile("ASSETS\\IMAGES\\smallApple.png"))
if (!m_smallAppleExample.loadFromFile("ASSETS/IMAGES/smallApple.png"))
{
std::cout << "Error loading small example apple" << std::endl;
}
m_smallAppleExampleSprite.setTexture(m_smallAppleExample);
m_smallAppleExampleSprite.setScale(0.08, 0.08);
m_smallAppleExampleSprite.setPosition(40, 600);

if (!m_bigAppleExample.loadFromFile("ASSETS\\IMAGES\\bigApple.png"))
if (!m_bigAppleExample.loadFromFile("ASSETS/IMAGES/bigApple.png"))
{
std::cout << "Error loading small example apple" << std::endl;
}
m_bigAppleExampleSprite.setTexture(m_bigAppleExample);
m_bigAppleExampleSprite.setScale(0.09, 0.09);
m_bigAppleExampleSprite.setPosition(35, 680);

if (!m_homeButtonTexture.loadFromFile("ASSETS\\IMAGES\\home.png"))
if (!m_homeButtonTexture.loadFromFile("ASSETS/IMAGES/home.png"))
{
std::cout << "Error loading home button image" << std::endl;
}
m_homeButtonSprite.setTexture(m_homeButtonTexture);
m_homeButtonSprite.setScale(0.7, 0.7);
m_homeButtonSprite.setPosition(1200 - 100, 900 - 100);

if (!m_heartExample.loadFromFile("ASSETS\\IMAGES\\hearts_spritesheet.png"))
if (!m_heartExample.loadFromFile("ASSETS/IMAGES/hearts_spritesheet.png"))
{
std::cout << "Error loading hearts example image" << std::endl;
}
Expand Down
8 changes: 4 additions & 4 deletions Peters Group Project Group Blue/Menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Menu::Menu()

void Menu::loadMenu()
{
if (!m_saveGregorFont.loadFromFile("ASSETS\\FONTS\\GregorFont.ttf"))
if (!m_saveGregorFont.loadFromFile("ASSETS/FONTS/GregorFont.ttf"))
{
std::cout << "Error loading gregor font" << std::endl;
}
Expand All @@ -26,11 +26,11 @@ void Menu::loadMenu()

void Menu::loadSoundButton()
{
if (!m_soundOnTexture.loadFromFile("ASSETS\\IMAGES\\music_on.png"))
if (!m_soundOnTexture.loadFromFile("ASSETS/IMAGES/music_on.png"))
{
std::cout << "Error loading sounds on" << std::endl;
}
if (!m_soundOffTexture.loadFromFile("ASSETS\\IMAGES\\music_off.png"))
if (!m_soundOffTexture.loadFromFile("ASSETS/IMAGES/music_off.png"))
{
std::cout << "Error loading sounds off" << std::endl;
}
Expand All @@ -47,7 +47,7 @@ sf::Sprite Menu::getSoundButton()

void Menu::loadSprites()
{
if (!m_startGameTexture.loadFromFile("ASSETS\\IMAGES\\start_game_button.png"))
if (!m_startGameTexture.loadFromFile("ASSETS/IMAGES/start_game_button.png"))
{
std::cout << "Error loading start button textures" << std::endl;
}
Expand Down
3 changes: 2 additions & 1 deletion Peters Group Project Group Blue/SmallApple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "SmallApple.h"
#include <iostream>
#include <iostream>
#include <cmath>
#include "ctime"
#include "cstdlib"

Expand All @@ -15,7 +16,7 @@ SmallApple::SmallApple()

void SmallApple::loadSmallApple()
{
if (!m_texture.loadFromFile("ASSETS\\IMAGES\\smallAppleAnimated.png"))
if (!m_texture.loadFromFile("ASSETS/IMAGES/smallAppleAnimated.png"))
{
std::cout << "problem loading small apple texture" << std::endl;
}
Expand Down