Skip to content

Latest commit

 

History

History
595 lines (536 loc) · 12.8 KB

code-index.md

File metadata and controls

595 lines (536 loc) · 12.8 KB

Code index

Generated by scripts/generate-code-index.mjs. Source headers point here for exact declaration locations. Regenerate after authored source changes.

apps/forge2d_arena.cpp

  • Line 24: read_text
  • Line 28: input
  • Line 35: build_autopilot
  • Line 36: grid
  • Line 42: path
  • Line 49: segment
  • Line 50: next
  • Line 60: main
  • Line 62: scene_path
  • Line 64: output_directory
  • Line 66: scene
  • Line 67: world
  • Line 68: replay
  • Line 72: image
  • Line 79: arena

apps/forge2d_arena_sdl.cpp

  • Line 19: main
  • Line 21: input
  • Line 27: world
  • Line 28: renderer
  • Line 30: previous
  • Line 31: input_frame
  • Line 33: now

benchmarks/benchmark.cpp

  • Line 20: started
  • Line 28: main
  • Line 29: entity_count
  • Line 30: storage_budget_ms
  • Line 31: collision_budget_ms
  • Line 32: simulation_budget_ms
  • Line 38: storage_ms
  • Line 40: entity
  • Line 52: random
  • Line 53: coordinate
  • Line 59: spatial_hash
  • Line 60: pair_count
  • Line 61: collision_ms
  • Line 69: simulation_ms
  • Line 74: passed

fuzz/scene_parser_fuzz.cpp

  • Line 17: text
  • Line 19: scene
  • Line 20: canonical

include/forge2d/collision.hpp

  • Line 16: CollisionItem
  • Line 17: entity
  • Line 18: bounds
  • Line 21: CollisionPair
  • Line 22: first
  • Line 23: second
  • Line 25: operator<=>
  • Line 28: SpatialHash
  • Line 30: SpatialHash
  • Line 32: query
  • Line 33: cell_size
  • Line 38: cell_size_
  • Line 42: brute_force_collisions

include/forge2d/components.hpp

  • Line 15: Transform
  • Line 16: position
  • Line 17: operator<=>
  • Line 20: KinematicBody
  • Line 21: velocity
  • Line 22: half_extent
  • Line 23: operator<=>
  • Line 26: Sprite
  • Line 27: rgba
  • Line 28: layer
  • Line 29: operator<=>
  • Line 32: InputFrame
  • Line 33: move_x
  • Line 34: move_y
  • Line 35: action
  • Line 37: operator<=>

include/forge2d/entity.hpp

  • Line 20: Entity
  • Line 21: index
  • Line 22: generation
  • Line 24: packed
  • Line 28: operator<=>
  • Line 32: EntityPool
  • Line 34: create
  • Line 35: destroy
  • Line 36: valid
  • Line 37: live_count
  • Line 44: generations_
  • Line 45: alive_
  • Line 46: next_free_
  • Line 47: free_head_
  • Line 48: live_count_
  • Line 59: contains
  • Line 63: dense_index
  • Line 68: insert_or_assign
  • Line 77: dense_index
  • Line 89: erase
  • Line 93: dense_index
  • Line 94: last_index
  • Line 106: get
  • Line 113: get
  • Line 120: entities
  • Line 123: components
  • Line 126: components
  • Line 129: size
  • Line 134: ensure_sparse
  • Line 140: sparse_
  • Line 141: entities_
  • Line 142: components_

include/forge2d/fixed_step.hpp

  • Line 15: FixedStepClock
  • Line 17: FixedStepClock
  • Line 19: tick_duration_
  • Line 25: consume
  • Line 26: non_negative
  • Line 28: available
  • Line 29: ticks
  • Line 38: interpolation_alpha
  • Line 42: dropped_ticks
  • Line 47: tick_duration_
  • Line 48: accumulator_
  • Line 49: max_ticks_per_frame_
  • Line 50: dropped_ticks_

include/forge2d/math.hpp

  • Line 15: Vec2i
  • Line 16: x
  • Line 17: y
  • Line 19: operator+=
  • Line 30: operator<=>
  • Line 33: operator+
  • Line 38: operator-
  • Line 39: saturating_subtract
  • Line 48: operator*
  • Line 49: saturating_multiply
  • Line 58: length_squared
  • Line 59: magnitude
  • Line 60: wide
  • Line 63: x
  • Line 64: y
  • Line 68: Aabb
  • Line 69: center
  • Line 70: half_extent
  • Line 72: left
  • Line 75: right
  • Line 78: top
  • Line 81: bottom
  • Line 85: operator<=>
  • Line 88: intersects
  • Line 93: clamp_axis

include/forge2d/pathfinding.hpp

  • Line 15: GridPoint
  • Line 16: x
  • Line 17: y
  • Line 19: operator<=>
  • Line 22: Grid
  • Line 24: Grid
  • Line 26: width
  • Line 29: height
  • Line 32: in_bounds
  • Line 33: blocked
  • Line 34: set_blocked
  • Line 37: index
  • Line 39: width_
  • Line 40: height_
  • Line 41: blocked_
  • Line 44: find_path

include/forge2d/profiler.hpp

  • Line 17: TimingSummary
  • Line 18: mean_microseconds
  • Line 19: p95_microseconds
  • Line 20: maximum_microseconds
  • Line 21: sample_count
  • Line 24: FrameProfiler
  • Line 26: FrameProfiler
  • Line 33: record
  • Line 34: microseconds
  • Line 43: summary
  • Line 47: sorted
  • Line 49: p95_index
  • Line 56: capacity_
  • Line 57: next_
  • Line 58: samples_

include/forge2d/renderer.hpp

  • Line 16: Image
  • Line 18: Image
  • Line 20: clear
  • Line 21: fill_rect
  • Line 23: write_ppm
  • Line 24: pixel_hash
  • Line 25: width
  • Line 28: height
  • Line 31: pixels
  • Line 36: width_
  • Line 37: height_
  • Line 38: pixels_
  • Line 41: render_world

include/forge2d/replay.hpp

  • Line 17: Replay
  • Line 18: seed
  • Line 19: tick_rate
  • Line 20: frames
  • Line 22: operator<=>
  • Line 25: serialize_replay
  • Line 26: parse_replay

include/forge2d/scene.hpp

  • Line 16: SceneEntity
  • Line 17: name
  • Line 18: transform
  • Line 19: body
  • Line 20: sprite
  • Line 21: player
  • Line 23: operator<=>
  • Line 26: Scene
  • Line 27: minimum
  • Line 28: maximum
  • Line 29: entities
  • Line 31: operator<=>
  • Line 34: serialize_scene
  • Line 35: parse_scene

include/forge2d/sdl_renderer.hpp

  • Line 14: SDL_Renderer
  • Line 15: SDL_Window
  • Line 19: SdlRenderer
  • Line 21: SdlRenderer
  • Line 24: SdlRenderer
  • Line 25: operator=
  • Line 26: SdlRenderer
  • Line 27: operator=
  • Line 29: poll
  • Line 30: draw
  • Line 35: width_
  • Line 36: height_

include/forge2d/world.hpp

  • Line 20: SnapshotEntity
  • Line 21: entity
  • Line 22: transform
  • Line 23: body
  • Line 24: sprite
  • Line 25: player
  • Line 27: operator<=>
  • Line 30: World
  • Line 32: World
  • Line 35: spawn
  • Line 37: destroy
  • Line 38: valid
  • Line 41: step
  • Line 43: snapshot
  • Line 44: collision_pairs
  • Line 45: state_hash
  • Line 46: tick
  • Line 49: entity_count
  • Line 52: player
  • Line 56: from_scene
  • Line 59: collision_items
  • Line 61: entities_
  • Line 62: transforms_
  • Line 63: bodies_
  • Line 64: sprites_
  • Line 65: player_
  • Line 66: minimum_
  • Line 67: maximum_
  • Line 69: tick_
  • Line 72: run_replay

platform/arena.c

  • Line 10: forge2d_arena_init
  • Line 20: forge2d_arena_allocate
  • Line 46: forge2d_arena_reset

platform/arena.h

  • Line 25: forge2d_arena_init
  • Line 28: forge2d_arena_allocate
  • Line 31: forge2d_arena_reset

scripts/generate-code-index.mjs

  • Line 11: root
  • Line 12: outputPath
  • Line 13: supportedExtensions
  • Line 14: excludedDirectories
  • Line 15: typePattern
  • Line 16: functionPattern
  • Line 17: qualifiedConstructorPattern
  • Line 18: constantPattern
  • Line 19: inferredVariablePattern
  • Line 20: fieldPattern
  • Line 23: walk
  • Line 25: path
  • Line 33: declarations
  • Line 34: extension
  • Line 35: lines
  • Line 36: knownTypes
  • Line 39: match
  • Line 44: match
  • Line 48: type
  • Line 51: functionMatch
  • Line 53: qualifiedConstructor
  • Line 55: parts
  • Line 60: simpleConstructor
  • Line 64: splitDeclaration
  • Line 66: variable
  • Line 73: render
  • Line 74: lines
  • Line 81: path
  • Line 82: items
  • Line 84: repositoryPath
  • Line 86: item
  • Line 93: main
  • Line 94: content

scripts/validate-repository.mjs

  • Line 11: root
  • Line 12: requiredFiles
  • Line 19: headerExtensions
  • Line 20: excludedDirectories
  • Line 23: walk
  • Line 25: path
  • Line 32: brokenLinks
  • Line 33: markdown
  • Line 35: target
  • Line 37: localTarget
  • Line 43: main
  • Line 44: failures
  • Line 45: required
  • Line 48: path
  • Line 49: repositoryPath
  • Line 51: target
  • Line 56: firstLines

scripts/verify.sh

  • Line 7: ROOT_DIR
  • Line 8: BUILD_DIR

src/collision.cpp

  • Line 17: max_query_items
  • Line 18: max_cells_per_item
  • Line 20: floor_div
  • Line 21: quotient
  • Line 22: remainder
  • Line 29: normalized_pair
  • Line 35: SpatialHash::SpatialHash
  • Line 41: SpatialHash::query
  • Line 47: bounds
  • Line 51: min_x
  • Line 52: max_x
  • Line 53: min_y
  • Line 54: max_y
  • Line 55: span_x
  • Line 56: span_y
  • Line 74: left
  • Line 75: right
  • Line 85: brute_force_collisions

src/pathfinding.cpp

  • Line 18: max_dimension
  • Line 19: max_cells
  • Line 21: heuristic
  • Line 25: OpenNode
  • Line 26: score
  • Line 27: cost
  • Line 28: index
  • Line 31: HigherPriority
  • Line 32: operator
  • Line 45: Grid::Grid
  • Line 49: cell_count
  • Line 56: Grid::in_bounds
  • Line 60: Grid::index
  • Line 68: Grid::blocked
  • Line 72: Grid::set_blocked
  • Line 76: find_path
  • Line 81: width
  • Line 82: cell_count
  • Line 83: to_index
  • Line 86: to_point
  • Line 90: start_index
  • Line 91: goal_index
  • Line 92: infinity
  • Line 93: costs
  • Line 94: parent
  • Line 98: directions
  • Line 101: current
  • Line 109: point
  • Line 111: neighbor
  • Line 115: neighbor_index
  • Line 116: next_cost

src/replay.cpp

  • Line 14: maximum_frames
  • Line 16: require_line_end
  • Line 25: serialize_replay
  • Line 42: parse_replay
  • Line 54: line
  • Line 64: line
  • Line 71: frame_count
  • Line 76: line
  • Line 87: move_x
  • Line 88: move_y
  • Line 89: action
  • Line 90: line

src/scene.cpp

  • Line 17: maximum_entities
  • Line 18: maximum_coordinate
  • Line 20: valid_name
  • Line 27: require_line_end
  • Line 34: validate_scene
  • Line 42: players
  • Line 63: serialize_scene
  • Line 80: parse_scene
  • Line 92: line
  • Line 100: entity_count
  • Line 105: line
  • Line 118: player
  • Line 119: layer
  • Line 120: line

src/sdl_renderer.cpp

  • Line 16: channel
  • Line 22: SdlRenderer::SdlRenderer
  • Line 23: width_
  • Line 29: error
  • Line 35: SdlRenderer::~SdlRenderer
  • Line 45: SdlRenderer::poll
  • Line 46: event
  • Line 52: keys
  • Line 61: SdlRenderer::draw
  • Line 65: color
  • Line 69: left
  • Line 72: top
  • Line 75: rect_width
  • Line 77: rect_height

src/software_renderer.cpp

  • Line 17: fnv_offset
  • Line 18: fnv_prime
  • Line 20: red
  • Line 23: green
  • Line 26: blue
  • Line 30: project_coordinate
  • Line 32: projected
  • Line 40: Image::Image
  • Line 47: Image::clear
  • Line 51: Image::fill_rect
  • Line 53: clipped_left
  • Line 54: clipped_right
  • Line 55: clipped_top
  • Line 56: clipped_bottom
  • Line 59: index
  • Line 65: Image::write_ppm
  • Line 69: output
  • Line 84: Image::pixel_hash
  • Line 85: hash
  • Line 95: render_world
  • Line 101: left
  • Line 104: right
  • Line 107: top
  • Line 110: bottom

src/world.cpp

  • Line 16: player_speed
  • Line 17: fnv_offset
  • Line 18: fnv_prime
  • Line 20: hash_u64
  • Line 27: signed_bits
  • Line 31: saturating_int32
  • Line 39: EntityPool::create
  • Line 40: index
  • Line 48: initial_capacity
  • Line 49: growth_capacity
  • Line 53: required_capacity
  • Line 71: EntityPool::destroy
  • Line 85: EntityPool::valid
  • Line 90: World::World
  • Line 91: minimum_
  • Line 97: World::spawn
  • Line 104: low_x
  • Line 105: high_x
  • Line 106: low_y
  • Line 107: high_y
  • Line 113: entity
  • Line 131: World::destroy
  • Line 144: World::step
  • Line 149: player_body
  • Line 153: body_entities
  • Line 154: body_components
  • Line 156: body
  • Line 157: transform
  • Line 158: low_x
  • Line 159: high_x
  • Line 160: low_y
  • Line 161: high_y
  • Line 162: next_x
  • Line 163: next_y
  • Line 176: World::snapshot
  • Line 194: World::collision_items
  • Line 206: World::collision_pairs
  • Line 210: World::state_hash
  • Line 211: hash
  • Line 228: World::from_scene
  • Line 229: world
  • Line 236: run_replay

tests/test_main.cpp

  • Line 38: require
  • Line 44: require_throws
  • Line 53: sample_scene
  • Line 60: test_math_and_fixed_step
  • Line 83: test_entity_pool_and_sparse_set_properties
  • Line 92: random
  • Line 93: entity_distribution
  • Line 94: value_distribution
  • Line 96: entity
  • Line 98: erased
  • Line 99: expected
  • Line 102: value
  • Line 107: iterator
  • Line 116: stale
  • Line 118: replacement
  • Line 124: test_c_arena_alignment_and_overflow
  • Line 126: arena
  • Line 128: first
  • Line 129: second
  • Line 133: offset
  • Line 143: test_spatial_hash_matches_brute_force
  • Line 144: spatial_hash
  • Line 145: random
  • Line 146: coordinate
  • Line 147: extent
  • Line 170: test_astar_returns_valid_shortest_path
  • Line 171: grid
  • Line 177: path
  • Line 182: delta_x
  • Line 183: delta_y
  • Line 195: test_scene_and_replay_round_trip
  • Line 196: scene
  • Line 212: test_world_replay_and_render_are_deterministic
  • Line 213: scene
  • Line 220: first
  • Line 221: second
  • Line 236: first_image
  • Line 237: second_image
  • Line 242: player
  • Line 247: player_entity
  • Line 253: test_profiler_summary_is_bounded
  • Line 254: profiler
  • Line 259: summary
  • Line 268: main
  • Line 279: failures