Browse Source

Added EditorConfig file

master
Kenneth Bruen 3 years ago
parent
commit
56f948a90a
Signed by: kbruen
GPG Key ID: C1980A470C3EE5B1
  1. 9
      .editorconfig
  2. 10
      src/main.cpp
  3. 2
      src/pixel_wise.h
  4. 2
      src/utils.hpp

9
.editorconfig

@ -0,0 +1,9 @@
root = true
[*]
end_of_line = lf
insert_final_newline = true
[*.{h,hpp,c,cpp}]
indent_style = tab
indent_size = 4

10
src/main.cpp

@ -228,11 +228,11 @@ void keyUp(unsigned char key, int x, int y) {
int main(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize(600, 600);
glutInitWindowPosition(glutGet(GLUT_SCREEN_WIDTH) * 0.6, (glutGet(GLUT_SCREEN_HEIGHT) - 600) * 0.5);
glutCreateWindow("Pong");
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize(600, 600);
glutInitWindowPosition(glutGet(GLUT_SCREEN_WIDTH) * 0.6, (glutGet(GLUT_SCREEN_HEIGHT) - 600) * 0.5);
glutCreateWindow("Pong");
glutSetKeyRepeat(GLUT_KEY_REPEAT_OFF);
glutKeyboardFunc(keyDown);
glutKeyboardUpFunc(keyUp);

2
src/pixel_wise.h

@ -86,4 +86,4 @@ namespace PW {
inline std::array<GLfloat, 2> nr(GLfloat x, GLfloat y) {
return PW::toRelative(x, y, PW::NONE_RIGHT);
}
}
}

2
src/utils.hpp

@ -13,4 +13,4 @@ namespace Utils {
constexpr T toRad(T deg) {
return deg * PI / 180;
}
}
}

Loading…
Cancel
Save