📄 globaldef.h
字号:
//-------------------------------------------------------------------
// file name: globaldef.h
//
// - several constants definition
//
// - macros have been moved to macros.h, types and structures to
// structures.h (see the bottom of this file for #include-s)
//
//-------------------------------------------------------------------
#ifndef __GLOBAL_H
#define __GLOBAL_H
// constant definitions
// color and type ranges
#define MAXCOLOR 10
#define MAXKIND 3
#define NNODES 16 // number of nodes in the simulation
// constants used for position and mobility
#define SPACEX 400 // nodes are placed in a rectangle SPACEX X SPACEY
#define SPACEY 400 //
#define GSIZE 100
#define GX SPACEX/GSIZE//4 //(SPACEX%GSIZE==0)?(SPACEX/GSIZE):(SPACEX/GSIZE+1)
#define GY SPACEY/GSIZE//4 //(SPACEY%GSIZE==0)?(SPACEY/GSIZE):(SPACEY/GSIZE+1)
//#define GX (SPACEX%GSIZE==0)?(SPACEX/GSIZE):(SPACEX/GSIZE+1)
//#define GY (SPACEY%GSIZE==0)?(SPACEY/GSIZE):(SPACEY/GSIZE+1)
// constants used for the display
#define MX 15 // margins around the display area
#define MY 15
// int ndist[NNODES][NNODES];
// message types
enum {
M_LOWHIGH, // message from lower layer to higher layer
M_HIGHLOW, // message from higher layer to lower layer
M_NODE, // message from another node
M_START,
// any more kinds of messages, define them here
M_SELF // test message for the application
};
// other includes...
#include "macros.h" // all the macros have been moved to this file
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -