parent
882ccac3fb
commit
06a0ac20f5
@ -1,3 +1,5 @@ |
|||||||
build.sh |
build.sh |
||||||
commit.sh |
commit.sh |
||||||
|
lines.sh |
||||||
|
temp |
||||||
web.sh |
web.sh |
||||||
|
@ -0,0 +1,14 @@ |
|||||||
|
#Returns the line counts of your project. |
||||||
|
#C++ |
||||||
|
shopt -s extglob |
||||||
|
ls -1 @(*.h|*.cpp) > temp |
||||||
|
while read a; do |
||||||
|
if [ "$a" != "pixelGameEngine.h" ] && [ "$a" != "soundwaveEngine.h" ] && [ "$a" != "splash.h" ]; |
||||||
|
then |
||||||
|
echo -e "$a\n" >> temp2 |
||||||
|
fi |
||||||
|
done < temp |
||||||
|
wc -l $(cat temp2) |
||||||
|
|
||||||
|
rm temp |
||||||
|
rm temp2 |
@ -1,3 +1,5 @@ |
|||||||
build.sh:530634457ea9041267c05d4ced95eee1 - |
build.sh:530634457ea9041267c05d4ced95eee1 - |
||||||
commit.sh:d03a46e721060c22ccb146e19d27e70a - |
commit.sh:d03a46e721060c22ccb146e19d27e70a - |
||||||
|
lines.sh:3b907786f7fc9204025993016c9080de - |
||||||
|
temp:d41d8cd98f00b204e9800998ecf8427e - |
||||||
web.sh:3dcc2fe7e036359eedd257a864e9a1e1 - |
web.sh:3dcc2fe7e036359eedd257a864e9a1e1 - |
||||||
|
Binary file not shown.
@ -1,14 +1,38 @@ |
|||||||
#include "Map.h" |
#define OLC_PGE_APPLICATION |
||||||
#include "Player.h" |
#include "pixelGameEngine.h" |
||||||
|
|
||||||
int main() { |
class Example : public olc::PixelGameEngine |
||||||
Map newMap; |
{ |
||||||
Player newPlayer; |
public: |
||||||
newMap.p = &newPlayer; |
Example() |
||||||
newMap.test(); |
{ |
||||||
newPlayer.map = &newMap; |
sAppName = "Example"; |
||||||
newPlayer.test(); |
} |
||||||
|
|
||||||
newPlayer.map->test(); |
public: |
||||||
newMap.p->test(); |
bool OnUserCreate() override |
||||||
} |
{ |
||||||
|
// Called once at the start, so create things here
|
||||||
|
return true; |
||||||
|
} |
||||||
|
|
||||||
|
bool OnUserUpdate(float fElapsedTime) override |
||||||
|
{ |
||||||
|
ConsoleShow(olc::ESCAPE,false); |
||||||
|
// 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; |
||||||
|
} |
||||||
|
Loading…
Reference in new issue