Skip to content

Latest commit

 

History

History
44 lines (40 loc) · 3.77 KB

README.md

File metadata and controls

44 lines (40 loc) · 3.77 KB

Source map

Read platform.c → runtime.cpp → core.c to follow input, mode dispatch, and a gameplay frame. The architecture guide explains how those calls fit together.

Start here Responsibility
windows_entry.c, windows_adapter.c Windows entry and bindings to OS, graphics, and audio services
platform.c, platform_host.c Instance lock, window creation, message loop, input, display setup, DirectDraw factory and process-exit transports
startup.c Working resources, score files, RNG, and sprite-bank cleanup
runtime.cpp Five-mode dispatch, game lifecycle, clock, paddle drawing, and score
core.c Gameplay frame, ball/projectile movement, firing, and entity queues
intro.cpp Menu and splash lifecycles, point animation, scroller, and credits
editor.c Board editor, toolbar hit regions, painting, and persistence
gameover.c Name entry, rankings, and high-score persistence
boards.c, board_storage.h Board bank, working tiles, shared storage, and tile drawing
gameplay.c Brick-hit rules, board power-ups, explosion requests, and sound pan
balls.c, paddle.c, round.c Ball lifecycle/rebounds, paddle movement, and lives/level progression
effects.c Brick and explosion animation lifecycle
bonuses.c, particles.c Bonus selection/collection and particle movement/drawing
resources.cpp, resources.h Sprite banks, PCX loading, glyphs, palettes, and DirectDraw interfaces
display.cpp, device.c Dirty regions, presentation, fades, synchronization, and surface recovery
ui.c Text layout, lines, fill requests, and palette operations
rotation.c, raster.cpp, bitmap.c Software rotation, fixed-point rasterization, and bitmap reading
geometry.c, trig.c Overlap/distance helpers and quantized trigonometry
sound.c, midi.c, music.cpp DirectSound buffers, WinMM streams, and music object lifetime
file.c, memory.c Shared file and local-memory services for sound, MDS, and bitmap loading
allocator.c, allocator_host.c Recovered allocation policy and portable heap callbacks
list_initializers.cpp Global list owners and their C++ constructors
runtime_text_host.c Unix implementation of the score caller's decimal conversion boundary
board_inspector.c, resource_inspector.c Command-line board and image/sprite-bank inspection
termination.c Separate CRT initializer/exit reconstruction; outside the CMake game library

Each module's .h file describes its public state and call contracts. state_types.h defines the shared scalar widths and board sizes; the entity headers define payloads and links. Surface and OS handles grow with the host, while game integers stay 32-bit. C++ is used for the fixed-point class and global list construction; the game-facing interfaces retain C linkage.

To trace a feature, follow its frame call into the owning module, then inspect that module's header and dependencies. Independent import cells and *Ops/*Api tables provide service bindings for the Windows adapter and host tools. Definitions such as /* FUNCTION: DXBALL 0x... */ connect reconstructed routines to original addresses.