This commit is contained in:
aozhiwei 2023-04-05 17:57:11 +08:00
parent 8101bf7abd
commit 0e1a01014a
2 changed files with 25 additions and 0 deletions

View File

@ -62,6 +62,13 @@
#include "mt/Robot.h" #include "mt/Robot.h"
#include "mt/SafeAreaPos.h" #include "mt/SafeAreaPos.h"
struct FrameCallNode
{
FrameCallCb cb = nullptr;
void* context = nullptr;
FrameCallNode* next = nullptr;
};
const int SHUA_RANGE = 580; const int SHUA_RANGE = 580;
static long long RoomXGetTickCount(void* context) static long long RoomXGetTickCount(void* context)
@ -3617,3 +3624,13 @@ void Room::AddReportBullet(int bullet_uniid)
}, },
&xtimer_attacher_); &xtimer_attacher_);
} }
void Room::AddFrameCall(FrameCallCb cb, void* context)
{
}
void Room::UpdateFrameCall()
{
}

View File

@ -50,6 +50,8 @@ struct CarObject
bool taken = false; bool taken = false;
}; };
typedef void (*FrameCallCb)(void*);
struct FrameCallNode;
class MatchTeam; class MatchTeam;
class Room class Room
{ {
@ -224,6 +226,7 @@ public:
bool FindWalkablePointWithOutHouse(const glm::vec3& center, int try_count, int step, glm::vec3& out_point); bool FindWalkablePointWithOutHouse(const glm::vec3& center, int try_count, int step, glm::vec3& out_point);
void AddReportBullet(int bullet_uniid); void AddReportBullet(int bullet_uniid);
bool IsDestorying() { return destorying_; } bool IsDestorying() { return destorying_; }
void AddFrameCall(FrameCallCb cb, void* context);
private: private:
void ShuaAndroid(); void ShuaAndroid();
@ -307,6 +310,7 @@ private:
bool IsAllRealDead(); bool IsAllRealDead();
void AutoJump(); void AutoJump();
void UpdateFrameCall();
private: private:
bool destorying_ = false; bool destorying_ = false;
@ -373,6 +377,10 @@ private:
std::shared_ptr<AirDrop> air_drop_; std::shared_ptr<AirDrop> air_drop_;
std::shared_ptr<AirRaid> air_raid_; std::shared_ptr<AirRaid> air_raid_;
FrameCallNode* top_node_ = nullptr;
FrameCallNode* bot_node_ = nullptr;
FrameCallNode* work_node_ = nullptr;
friend class Incubator; friend class Incubator;
friend class Team; friend class Team;
}; };