-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rf scratch #3
base: master
Are you sure you want to change the base?
Rf scratch #3
Conversation
Src/GameConnection.hpp
Outdated
@@ -3,15 +3,52 @@ | |||
#include <memory> | |||
#include <vector> | |||
#include "Object.hpp" | |||
|
|||
#include "Windows.hpp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The presence of the Windows.h include in headers will cause significant compile slow-down to all relevant files.
Src/GameConnection.hpp
Outdated
virtual void getMousePosition(Vec2d& pos)noexcept = 0; | ||
virtual PlayerState GetPlayerStateInformation()noexcept = 0; | ||
}; | ||
class GameConnectionTH10 : public GameConnection { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation details of a unit should not be put in headers resembling an internal interface. Move it to CPP files instead.
Src/GameConnection.hpp
Outdated
void sendKeyInfo(int dir, bool shift, bool z, bool x) noexcept override; | ||
void getMousePosition(Vec2d& pos)noexcept override; | ||
int getTimeline() noexcept override; | ||
PlayerState GetPlayerStateInformation()noexcept override; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please apply naming conventions consistently if you decide to make any changes to that
Src/KeyboardManager.cpp
Outdated
@@ -12,7 +12,7 @@ namespace { | |||
constexpr const char KEY_X = 88; | |||
constexpr const char KEY_Z = 90; | |||
constexpr const char KEY_ESCAPE = 90; | |||
void sendKey(int key, bool down) noexcept { | |||
void sendKey(int key, bool down) noexcept { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
improper formatting.
Src/bmpCreater.hpp
Outdated
#include <cstdlib> | ||
#include <cstring> | ||
#include <Windows.h> | ||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same problem as above. You should NOT use windows-only APIs when the content can be easily implemented with ISO C++ contents.
pauseUntilPress("�뽫������ڷ���¼�����ϣ���ʼ��Ϸ��Ȼ��C����AI", 'C'); | ||
std::cout << "�ѿ�ʼ��Ϸ����P���ӡ���ͼ��Q���˳�" << std::endl; | ||
pauseUntilPress("�뽫������ڷ���¼�����ϣ���ʼ��Ϸ����C����AI", 'C'); | ||
std::cout << "�ѿ�ʼ��Ϸ����C����/�ر������Q���˳�" << std::endl; | ||
unsigned long long frameCount = 0; | ||
StopWatch watch; | ||
int mapOutputCount = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inconsistent formatting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please improve the quality of this pull request according to the comments.
No description provided.