// The olds.ro American Football core interface used by the add-on plugins.
// Copyright (C) 2026 daemon (olds.ro). SPDX-License-Identifier: GPL-3.0-or-later
//
// The football core fires the forwards (CreateMultiForward, ET_IGNORE) and provides the
// natives in the library "olds_afootball". Add-ons define the forwards they need as public
// functions; an add-on that calls the natives should use a native filter so it also loads
// without the core. A core with other names can be connected through a small bridge plugin.
#if defined _olds_afootball_included
#endinput
#endif
#define _olds_afootball_included
/**
* A kickoff: the ball is kicked to the receiving team.
*
* @param receiving_team 1 = Terrorists, 2 = Counter-Terrorists
*/
forward olds_af_kickoff(receiving_team);
/**
* A player caught the kickoff and starts the return.
*/
forward olds_af_catch(id);
/**
* The returner was tackled (or the return play is over).
*/
forward olds_af_tackle(id);
/**
* The ball is spotted for the next play: the line of scrimmage is set and the pre-snap
* phase begins.
*
* @param axis 0 = the field runs along x, 1 = along y
* @param line the line of scrimmage on that axis
* @param t_side 1 when the Terrorists line up at coordinates above the line (the
* Counter-Terrorists below it), -1 the other way round
*/
forward olds_af_ball_spot(axis, Float:line, t_side);
/**
* The ball is snapped: the pre-snap phase is over.
*/
forward olds_af_snap();
/**
* Half-time.
*/
forward olds_af_halftime();
/**
* Moves the ball spot a number of yards toward a team's own end zone (a penalty against
* that team).
*
* @param team 1 = Terrorists, 2 = Counter-Terrorists
* @param yards yards to move
* @noreturn
*/
native olds_af_move_spot(team, yards);
/**
* Whistles the play dead.
*
* @param reason a short reason for the core's log and messages
* @noreturn
*/
native olds_af_whistle(const reason[]);