📄 tpathlinetype.h
字号:
// Copyright 2002 Kenneth Guy,
//
// TPathLineType.h
#ifndef _TPATHLINETYPE_H_
#define _TPATHLINETYPE_H_
/** \file TPathLineType.h
TPathLineType header file.
*/
/** Commands for path following bad guys.
Defines commands that modify a TBadGuy object each time
the Move() method is called on a TBadGuy object with the
TBadGuyFlags::EPathMove flag set.
Path data is a series of 4 TInt16s the first TInt16 is the
TPathLineType, the second the offset of the next command
to process (0 = repeat this instruction, 1=next instruction
-1 = previous instruction etc). The third and fourth are
parameters to the command.
*/
enum TPathLineType {
// specials
EPathLineEnd, /**< Marks the end of the path data. Only used by level generation tools */
EPathLineStart, /**< Marks the start of each set of path data. Only used by level generation tools */
EPathLineClone, /**< new bad guy. 3rd operand gives path offset for the next command of new bad guy.*/
//movement
EPathLineMoveBy, /**< move by x,y pixels given by 3rd and 4th operands*/
EPathLineMoveTo, /**< move to x,y pixels given by 3rd and 4th operands*/
EPathLineMoveStepTo,/**< move to x,y in steps of xvel,yvel. If velocity is negative is will move away from position. X,Y given by 3rd and 4th operands*/
EPathLineMoveSimple, /**< Simple movement. Based on iFlags, iXVel and iYVel */
// conditionals
EPathLineIfXVelLess, /**< take 3rd operand if xvel < 4th operand else take 2nd.*/
EPathLineIfXVelGreater, /**< take 3rd operand if xvel > 4th operand else take 2nd.*/
EPathLineIfXVelEqual, /**< take 3rd operand if xvel = 4th operand else take 2nd.*/
EPathLineIfYVelLess, /**< take 3rd operand if yvel < 4th operand else take 2nd.*/
EPathLineIfYVelGreater, /**< take 3rd operand if yvel > 4th operand else take 2nd.*/
EPathLineIfYVelEqual, /**< take 3rd operand if yvel = 4th operand else take 2nd.*/
EPathLineIfXLess, /**< take 3rd operand if xpos < 4th operand else take 2nd.*/
EPathLineIfXGreater, /**< take 3rd operand if xpos > 4th operand else take 2nd.*/
EPathLineIfXEqual, /**< take 3rd operand if xpos = 4th operand else take 2nd.*/
EPathLineIfYLess, /**< take 3rd operand if ypos < 4th operand else take 2nd.*/
EPathLineIfYGreater, /**< take 3rd operand if ypos > 4th operand else take 2nd.*/
EPathLineIfYEqual, /**< take 3rd operand if ypos = 4th operand else take 2nd.*/
EPathLineIfHealthLess, /**< take 3rd operand if health < 4th operand else take 2nd.*/
EPathLineIfHealthGreater, /**< take 3rd operand if health > 4th operand else take 2nd.*/
EPathLineIfHealthEqual, /**< take 3rd operand if health = 4th operand else take 2nd.*/
EPathLineIfCounterLess, /**< take 3rd operand if counter < 4th operand else take 2nd.*/
EPathLineIfCounterGreater, /**< take 3rd operand if counter > 4th operand else take 2nd.*/
EPathLineIfCounterEqual, /**< take 3rd operand if counter = 4th operand else take 2nd.*/
// setting
EPathLineSetPoints, /**< Set the score for this bad guy. 3rd operand = score*/
EPathLineSetId, /**< Set the id of bad guy. 3rd operand = id*/
EPathLineSetHealth, /**< Set the health of bad guy. 3rd operand = health*/
EPathLineAddHealth, /**< Add to the health of bad guy. health+=3rd operand*/
EPathLineSetCounter, /**< Set the counter of bad guy. 3rd operand = counter*/
EPathLineAddCounter, /**< Add to the counter of bad guy. counter += 3rd operand*/
EPathLineSetVelocity, /**< Set the velocity. 3rd operand = xvel, 4th = yvel*/
EPathLineAddVelocity,/**< Add to velocitty. xvel+=3rd operand, yvel+=4th*/
EPathLineSetSprite, /**< Set the sprite used for this bad guy. 3rd operand is the sprite no.*/
EPathLineSetClearFlags, /**< Set and clear flags from TBadGuy::iFlags. Set the bits in the 3rd operand and clear the bits in the 4th */
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -