Skip to content

Latest commit

 

History

History
906 lines (829 loc) · 19.6 KB

code-index.md

File metadata and controls

906 lines (829 loc) · 19.6 KB

Code index

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

apps/editor_files.cpp

  • Line 21: file_error
  • Line 25: regular
  • Line 26: info
  • Line 34: random_suffix
  • Line 35: bytes
  • Line 40: digits
  • Line 50: Handle::~Handle
  • Line 56: read_text
  • Line 60: size
  • Line 65: text
  • Line 66: received
  • Line 71: extra
  • Line 79: atomic_text
  • Line 83: attributes
  • Line 89: staging
  • Line 95: written
  • Line 112: executable_directory
  • Line 113: path
  • Line 114: length
  • Line 121: default_profile
  • Line 122: result
  • Line 131: ensure_profile
  • Line 133: attributes
  • Line 140: wide
  • Line 147: length
  • Line 152: result
  • Line 160: utf8
  • Line 167: length
  • Line 173: result

apps/editor_files.hpp

  • Line 19: Handle
  • Line 21: Handle
  • Line 23: Handle
  • Line 24: operator=
  • Line 25: get
  • Line 33: read_text
  • Line 34: atomic_text
  • Line 35: executable_directory
  • Line 36: default_profile
  • Line 37: ensure_profile
  • Line 38: wide
  • Line 39: utf8

apps/forge2d_arena.cpp

  • Line 25: read_text
  • Line 29: input
  • Line 36: build_autopilot
  • Line 37: grid
  • Line 43: path
  • Line 50: segment
  • Line 51: next
  • Line 61: main
  • Line 63: scene_path
  • Line 65: output_directory
  • Line 67: scene
  • Line 68: world
  • Line 69: initial_pairs
  • Line 70: replay
  • Line 74: final_pairs
  • Line 75: image
  • Line 78: contacts
  • Line 85: write_pairs
  • Line 87: first
  • Line 88: second
  • Line 97: canonical
  • Line 99: forge2d::serialize_scene
  • Line 104: 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

apps/forge2d_editor.cpp

  • Line 32: apply_id
  • Line 33: play_id
  • Line 34: step_id
  • Line 35: reset_id
  • Line 36: save_id
  • Line 37: open_id
  • Line 38: replay_id
  • Line 39: export_id
  • Line 40: arena_id
  • Line 41: layers_id
  • Line 42: help_id
  • Line 43: quit_id
  • Line 44: text_id
  • Line 45: frame_timer
  • Line 46: acceptance_timer
  • Line 47: help_text
  • Line 69: editor_text
  • Line 70: count
  • Line 74: text
  • Line 75: received
  • Line 77: encoded
  • Line 89: choose_file
  • Line 91: dialog
  • Line 106: require
  • Line 113: screenshot
  • Line 114: bounds
  • Line 116: width
  • Line 117: height
  • Line 118: screen
  • Line 119: memory
  • Line 120: bitmap
  • Line 121: previous
  • Line 122: painted
  • Line 131: token
  • Line 134: saved
  • Line 138: image
  • Line 147: Application
  • Line 149: Application
  • Line 150: profile_
  • Line 156: info
  • Line 162: defaults
  • Line 164: saved
  • Line 175: run
  • Line 176: main_class
  • Line 197: message
  • Line 206: procedure
  • Line 207: app
  • Line 209: create
  • Line 235: canvas_procedure
  • Line 237: app
  • Line 239: create
  • Line 268: message
  • Line 277: size
  • Line 294: now
  • Line 295: ticks
  • Line 297: previous_tick
  • Line 324: child
  • Line 325: control
  • Line 335: create_controls
  • Line 336: menu
  • Line 337: file
  • Line 344: examples
  • Line 398: layout
  • Line 399: bounds
  • Line 401: width
  • Line 402: height
  • Line 403: split
  • Line 415: set_source
  • Line 437: input
  • Line 438: horizontal
  • Line 440: vertical
  • Line 446: update_status
  • Line 447: world
  • Line 461: command
  • Line 502: path
  • Line 505: executable_directory
  • Line 513: path
  • Line 521: path
  • Line 523: directory
  • Line 537: export_bundle
  • Line 542: image
  • Line 563: paint_canvas
  • Line 564: paint
  • Line 565: dc
  • Line 566: bounds
  • Line 569: image
  • Line 575: info
  • Line 590: acceptance
  • Line 613: authored
  • Line 614: location
  • Line 622: saved
  • Line 623: before
  • Line 625: refused
  • Line 641: snapshot
  • Line 642: player
  • Line 646: hash
  • Line 647: replay
  • Line 649: initial
  • Line 663: snapshot
  • Line 664: player
  • Line 686: finish_acceptance
  • Line 699: overwrite_refused
  • Line 730: phase_
  • Line 733: window_
  • Line 734: canvas_
  • Line 735: source_
  • Line 736: heading_
  • Line 737: source_label_
  • Line 738: instructions_
  • Line 739: status_
  • Line 741: keys_
  • Line 742: setting_text_
  • Line 743: unapplied_
  • Line 744: unsaved_
  • Line 745: load_error_
  • Line 746: exit_code_
  • Line 747: acceptance_play_pending_
  • Line 748: acceptance_play_started_
  • Line 749: acceptance_replay_hash_
  • Line 752: last_frame_
  • Line 758: wWinMain
  • Line 762: count
  • Line 766: phase
  • Line 771: enabled
  • Line 791: app

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 17: CollisionItem
  • Line 18: entity
  • Line 19: bounds
  • Line 20: filter
  • Line 23: CollisionPair
  • Line 24: first
  • Line 25: second
  • Line 27: operator<=>
  • Line 30: SpatialHash
  • Line 32: SpatialHash
  • Line 34: query
  • Line 35: cell_size
  • Line 40: cell_size_
  • Line 44: brute_force_collisions

include/forge2d/components.hpp

  • Line 17: CollisionFilter
  • Line 18: category
  • Line 19: mask
  • Line 20: valid
  • Line 23: operator<=>
  • Line 26: Transform
  • Line 27: position
  • Line 28: operator<=>
  • Line 31: KinematicBody
  • Line 32: velocity
  • Line 33: half_extent
  • Line 34: filter
  • Line 35: operator<=>
  • Line 38: Sprite
  • Line 39: rgba
  • Line 40: layer
  • Line 41: operator<=>
  • Line 44: InputFrame
  • Line 45: move_x
  • Line 46: move_y
  • Line 47: action
  • Line 49: operator<=>

include/forge2d/editor.hpp

  • Line 19: EditorSession
  • Line 25: EditorSession
  • Line 26: apply_scene
  • Line 27: load_replay
  • Line 28: reset
  • Line 29: play
  • Line 30: pause
  • Line 31: step
  • Line 32: advance
  • Line 34: playing
  • Line 37: reviewing_replay
  • Line 40: replay_remaining
  • Line 41: scene
  • Line 44: world
  • Line 47: recording
  • Line 50: scene_text
  • Line 51: replay_text
  • Line 52: image
  • Line 55: scene_
  • Line 56: world_
  • Line 57: recording_
  • Line 58: replay_
  • Line 59: replay_index_
  • Line 60: playing_

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/build-native.ps1

  • Line 4: ErrorActionPreference
  • Line 6: Repo
  • Line 7: Destination
  • Line 18: Package
  • Line 25: Metadata
  • Line 27: Source
  • Line 29: Dirty
  • Line 40: Archive
  • Line 42: Stream
  • Line 43: Hasher

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 43: match
  • Line 47: match
  • Line 52: match
  • Line 56: type
  • Line 59: functionMatch
  • Line 61: qualifiedConstructor
  • Line 63: parts
  • Line 68: simpleConstructor
  • Line 72: splitDeclaration
  • Line 74: variable
  • Line 81: render
  • Line 82: lines
  • Line 89: path
  • Line 90: items
  • Line 92: repositoryPath
  • Line 94: item
  • Line 101: main
  • Line 102: content

scripts/smoke-native.py

  • Line 20: run
  • Line 71: main

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 54: min_x
  • Line 55: max_x
  • Line 56: min_y
  • Line 57: max_y
  • Line 58: span_x
  • Line 59: span_y
  • Line 77: left
  • Line 78: right
  • Line 90: brute_force_collisions
  • Line 99: left
  • Line 100: right

src/editor.cpp

  • Line 14: EditorSession::EditorSession
  • Line 18: EditorSession::apply_scene
  • Line 22: next_scene
  • Line 26: next_world
  • Line 37: EditorSession::reset
  • Line 38: next_world
  • Line 46: EditorSession::load_replay
  • Line 50: replay
  • Line 54: next_world
  • Line 64: EditorSession::play
  • Line 71: EditorSession::pause
  • Line 75: EditorSession::replay_remaining
  • Line 79: EditorSession::step
  • Line 103: EditorSession::advance
  • Line 108: EditorSession::scene_text
  • Line 111: EditorSession::replay_text
  • Line 115: EditorSession::image
  • Line 116: image

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 18: maximum_entities
  • Line 19: maximum_coordinate
  • Line 21: valid_name
  • Line 28: require_line_end
  • Line 35: validate_scene
  • Line 43: players
  • Line 67: serialize_scene
  • Line 85: parse_scene
  • Line 99: line
  • Line 107: entity_count
  • Line 112: line
  • Line 125: player
  • Line 126: layer
  • Line 127: 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 105: right
  • Line 109: top
  • Line 112: 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 107: low_x
  • Line 108: high_x
  • Line 109: low_y
  • Line 110: high_y
  • Line 116: entity
  • Line 134: World::destroy
  • Line 147: World::step
  • Line 152: player_body
  • Line 156: body_entities
  • Line 157: body_components
  • Line 159: body
  • Line 160: transform
  • Line 161: low_x
  • Line 162: high_x
  • Line 163: low_y
  • Line 164: high_y
  • Line 165: next_x
  • Line 166: next_y
  • Line 179: World::snapshot
  • Line 197: World::collision_items
  • Line 210: World::collision_pairs
  • Line 214: World::state_hash
  • Line 215: hash
  • Line 234: World::from_scene
  • Line 235: world
  • Line 242: run_replay

tests/test_editor.cpp

  • Line 18: scene_text
  • Line 22: require
  • Line 26: rejects
  • Line 35: test_authored_input_and_replay
  • Line 36: session
  • Line 47: snapshot
  • Line 48: player
  • Line 55: expected
  • Line 56: replay
  • Line 74: test_apply_is_transactional
  • Line 75: session
  • Line 77: hash
  • Line 78: canonical
  • Line 85: invalid
  • Line 94: updated
  • Line 105: test_replay_limits
  • Line 106: session
  • Line 107: old_hash
  • Line 134: test_entities_and_offset_rendering
  • Line 135: session
  • Line 136: scene
  • Line 137: prototype
  • Line 140: entity
  • Line 151: origin_image
  • Line 167: main

tests/test_editor_files.cpp

  • Line 14: require
  • Line 20: refused
  • Line 21: rejected
  • Line 31: main
  • Line 43: file
  • Line 48: linked
  • Line 57: oversized
  • Line 58: std::string
  • Line 65: unicode

tests/test_main.cpp

  • Line 39: require
  • Line 45: require_throws
  • Line 54: sample_scene
  • Line 61: test_math_and_fixed_step
  • Line 84: test_entity_pool_and_sparse_set_properties
  • Line 93: random
  • Line 94: entity_distribution
  • Line 95: value_distribution
  • Line 97: entity
  • Line 99: erased
  • Line 100: expected
  • Line 103: value
  • Line 108: iterator
  • Line 117: stale
  • Line 119: replacement
  • Line 125: test_c_arena_alignment_and_overflow
  • Line 127: arena
  • Line 129: first
  • Line 130: second
  • Line 134: offset
  • Line 144: test_spatial_hash_matches_brute_force
  • Line 145: spatial_hash
  • Line 146: random
  • Line 147: coordinate
  • Line 148: extent
  • Line 172: test_collision_category_masks
  • Line 175: grid
  • Line 204: test_collision_scene_migration_and_hash
  • Line 207: scene
  • Line 210: serialized
  • Line 214: original
  • Line 218: filtered
  • Line 221: before
  • Line 227: paired
  • Line 231: enabled
  • Line 235: disabled
  • Line 250: test_astar_returns_valid_shortest_path
  • Line 251: grid
  • Line 257: path
  • Line 262: delta_x
  • Line 263: delta_y
  • Line 275: test_scene_and_replay_round_trip
  • Line 276: scene
  • Line 292: test_world_replay_and_render_are_deterministic
  • Line 293: scene
  • Line 300: first
  • Line 301: second
  • Line 316: first_image
  • Line 317: second_image
  • Line 322: player
  • Line 327: player_entity
  • Line 333: test_profiler_summary_is_bounded
  • Line 334: profiler
  • Line 339: summary
  • Line 348: main
  • Line 361: failures