/*-------------------- / Drawing information /---------------------*/ static void wcs_drawMech(BMTYPE **line) { static const char *goalie[] = {" * ", "* ", " *"}; static const char ball[] = {'|','/','-','\\'}; core_textOutf(50, 0,BLACK,"Goalie: [%s]", goalie[core_getSw(swGoalieL) ? 1 : (core_getSw(swGoalieR) ? 2 : 0)]); core_textOutf(50,10,BLACK,"Ball: %c %3d ", ball[mech_getPos(1)], mech_getSpeed(1)); }
int vp_getMech(int mechNo) { #ifdef VPINMAME extern int g_fHandleMechanics; if (g_fHandleMechanics == 0) return (mechNo < 0) ? mech_getSpeed(MECH_MAXMECH/2-1-mechNo) : mech_getPos(MECH_MAXMECH/2-1+mechNo); else #endif return core_gameData->hw.getMech ? core_gameData->hw.getMech(mechNo) : 0; }
static int wcs_handleBallState(sim_tBallStatus *ball, int *inports) { switch (ball->state) { case stAssist: if (mech_getPos(0) > WCS_GOALIESLACK) return setState(stGoal,15); else return setState(stGoalie,15); case stSLane: if (ball->speed > 40) return setState(stSkillF,5); if (ball->speed > 30) return setState(stSkillC,5); if (ball->speed > 20) return setState(stSkillR,5); break; case stMagLock: if (!core_getSol(sMagLock)) return setState(stULock,10); break; } return 0; }
/* 1 = ball speed */ static int wcs_getMech(int mechNo) { return mechNo ? mech_getSpeed(1) : mech_getPos(0); }
static void wcs_handleMech(int mech) { if ((mech & 0x01) && core_getSol(sGoalieMot)) { core_setSw(swGoalieL, mech_getPos(0) < WCS_GOALIESLACK); core_setSw(swGoalieR, mech_getPos(0) > WCS_GOALIETIME - WCS_GOALIESLACK); } }
static void wd_drawMech(BMTYPE **line) { core_textOutf(50, 0,BLACK,"Reel1:%3d", mech_getPos(0)); core_textOutf(50,10,BLACK,"Reel2:%3d", mech_getPos(1)); core_textOutf(50,20,BLACK,"Reel3:%3d", mech_getPos(2)); }
static int wd_getMech(int mechNo) { return mech_getPos(mechNo); }
static int ts_getMech(int mechNo) { return mechNo ? (locals.magnetCnt > 0) : mech_getPos(0); }
static void ts_drawMech(BMTYPE **line) { core_textOutf(50, 0,BLACK,"MiniPF:%3d", mech_getPos(0)); }
static void mb_drawMech(BMTYPE **line) { core_textOutf(50, 0,BLACK,"Bank: %3d", mech_getPos(0)); core_textOutf(50,10,BLACK,"Frank: %3d",mech_getPos(1)); core_textOutf(50,20,BLACK,"Drac: %3d", mech_getPos(2)); }
static void cv_drawMech(BMTYPE **line) { core_textOutf(50, 0,BLACK,"CV Pos: %3d", mech_getPos(0)); }