projects
/
2DEngine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b8ea9ed
)
add additional input
master
author
Stan_Lewry
<stanley.jml@gmail.com>
Tue, 1 Oct 2024 20:04:26 +0000
(21:04 +0100)
committer
Stan_Lewry
<stanley.jml@gmail.com>
Tue, 1 Oct 2024 20:04:26 +0000
(21:04 +0100)
2DEngine.cpp
patch
|
blob
|
history
2DEngine.h
patch
|
blob
|
history
diff --git
a/2DEngine.cpp
b/2DEngine.cpp
index
2114b6c
..
710c9dd
100644
(file)
--- a/
2DEngine.cpp
+++ b/
2DEngine.cpp
@@
-128,6
+128,7
@@
namespace S2DE {
case SDLK_LEFT: inputState->left = true; break;
\r
case SDLK_RIGHT: inputState->right = true; break;
\r
case SDLK_RETURN: inputState->rtrn = true; break;
\r
case SDLK_LEFT: inputState->left = true; break;
\r
case SDLK_RIGHT: inputState->right = true; break;
\r
case SDLK_RETURN: inputState->rtrn = true; break;
\r
+ case SDLK_ESCAPE: inputState->escape = true; break;
\r
}
\r
break;
\r
case SDL_KEYUP:
\r
}
\r
break;
\r
case SDL_KEYUP:
\r
@@
-138,6
+139,7
@@
namespace S2DE {
case SDLK_LEFT: inputState->left = false; break;
\r
case SDLK_RIGHT: inputState->right = false; break;
\r
case SDLK_RETURN: inputState->rtrn = false; break;
\r
case SDLK_LEFT: inputState->left = false; break;
\r
case SDLK_RIGHT: inputState->right = false; break;
\r
case SDLK_RETURN: inputState->rtrn = false; break;
\r
+ case SDLK_ESCAPE: inputState->escape = false; break;
\r
}
\r
}
\r
}
\r
}
\r
}
\r
}
\r
diff --git
a/2DEngine.h
b/2DEngine.h
index
c50a28e
..
57fe6e0
100644
(file)
--- a/
2DEngine.h
+++ b/
2DEngine.h
@@
-37,6
+37,7
@@
namespace S2DE {
bool up, down, left, right;
\r
bool quit;
\r
bool rtrn;
\r
bool up, down, left, right;
\r
bool quit;
\r
bool rtrn;
\r
+ bool escape;
\r
};
\r
\r
__declspec(dllexport) void updateInputState(InputState* inputState);
\r
};
\r
\r
__declspec(dllexport) void updateInputState(InputState* inputState);
\r