types.h
来自「2009 ROBOCUP 仿真2DSERVER 源码」· C头文件 代码 · 共 580 行 · 第 1/2 页
H
580 行
/* *Header: *File: typedefs.h *Author: Noda Itsuki *Date: 1995/02/24 *EndHeader: *//* *Copyright: Copyright (C) 1996-2000 Electrotechnical Laboratory. Itsuki Noda, Yasuo Kuniyoshi and Hitoshi Matsubara. Copyright (C) 2000, 2001 RoboCup Soccer Server Maintainance Group. Patrick Riley, Tom Howard, Daniel Polani, Itsuki Noda, Mikhail Prokopenko, Jan Wendler This file is a part of SoccerServer. This code is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *EndCopyright: */#ifndef RCSSSERVER_TYPES_H#define RCSSSERVER_TYPES_H#include "param.h"#include <boost/cstdint.hpp>typedef boost::int16_t Int16;typedef boost::int32_t Int32;enum PlayerState { DISABLE = 0x00000000, STAND = 0x00000001, KICK = 0x00000002, KICK_FAULT = 0x00000004, GOALIE = 0x00000008, CATCH = 0x00000010, CATCH_FAULT = 0x00000020, BALL_TO_PLAYER = 0x00000040, PLAYER_TO_BALL = 0x00000080, DISCARD = 0x00000100, LOST = 0x00000200, // [I.Noda:00/05/13] added for 3D viewer/commentator/small league BALL_COLLIDE = 0x00000400, // player collided with the ball PLAYER_COLLIDE = 0x00000800, // player collided with another player TACKLE = 0x00001000, TACKLE_FAULT = 0x00002000, BACK_PASS = 0x00004000, FREE_KICK_FAULT = 0x00008000, POST_COLLIDE = 0x00010000, // player collided with goal posts};enum Side { LEFT = 1, NEUTRAL = 0, RIGHT = -1};#define PLAYMODE_STRINGS {"", \ "before_kick_off", \ "time_over", \ "play_on", \ "kick_off_l", \ "kick_off_r", \ "kick_in_l", \ "kick_in_r", \ "free_kick_l", \ "free_kick_r", \ "corner_kick_l", \ "corner_kick_r", \ "goal_kick_l", \ "goal_kick_r", \ "goal_l", \ "goal_r", \ "drop_ball", \ "offside_l", \ "offside_r", \ "penalty_kick_l", \ "penalty_kick_r", \ "first_half_over", \ "pause", \ "human_judge", \ "foul_charge_l", \ "foul_charge_r", \ "foul_push_l", \ "foul_push_r", \ "foul_multiple_attack_l", \ "foul_multiple_attack_r", \ "foul_ballout_l", \ "foul_ballout_r", \ "back_pass_l", \ "back_pass_r", \ "free_kick_fault_l", \ "free_kick_fault_r", \ "catch_fault_l", \ "catch_fault_r", \ "indirect_free_kick_l", \ "indirect_free_kick_r", \ "penalty_setup_l", \ "penalty_setup_r", \ "penalty_ready_l", \ "penalty_ready_r", \ "penalty_taken_l", \ "penalty_taken_r", \ "penalty_miss_l", \ "penalty_miss_r", \ "penalty_score_l", \ "penalty_score_r" \ }enum PlayMode { PM_Null, PM_BeforeKickOff, PM_TimeOver, PM_PlayOn, PM_KickOff_Left, PM_KickOff_Right, PM_KickIn_Left, PM_KickIn_Right, PM_FreeKick_Left, PM_FreeKick_Right, PM_CornerKick_Left, PM_CornerKick_Right, PM_GoalKick_Left, PM_GoalKick_Right, PM_AfterGoal_Left, PM_AfterGoal_Right, PM_Drop_Ball, PM_OffSide_Left, PM_OffSide_Right, // [I.Noda:00/05/13] added for 3D viewer/commentator/small league PM_PK_Left, PM_PK_Right, PM_FirstHalfOver, PM_Pause, PM_Human, PM_Foul_Charge_Left, PM_Foul_Charge_Right, PM_Foul_Push_Left, PM_Foul_Push_Right, PM_Foul_MultipleAttacker_Left, PM_Foul_MultipleAttacker_Right, PM_Foul_BallOut_Left, PM_Foul_BallOut_Right, PM_Back_Pass_Left, PM_Back_Pass_Right, PM_Free_Kick_Fault_Left, PM_Free_Kick_Fault_Right, PM_CatchFault_Left, PM_CatchFault_Right, PM_IndFreeKick_Left, PM_IndFreeKick_Right, PM_PenaltySetup_Left, PM_PenaltySetup_Right, PM_PenaltyReady_Left, PM_PenaltyReady_Right, PM_PenaltyTaken_Left, PM_PenaltyTaken_Right, PM_PenaltyMiss_Left, PM_PenaltyMiss_Right, PM_PenaltyScore_Left, PM_PenaltyScore_Right, PM_MAX};enum MPObjectType { MPO_Ball, MPO_Player};const double SHOWINFO_SCALE = 16.0;const double SHOWINFO_SCALE2 = 65536.0;const int REC_OLD_VERSION = 1;const int REC_VERSION_2 = 2;const int REC_VERSION_3 = 3;const int REC_VERSION_4 = 4;const int REC_VERSION_5 = 5;const int DEFAULT_REC_VERSION = REC_VERSION_5;enum DispInfoMode { NO_INFO = 0, SHOW_MODE = 1, MSG_MODE = 2, DRAW_MODE = 3, BLANK_MODE = 4, PM_MODE = 5, TEAM_MODE = 6, PT_MODE = 7, PARAM_MODE = 8, PPARAM_MODE = 9,};enum DrawMode { DrawClear = 0, DrawPoint = 1, DrawCircle = 2, DrawLine = 3,};enum BoardType { MSG_BOARD = 1, LOG_BOARD = 2,};struct pos_t { Int16 enable; Int16 side; Int16 unum; Int16 angle; Int16 x; Int16 y;};struct team_t { char name[16]; Int16 score;};struct showinfo_t { char pmode; team_t team[2]; pos_t pos[MAX_PLAYER * 2 + 1]; Int16 time;};const int max_message_length_for_display = 2048;struct msginfo_t { Int16 board; char message[max_message_length_for_display];};const int COLOR_NAME_MAX = 64;struct pointinfo_t { Int16 x; Int16 y; char color[COLOR_NAME_MAX];};struct circleinfo_t { Int16 x; Int16 y; Int16 r; char color[COLOR_NAME_MAX];};struct lineinfo_t { Int16 x1; Int16 y1; Int16 x2; Int16 y2; char color[COLOR_NAME_MAX];};struct drawinfo_t { Int16 mode; union { pointinfo_t pinfo; circleinfo_t cinfo; lineinfo_t linfo; } object;};struct dispinfo_t { Int16 mode; union { showinfo_t show; msginfo_t msg; drawinfo_t draw; } body;};struct ball_t {
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?