yey game work UwU
This commit is contained in:
parent
5796b5c582
commit
06a763b0fa
218 changed files with 164 additions and 35 deletions
|
|
@ -5,18 +5,23 @@
|
|||
// 14 15 16
|
||||
// N S L R
|
||||
std::vector<char>opposites{1,0,3,2};
|
||||
std::vector sides{
|
||||
std::vector<char> sides{
|
||||
'n','s','l','r'
|
||||
};
|
||||
std::vector<std::string> lightlevel{
|
||||
"off","on","urcooked"
|
||||
};
|
||||
|
||||
#define N (-1)
|
||||
std::vector<std::vector<char>> map{
|
||||
{N,7,N,1} ,{N,8,0,2} , {N,3,1,N} ,{2,4,N,N},{3,N,5,N},{10,N,6,4},{9,N,N,5},
|
||||
|
||||
{0,11,N,8} ,{1,13,7,N}, {N,6,N,10},{N,5,9,6},
|
||||
|
||||
{7,14,N,12},{N,N,11,N}, {8,16,N,N},
|
||||
|
||||
{11,N,N,15},{N,N,14,16},{13,N,15,N}
|
||||
// 0 1 2 3 4 5 6
|
||||
{N,7,N,1} ,{N,8,0,2} , {N,3,1,N} ,{2,4,N,N},{3,N,5,N}, {9,N,6,4},{10,N,N,5},
|
||||
// 7 8 9 10
|
||||
{0,11,N,8} ,{1,13,7,N}, {N,5,10,N},{N,6,N,9},
|
||||
// 11 12 13
|
||||
{7,14,N,12},{N,N,11,N}, {8,16,N,N},
|
||||
// 14 15 16
|
||||
{11,N,N,15},{N,N,14,16},{13,N,15,N}
|
||||
};
|
||||
#undef N
|
||||
|
||||
|
|
@ -38,4 +43,40 @@ char rotateentity(char pos,char dir, bool clockwise) {
|
|||
return look[2][dir];
|
||||
}
|
||||
return look[!clockwise][dir];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool ifforward() {
|
||||
if (IsKeyPressed(KEY_W))return true;
|
||||
if (IsKeyPressed(KEY_UP))return true;
|
||||
if (IsKeyPressed(KEY_KP_8))return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ifbackward() {
|
||||
if (IsKeyPressed(KEY_S))return true;
|
||||
if (IsKeyPressed(KEY_DOWN))return true;
|
||||
if (IsKeyPressed(KEY_KP_2))return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ifleft() {
|
||||
if (IsKeyPressed(KEY_A))return true;
|
||||
if (IsKeyPressed(KEY_LEFT))return true;
|
||||
if (IsKeyPressed(KEY_KP_4))return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ifright(){
|
||||
if (IsKeyPressed(KEY_D))return true;
|
||||
if (IsKeyPressed(KEY_RIGHT))return true;
|
||||
if (IsKeyPressed(KEY_KP_6))return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue