Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Hopson97/Asciimon
/ functions
Functions
79 in github.com/Hopson97/Asciimon
⨍
Functions
79
◇
Types & classes
16
↓ 9 callers
Method
draw_string
Draws a string to a render section. Note: The function does not handle the length of strings going outside of the render section (for now?)
src/graphics/renderer.rs:157
↓ 6 callers
Method
clear_section
Clears just a single section of the screen
src/graphics/renderer.rs:66
↓ 5 callers
Method
add_render_section
Adds a section to the UI to draw things to
src/graphics/renderer.rs:49
↓ 5 callers
Method
position
(&self)
src/game/player.rs:18
↓ 4 callers
Method
draw_line_v
Draws a solid vertical line
src/graphics/renderer.rs:96
↓ 4 callers
Method
write
Writes a string to the console interface
src/game/console.rs:64
↓ 3 callers
Method
create_border
Creates a border around the rendering section area
src/graphics/renderer.rs:106
↓ 3 callers
Method
move_player
Moves player ~1 step Returns true if the player moved, false if not (eg collision or other event occurs)
src/game/game_state/state_explore.rs:74
↓ 3 callers
Method
set_cursor_render_section
* Public drawing interface */ Sets the location of the cursor relative to the top-left of a render section
src/graphics/renderer.rs:143
↓ 3 callers
Method
write_with_colour
Writes a string to console interface... With colour!
src/game/console.rs:69
↓ 2 callers
Method
add_line
(&mut self, line: &str)
src/game/console.rs:35
↓ 2 callers
Method
ansi_string
(&self, id: u8)
src/graphics/colour.rs:35
↓ 2 callers
Function
clamp
(value: T, low: T, high: T)
src/util/maths.rs:3
↓ 2 callers
Method
clear
Clears the entire window
src/graphics/renderer.rs:61
↓ 2 callers
Function
clear_terminal
()
src/main.rs:8
↓ 2 callers
Method
draw
(&self, index: usize, renderer: &Renderer)
src/game/console.rs:39
↓ 2 callers
Method
draw_line_h
Draws a solid horizontal line
src/graphics/renderer.rs:86
↓ 2 callers
Function
flush_stdout
()
src/util/mod.rs:8
↓ 2 callers
Method
get_tile
(&self, world_position: Vector2D<i32>)
src/game/world/mod.rs:73
↓ 2 callers
Method
handle_move_player
Attempts to the move the player's local position by x/y amount in the x/y direction
src/game/game_state/state_explore.rs:35
↓ 2 callers
Method
handle_move_player_step
Cycles through a buffer of move commands one by one and steps the plyer #Example >wwwssdd Moves player 3 left, then 2 down, then 2 right. Collision wi
src/game/game_state/state_explore.rs:58
↓ 2 callers
Function
load_section_line
Just so that I don't have to repeat writing match with "end" over and over
src/game/world/chunk_loader.rs:118
↓ 2 callers
Method
move_position
(&mut self, movement: Vector2D<i32>)
src/game/player.rs:14
↓ 2 callers
Method
num_texts
(&self)
src/game/console.rs:51
↓ 1 callers
Function
add_chunk_position
Adds the world position of a chunk to a local world position to that chunk
src/game/world/chunk_loader.rs:154
↓ 1 callers
Method
ansi_text_string
(&self)
src/graphics/colour.rs:26
↓ 1 callers
Method
draw_line
Draws a single line of the map,
src/game/world/chunk.rs:87
↓ 1 callers
Method
execute_command
( &mut self, command_args: &[&str], console: &mut Console, )
src/game/game_state/state_explore.rs:128
↓ 1 callers
Function
extract_pos_from_path
Extracts X/Y from a chunk file Eg, '2_5.chunk' as the path_string param would return x: 2, y: 5
src/game/world/chunk_loader.rs:44
↓ 1 callers
Method
get_portal_at
(&self, world_position: Vector2D<i32>)
src/game/world/mod.rs:93
↓ 1 callers
Method
is_portal_at
(&self, world_position: Vector2D<i32>)
src/game/world/mod.rs:89
↓ 1 callers
Function
load_chunk
Reads a chunk file and extracts the data from it
src/game/world/chunk_loader.rs:57
↓ 1 callers
Function
map_file_name
Gets map file from from x/y coords
src/game/world/chunk_loader.rs:113
↓ 1 callers
Function
path_exists
on tin
src/game/world/chunk_loader.rs:108
↓ 1 callers
Method
portals
(&self)
src/game/world/chunk_loader.rs:37
↓ 1 callers
Method
render
(&mut self, renderer: &Renderer, centre_position: Vector2D<i32>)
src/game/world/mod.rs:60
↓ 1 callers
Method
render_data
(&self)
src/graphics/sprite.rs:35
↓ 1 callers
Method
run
(&mut self)
src/game/mod.rs:77
↓ 1 callers
Method
skip_line
Writes an empty line
src/game/console.rs:94
↓ 1 callers
Method
tick
(&mut self)
src/game/mod.rs:98
↓ 1 callers
Method
tile_data
(&self)
src/game/world/chunk_loader.rs:33
↓ 1 callers
Method
write_instructions
(&self, console: &mut Console)
src/game/game_state/state_explore.rs:96
Method
add
(self, other: Self)
src/util/vector.rs:37
Method
add_assign
(&mut self, other: Self)
src/util/vector.rs:71
Method
ansi_bg_string
(&self)
src/graphics/colour.rs:30
Method
cast
(self)
src/util/vector.rs:23
Method
draw
Draws the player and the overworld etc
src/game/game_state/state_explore.rs:171
Method
draw_logo
(renderer: &Renderer)
src/game/mod.rs:158
Method
draw_sprite
Draws a sprite (duh)
src/graphics/renderer.rs:172
Method
fmt
(&self, f: &mut fmt::Formatter)
src/util/vector.rs:29
Method
get_tile
(&self, x: usize, y: usize)
src/game/world/chunk.rs:124
Method
get_user_input
(renderer: &Renderer)
src/game/mod.rs:135
Function
handle_map_line
Reads and extracts a line from the map section of the .chunk file
src/game/world/chunk_loader.rs:129
Function
handle_portal_line
Reads and extracts a line from the portal section of the .chunk file
src/game/world/chunk_loader.rs:145
Function
main
()
src/main.rs:12
Method
mul
(self, rhs: f32)
src/graphics/colour.rs:54
Method
mul
(self, other: T)
src/util/vector.rs:55
Method
new
(colour: Colour)
src/game/console.rs:28
Method
new
()
src/game/player.rs:8
Method
new
()
src/game/world/mod.rs:24
Method
new
()
src/game/world/chunk_loader.rs:24
Method
new
(pos: Vector2D<i32>, tile_data: Vec<Vec<char>>)
src/game/world/chunk.rs:35
Method
new
()
src/game/game_state/state_explore.rs:26
Method
new
(r: u8, g: u8, b: u8)
src/graphics/colour.rs:22
Method
new
()
src/graphics/sprite.rs:9
Method
new
(start_point: Vector2D<i32>, size: Vector2D<i32>)
src/graphics/renderer.rs:26
Method
new
(x: T, y: T)
src/util/vector.rs:19
Method
parse_step
This is for the player move input, by converting X/Y direction string to a integral value
src/game/game_state/state_explore.rs:134
Method
render
(&self, renderer: &Renderer, centre_position: Vector2D<i32>)
src/game/world/chunk.rs:47
Method
run_game
()
src/game/mod.rs:52
Method
set_bg_colour
Set the background colour for text printed to the terminal
src/graphics/renderer.rs:130
Method
set_cursor_location
Sets cursor location in the renderer
src/graphics/renderer.rs:135
Method
set_text_colour
Set the foreground colour for text printed to the terminal
src/graphics/renderer.rs:125
Method
size
(&self)
src/graphics/renderer.rs:44
Method
square
(width: i32, height: i32, fill: char)
src/graphics/sprite.rs:23
Method
sub
(self, other: Self)
src/util/vector.rs:46
Method
sub_assign
(&mut self, other: Self)
src/util/vector.rs:79
Method
with_capacity
(capacity: usize)
src/graphics/sprite.rs:16
Method
world_to_chunk_position
(world_position: Vector2D<i32>)
src/game/world/mod.rs:82