25 int32_t maximum_search_depth = 4;
63 else if (!state_at_entry)
74 if (!execution_result)
114 move_list.
count = execution_result;
120 BOOL continuation_animation_pending;
125 while (continuation_animation_pending);
136 memset(&position, 0, 0xc);
146 int32_t source_target_found =
151 if (source_target_found)
173 int32_t destination_col = (int64_t)((entity.
navigation_command_position.
x - destination_board_origin_x) * 7 + (destination_board_width >> 1)) / destination_board_width;
180 int32_t destination_row = (int64_t)(destination_z_offset * 7 + (destination_board_depth >> 1)) / destination_board_depth;
184 if (!((destination_col | destination_row) & ~(uint32_t)
CHECKERS_COORDINATE_MASK) && ((uint8_t)destination_col + (uint8_t)destination_row) & 1)
204 int32_t source_col = (int64_t)((entity.
navigation_command_position.
x - source_board_origin_x) * 7 + (source_board_width >> 1)) / source_board_width;
211 int32_t source_row = (int64_t)(source_z_offset * 7 + (source_board_depth >> 1)) / source_board_depth;
239 int32_t count = move_list.
count;
245 BOOL game_over_animation_pending;
250 while (game_over_animation_pending);
270 BOOL selection_animation_pending;
276 while (selection_animation_pending);
297 BOOL single_move_animation_pending;
303 while (single_move_animation_pending);
334 int32_t search_depth_stack_slot;
337 search_depth_stack_slot = maximum_search_depth;
339 maximum_search_depth = search_depth_stack_slot;
343 search_depth_stack_slot = maximum_search_depth;
348 if (maximum_search_depth >= 1)
355 }
while (depth <= maximum_search_depth);
363 BOOL ai_move_animation_pending;
368 while (ai_move_animation_pending);
409 if (!state_before_render)
447 uint32_t remaining_destination_columns = (uint32_t)packed_destination_columns >> 3;
451 uint32_t remaining_destination_rows = (uint32_t)packed_destination_rows >> 3;
456 if (!remaining_destination_columns && !remaining_destination_rows)
463 bool final_jump = ((remaining_destination_columns | remaining_destination_rows) & ~(uint32_t)
CHECKERS_COORDINATE_MASK) == 0;
485 int32_t previous_col = 0;
486 int32_t previous_row = 0;
488 for (int32_t i = 0; i < moves->
count; ++i)
491 if (move->
fromCol != previous_col || move->
fromRow != previous_row)
int32_t Actor_TracePath(struct Entity *entity, int32_t target_selector, int32_t max_path_distance, int32_t best_path_distance, int32_t trace_flags)
#define CHECKERS_COORDINATE_MASK
#define CHECKERS_TRACE_UNBOUNDED
#define CHECKERS_BOARD_SIDE
@ CHECKERS_PATH_DESTINATION
#define CHECKERS_NAV_CURRENT_TARGET
@ CHECKERS_DIFFICULTY_HARD
@ CHECKERS_DIFFICULTY_NORMAL
@ CHECKERS_NAV_SELECTABLE_CELL
@ CHECKERS_NAV_DESTINATION_CELL
@ CHECKERS_NAV_SOURCE_CELL
#define CHECKERS_PLAYER_MASK
#define CHECKERS_SIMPLE_STEP_DELTA
#define CHECKERS_SEARCH_MIN_SCORE
#define CHECKERS_MAX_SEARCH_DEPTH
#define CHECKERS_LAST_COORDINATE
Checkers_MoveExecutionResult
@ CHECKERS_EXEC_TURN_COMPLETE_PROMOTED
@ CHECKERS_EXEC_TURN_COMPLETE
@ CHECKERS_EXEC_CAPTURE_CAN_CONTINUE
@ CHECKERS_STATE_CAPTURE_SEQUENCE
@ CHECKERS_STATE_BEGIN_PLAY
@ CHECKERS_STATE_CAPTURE_SEQUENCE_PROMOTED
@ CHECKERS_STATE_INITIALIZE
@ CHECKERS_STATE_SIMPLE_MOVE_PROMOTED
@ CHECKERS_STATE_SIMPLE_MOVE
@ CHECKERS_STATE_NO_MOVES_PLAYER1
@ CHECKERS_STATE_ANIMATION_COMPLETE
@ CHECKERS_STATE_NO_MOVES_PLAYER2
enum Checkers_MoveExecutionResult Checkers_ExecuteMoveSequence(struct Checkers_Board *board, struct Checkers_MoveSequence const *move_sequence)
int32_t Checkers_SearchBestMove(struct Checkers_Board *board, int32_t depth, struct Checkers_MoveSequence *out_best_move, enum Checkers_Player player, int32_t alpha, int32_t beta)
BOOL Checkers_BuildMoveList(struct Checkers_Board *board_state, enum Checkers_Player player, struct Checkers_MoveList *move_list)
void Checkers_InitializeBoard(struct Checkers_Board *board)
#define g_checkersSelectedRow1
#define g_checkersCameraPos1_Y
#define g_checkersAINodeCounter
#define g_checkersCameraPos2_Z
#define g_checkersCameraPos2_X
#define g_checkersAIThinkTimeout
#define g_checkersCameraPos2_Y
#define g_checkersJumpBuffer
#define g_checkersSelectedMove
#define g_checkersAIMove_fromRow
#define g_checkersAIMove_toRow
#define g_checkersSelectedCol2
#define g_checkersAIMove_fromCol
#define g_checkersMoveResult
#define g_checkersMinigameState
#define g_checkersCameraPos1_Z
#define g_checkersSelectedRow2
#define Checkers_GameBoard
#define g_checkersAIMove_toCol
#define g_checkersCameraPos1_X
#define g_checkersSelectedCol1
#define GAME_OVERLAY_CHECKERS_RENDER_BLOCKED
#define GAME_OVERLAY_CHECKERS_INPUT_BLOCKED
#define Game_FrameOverlayFlags
uint8_t Graphics_RenderFrame(void)
void Navigation_AddCommand(uint8_t command_type, int16_t target_selector_a, int16_t target_selector_b, int32_t speed, struct Math_Vec3I32 const *position)
void Checkers_HighlightPlayerPieces(struct Checkers_Board *board, enum Checkers_Player player)
BOOL Checkers_ProcessInputAndRender()
void Checkers_UpdateStateMachine()
void Checkers_QueueMoveListTargets(struct Checkers_MoveList *moves)
void Checkers_QueueSelectedCellTargets(void)
void Checkers_QueueMoveMidpointTarget(void)
static void Checkers_QueueCellTarget(uint8_t command, int32_t col, int32_t row)
void _longjmp(struct CRT_JumpBuffer3 *jump_buffer, int32_t value)
int32_t __setjmp3(struct CRT_JumpBuffer3 *jump_buffer, int32_t argument_count,...)
enum Checkers_Piece playable_by_col[0x8][0x4]
struct Checkers_MoveSequence records[0x3c]
uint8_t bonus_respawn_mode
struct Math_Vec3I32 navigation_command_position
struct Math_Vec3I32 * position_ptr
struct Actor * runtime_actor
#define g_world0CompletionBits
#define g_worldBonusStateArray