generated from sigonasr2/CProjectTemplate
parent
ba6af6dad3
commit
f512eb5f67
@ -0,0 +1,7 @@ |
||||
#Compiles the entire program then runs it, producing an executable. |
||||
#C |
||||
printf "Running program...\n\n\n" |
||||
if g++ $(find . -type f -name "*.cpp") ${CUSTOM_PARAMS} -o ${PROJECT_NAME}; then |
||||
./${PROJECT_NAME} "$@" |
||||
fi |
||||
printf "\n\n" |
@ -0,0 +1,20 @@ |
||||
#Adds a commit message and pushes project to github repository. |
||||
#C |
||||
COMMIT_MESSAGE="$*" |
||||
FIRST_LINE=true |
||||
while IFS= read -r line |
||||
do |
||||
if [ "$FIRST_LINE" = true ]; then |
||||
COMMIT_MESSAGE+=" |
||||
|
||||
Co-authored-by: $line" |
||||
FIRST_LINE=false |
||||
else |
||||
COMMIT_MESSAGE+=" |
||||
Co-authored-by: $line" |
||||
fi |
||||
done < utils/.coauthors |
||||
git add -u |
||||
git add * |
||||
git commit -m "$COMMIT_MESSAGE" |
||||
git push |
Binary file not shown.
@ -1,5 +0,0 @@ |
||||
#include <stdio.h> |
||||
|
||||
int main(int argc,char**argv) { |
||||
printf("Hello World!"); |
||||
} |
@ -0,0 +1,37 @@ |
||||
#define OLC_PGE_APPLICATION |
||||
#include "pixelGameEngine.h" |
||||
|
||||
class Example : public olc::PixelGameEngine |
||||
{ |
||||
public: |
||||
Example() |
||||
{ |
||||
sAppName = "Example"; |
||||
} |
||||
|
||||
public: |
||||
bool OnUserCreate() override |
||||
{ |
||||
// Called once at the start, so create things here
|
||||
return true; |
||||
} |
||||
|
||||
bool OnUserUpdate(float fElapsedTime) override |
||||
{ |
||||
// called once per frame
|
||||
for (int x = 0; x < ScreenWidth(); x++) |
||||
for (int y = 0; y < ScreenHeight(); y++) |
||||
Draw(x, y, olc::Pixel(rand() % 255, rand() % 255, rand()% 255));
|
||||
return true; |
||||
} |
||||
}; |
||||
|
||||
|
||||
int main() |
||||
{ |
||||
Example demo; |
||||
if (demo.Construct(256, 240, 4, 4)) |
||||
demo.Start(); |
||||
|
||||
return 0; |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@ |
||||
define.sh:3ecab0dffe2adfb950f3eb7c7061b750 - |
||||
main.sh:d3d1bd0b56d8114eb7479964227f8576 - |
||||
search.sh:81d08f5ff48e8a44b5f68387d426da05 - |
||||
main.sh:4e6e9f0650ec790ce2c4364db94f0caa - |
||||
search.sh:30e1842e9a13452ea883bb6516d28e1c - |
||||
.updateDirectories:fa5e95db12be22ae8aed7ecbc560e38c - |
||||
|
Loading…
Reference in new issue