This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sun Feb 11 jbs@dmb-gaming-laptop -> make clean | |
rm -f *.o debugging_tests | |
Sun Feb 11 jbs@dmb-gaming-laptop -> ls | |
main.cpp Makefile | |
Sun Feb 11 jbs@dmb-gaming-laptop -> make | |
g++ -c -o main.o main.cpp | |
g++ -o debugging_tests main.o -g -Wall | |
Sun Feb 11 jbs@dmb-gaming-laptop -> gdb debugging_tests | |
GNU gdb (GDB) 8.1 | |
Copyright (C) 2018 Free Software Foundation, Inc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Line 75-78 in main.cpp | |
//LMG | |
sf::Time lmgRof = sf::milliseconds(100); | |
sf::Time lmgReloadTime = sf::milliseconds(750); | |
Weapon lmg("../textures/weapons/lmg.png", 20, 150, 30, lmgRof, lmgReloadTime, "lmg"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tue Sep 26 jbs@dmb-gaming-laptop -> make clean | |
rm -f *.o johntileengine | |
Tue Sep 26 jbs@dmb-gaming-laptop -> make | |
g++ -Wall -g -c -o AnimatedProps.o AnimatedProps.cpp | |
g++ -Wall -g -c -o Bullet.o Bullet.cpp | |
g++ -Wall -g -c -o Camera.o Camera.cpp | |
g++ -Wall -g -c -o Collision.o Collision.cpp | |
g++ -Wall -g -c -o Config.o Config.cpp | |
g++ -Wall -g -c -o Font.o Font.cpp | |
g++ -Wall -g -c -o main.o main.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "LinkedList.h" | |
#include <iostream> | |
#include <cstdlib> | |
LinkedList::LinkedList() | |
{ | |
head = NULL; | |
current = NULL; | |
temporary = NULL; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "GameEngine.h" | |
#include "GameState_Playing.h" | |
bool GameEngine::init_engine() | |
{ | |
//initialize all SDL related stuff. | |
if(SDL_Init(SDL_INIT_EVERYTHING) < 0){ | |
std::cout << "Failed to init video... SDL Error: " << SDL_GetError() << std::endl; | |
return false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//note that GameStateHandler.cpp is completely blank. | |
#ifndef GAMESTATEHANDLER_H | |
#define GAMESTATEHANDLER_H | |
class GameStateHandler | |
{ | |
public: | |
enum GAME_STATES | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "TheAwesomeClass.h" | |
#include "SomeRandomClass.h" | |
#include <iostream> | |
void SomeRandomClass::add_variables(int variableToAdd) | |
{ | |
TheAwesomeClass theawesomeclass; | |
variableToAdd += theawesomeclass.awesomeVariable; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "main.h" | |
#include "AI.h" | |
#include "Ball.h" | |
void AI::init_ai() | |
{ | |
Main main; | |
//initialize the AI, not much here becaue the AI is very basic. | |
aiPaddle.h = 40; | |
aiPaddle.w = 10; |