/usr/include/osl/effect/numSimpleEffect.tcc is in libosl-dev 0.6.0-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | #ifndef OSL_NUM_SIMPLE_EFFECT_TCC
#define OSL_NUM_SIMPLE_EFFECT_TCC
#include "osl/effect/numSimpleEffect.h"
#include "osl/effect_util/pin.h"
#include "osl/checkmate/king8Info.h"
#include "osl/pieceTable.h"
#include "osl/record/csa.h"
#include <iostream>
template<osl::effect::NumBitmapEffect::Op OP,bool UC>
void osl::effect::
NumSimpleEffectTable::doEffect(const SimpleState& state,PtypeO ptypeo,Square pos,int num)
{
switch((int)ptypeo){
case NEW_PTYPEO(WHITE,PAWN): doEffectBy<WHITE,PAWN,OP,UC>(state,pos,num); break;
case NEW_PTYPEO(WHITE,LANCE): doEffectBy<WHITE,LANCE,OP,UC>(state,pos,num); break;
case NEW_PTYPEO(WHITE,KNIGHT): doEffectBy<WHITE,KNIGHT,OP,UC>(state,pos,num); break;
case NEW_PTYPEO(WHITE,SILVER): doEffectBy<WHITE,SILVER,OP,UC>(state,pos,num); break;
case NEW_PTYPEO(WHITE,PPAWN):
case NEW_PTYPEO(WHITE,PLANCE):
case NEW_PTYPEO(WHITE,PKNIGHT):
case NEW_PTYPEO(WHITE,PSILVER):
case NEW_PTYPEO(WHITE,GOLD): doEffectBy<WHITE,GOLD,OP,UC>(state,pos,num); break;
case NEW_PTYPEO(WHITE,BISHOP): doEffectBy<WHITE,BISHOP,OP,UC>(state,pos,num); break;
case NEW_PTYPEO(WHITE,PBISHOP): doEffectBy<WHITE,PBISHOP,OP,UC>(state,pos,num); break;
case NEW_PTYPEO(WHITE,ROOK): doEffectBy<WHITE,ROOK,OP,UC>(state,pos,num); break;
case NEW_PTYPEO(WHITE,PROOK): doEffectBy<WHITE,PROOK,OP,UC>(state,pos,num); break;
case NEW_PTYPEO(WHITE,KING): doEffectBy<WHITE,KING,OP,UC>(state,pos,num); break;
case NEW_PTYPEO(BLACK,PAWN): doEffectBy<BLACK,PAWN,OP,UC>(state,pos,num); break;
case NEW_PTYPEO(BLACK,LANCE): doEffectBy<BLACK,LANCE,OP,UC>(state,pos,num); break;
case NEW_PTYPEO(BLACK,KNIGHT): doEffectBy<BLACK,KNIGHT,OP,UC>(state,pos,num); break;
case NEW_PTYPEO(BLACK,SILVER): doEffectBy<BLACK,SILVER,OP,UC>(state,pos,num); break;
case NEW_PTYPEO(BLACK,PPAWN):
case NEW_PTYPEO(BLACK,PLANCE):
case NEW_PTYPEO(BLACK,PKNIGHT):
case NEW_PTYPEO(BLACK,PSILVER):
case NEW_PTYPEO(BLACK,GOLD): doEffectBy<BLACK,GOLD,OP,UC>(state,pos,num); break;
case NEW_PTYPEO(BLACK,BISHOP): doEffectBy<BLACK,BISHOP,OP,UC>(state,pos,num); break;
case NEW_PTYPEO(BLACK,PBISHOP): doEffectBy<BLACK,PBISHOP,OP,UC>(state,pos,num); break;
case NEW_PTYPEO(BLACK,ROOK): doEffectBy<BLACK,ROOK,OP,UC>(state,pos,num); break;
case NEW_PTYPEO(BLACK,PROOK): doEffectBy<BLACK,PROOK,OP,UC>(state,pos,num); break;
case NEW_PTYPEO(BLACK,KING): doEffectBy<BLACK,KING,OP,UC>(state,pos,num); break;
default: assert(0);
}
return;
}
template<osl::Player P, osl::Ptype T, osl::effect::NumBitmapEffect::Op OP,bool UC>
void osl::effect::
NumSimpleEffectTable::doEffectBy(const SimpleState& state,Square pos,int num)
{
if(UC){
if(T==LANCE || T==BISHOP || T==PBISHOP || T==ROOK || T==PROOK)
setChangedPieces(NumBitmapEffect::makeLongEffect<P>(num));
else
setChangedPieces(NumBitmapEffect::makeEffect<P>(num));
}
doEffectShort<P,T,UL,OP,UC>(state,pos,num);
doEffectShort<P,T,U,OP,UC>(state,pos,num);
doEffectShort<P,T,UR,OP,UC>(state,pos,num);
doEffectShort<P,T,L,OP,UC>(state,pos,num);
doEffectShort<P,T,R,OP,UC>(state,pos,num);
doEffectShort<P,T,DL,OP,UC>(state,pos,num);
doEffectShort<P,T,D,OP,UC>(state,pos,num);
doEffectShort<P,T,DR,OP,UC>(state,pos,num);
doEffectShort<P,T,UUL,OP,UC>(state,pos,num);
doEffectShort<P,T,UUR,OP,UC>(state,pos,num);
doEffectLong<P,T,LONG_UL,OP,UC>(state,pos,num);
doEffectLong<P,T,LONG_U,OP,UC>(state,pos,num);
doEffectLong<P,T,LONG_UR,OP,UC>(state,pos,num);
doEffectLong<P,T,LONG_L,OP,UC>(state,pos,num);
doEffectLong<P,T,LONG_R,OP,UC>(state,pos,num);
doEffectLong<P,T,LONG_DL,OP,UC>(state,pos,num);
doEffectLong<P,T,LONG_D,OP,UC>(state,pos,num);
doEffectLong<P,T,LONG_DR,OP,UC>(state,pos,num);
}
#endif /* OSL_NUM_SIMPLE_EFFECT_TCC */
// ;;; Local Variables:
// ;;; mode:c++
// ;;; c-basic-offset:2
// ;;; End:
|