Skip to content
This repository has been archived by the owner on Jul 29, 2023. It is now read-only.

Commit

Permalink
updated build system
Browse files Browse the repository at this point in the history
  • Loading branch information
ColleagueRiley committed Aug 18, 2022
1 parent 56fa6b0 commit f36817d
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 8 deletions.
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
OUTPUT = PopcornShop
GXX = g++
SOURCE = source/*.cpp
LIBS = $(shell RSGL-static)

build:
mkdir -p build
$(GXX) $(SOURCE) $(LIBS) -o build/$(OUTPUT)
cp -r res ./build

install:
chmod +x $(OUTPUT)
cp $(OUTPUT) /usr/bin
mkdir -p /usr/share/$(OUTPUT)
cp -r build/* /usr/share/$(OUTPUT)
1 change: 1 addition & 0 deletions PopcornShop
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cd /usr/share/PopcornShop && ./PopcornShop
8 changes: 4 additions & 4 deletions RMakefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
SOURCE += source/*.cpp
LIBS += -lRSGL
LIBS += $(RSGL-static)
ARGS += -g
OUTPUT = PopcornShop
OUTPUT = a.out
GXX = g++

pash{
./$(OUTPUT)
}
./a.out
}
Binary file modified res/images/Biden.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/images/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 3 additions & 4 deletions source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ std::vector<RSGL::point> cords={{-45,290},{-55,300},{-25,50},{-25,20}};
std::vector<std::vector<bool>> stops = {{false,true},{false,true},{false,true},{false,true}};
std::vector<int> ticks = {0,0,0,0};


int main(int args,char** argv){
srand(time(NULL));
while (running){
win.checkEvents(); tick++;
if (win.event.type==RSGL::quit) running=false;
if (!options && !gameover) RSGL::drawImage(images+"background.png",{0,0,481,351});
if (!options && !gameover) RSGL::drawImage("res/images/background.png",{0,0,481,351});
RSGL::drawImage(images+"popcorn.png",{0,popy,487,655});

if (popy != 0 && stop2) popy+=20; else if (stop2) stop=true;
if (stop){
if (stop2 & tick >= 40 ){ popy-=20; stop2=false; tick=0; }
Expand Down Expand Up @@ -82,4 +81,4 @@ int main(int args,char** argv){
}
win.clear();
} win.close();
}
}

0 comments on commit f36817d

Please sign in to comment.