![]() |
Conquer Chess
Chess and Starcraft combined
|
#include "game_view.h"#include "board_layout.h"#include "draw.h"#include "draw_board.h"#include "game.h"#include "game_options.h"#include "game_rect.h"#include "game_resources.h"#include "game_statistics_widget.h"#include "game_view_layout.h"#include "lobby_options.h"#include "physical_controller.h"#include "physical_controllers.h"#include "replay.h"#include "render_window.h"#include "screen_coordinate.h"#include "screen_rect.h"#include "sfml_helper.h"#include <SFML/Graphics.hpp>#include <SFML/Graphics/Text.hpp>#include <cassert>#include <cmath>#include <string>#include <sstream>
Functions | |
| const physical_controller & | get_physical_controller (const game_view &view, const side player_side) |
| Get the controller for a certain side. | |
| physical_controller_type | get_physical_controller_type (const game_view &view, const side player_side) |
| Get the controller type for a certain side. | |
| std::string | get_last_log_messages (const game_view &view, const side player) noexcept |
| Get the last log messages for a player. | |
| const game_view_layout & | get_layout (const game_view &v) noexcept |
| Get the layout. | |
| const std::vector< piece > & | get_pieces (const game_view &v) noexcept |
| Get the pieces. | |
| const game_coordinate & | get_cursor_pos (const game_view &view, const side player) noexcept |
| Get the player position. | |
| std::vector< std::string > | get_controls_texts (const game_controller &c, const side player_side) |
| Get the controls text for a player with a controller. | |
| const in_game_time & | get_time (const game_view &v) noexcept |
| Get the time in the game. | |
| void | process_event (game_controller &c, const physical_controllers &pc, const sf::Event &event, const game_view_layout &layout) |
| Process the event, by letting the controllers add actions to the game sf::Event -> controllers -> control_action. | |
| void | draw_board (game_view &view, const bool show_occupied) |
| Show the board: squares, unit paths, pieces, health bars. | |
| void | draw_controls (game_view &view, const side player_side) |
| Show the controls (e.g. for a unit) on-screen for a player. | |
| void | draw_game_statistics_widget (game_view &view) |
| Show the game info, e.g. the time. | |
| void | draw_navigation_controls (game_view &view) |
| Show the controls (e.g. for a unit) on-screen for a player. | |
| void | show_debug (game_view &view, const side player_side) |
| Show debug info on-screen for a player. | |
| void | draw_log (game_view &view, const side player) |
| Show the log on-screen, i.e. things the pieces say. | |
| void | draw_background (game_view &view) |
| Show the map of the window. | |
| void | show_occupied_squares (game_view &view) |
| Show the squares that are occupied on-screen Throws if this option is turned off. | |
| void | draw_pieces (game_view &view) |
| Show the pieces of the board on-screen. | |
| void | draw_possible_moves (game_view &view) |
| Show the possible moves for the selected pieces. | |
| void | draw_squares (game_view &view) |
| Show the squares of the board on-screen. | |
| void | draw_cursor (game_view &view, const side player) |
| Show the highlighted square under the cursor on-screen for a player. | |
| void | draw_unit_health_bars (game_view &view) |
| Show the pieces' health bars on-screen. | |
| void | draw_unit_paths (game_view &view) |
| Show the planned paths for the units on-screen. | |
| void | draw_unit_info (game_view &view, const side player_side) |
| Show the selected unit(s) on-screen for a player. | |
| void | test_game_view () |
| OCLINT tests may be many. | |
| bool | would_be_valid (const game_view &view, chess_color player_color) |
| Would it be a valid move if the user would press LMB or RMB? | |
| void draw_background | ( | game_view & | view | ) |
Show the map of the window.
| void draw_board | ( | game_view & | view, |
| const bool | show_occupied | ||
| ) |
Show the board: squares, unit paths, pieces, health bars.
Show the controls (e.g. for a unit) on-screen for a player.
Show the highlighted square under the cursor on-screen for a player.
| void draw_game_statistics_widget | ( | game_view & | view | ) |
Show the game info, e.g. the time.
Show the log on-screen, i.e. things the pieces say.
| void draw_navigation_controls | ( | game_view & | view | ) |
Show the controls (e.g. for a unit) on-screen for a player.
| void draw_pieces | ( | game_view & | view | ) |
Show the pieces of the board on-screen.
| void draw_possible_moves | ( | game_view & | view | ) |
Show the possible moves for the selected pieces.
e.g. put crosses on squares that can be attacked. Does nothing if no pieces are selected
| void draw_squares | ( | game_view & | view | ) |
Show the squares of the board on-screen.
| void draw_unit_health_bars | ( | game_view & | view | ) |
Show the pieces' health bars on-screen.
Show the selected unit(s) on-screen for a player.
| void draw_unit_paths | ( | game_view & | view | ) |
Show the planned paths for the units on-screen.
| std::vector< std::string > get_controls_texts | ( | const game_controller & | c, |
| const side | player_side | ||
| ) |
Get the controls text for a player with a controller.
|
noexcept |
Get the player position.
Get the last log messages for a player.
|
noexcept |
Get the layout.
| const physical_controller & get_physical_controller | ( | const game_view & | view, |
| const side | player_side | ||
| ) |
Get the controller for a certain side.
| physical_controller_type get_physical_controller_type | ( | const game_view & | view, |
| const side | player_side | ||
| ) |
Get the controller type for a certain side.
|
noexcept |
Get the time in the game.
| void process_event | ( | game_controller & | c, |
| const physical_controllers & | pc, | ||
| const sf::Event & | event, | ||
| const game_view_layout & | layout | ||
| ) |
Process the event, by letting the controllers add actions to the game sf::Event -> controllers -> control_action.
Show debug info on-screen for a player.
| void show_occupied_squares | ( | game_view & | view | ) |
Show the squares that are occupied on-screen Throws if this option is turned off.
| void test_game_view | ( | ) |
OCLINT tests may be many.
| bool would_be_valid | ( | const game_view & | view, |
| chess_color | player_color | ||
| ) |
Would it be a valid move if the user would press LMB or RMB?