Project root
Root files
Main build configuration using GNU Make.Key settings:
- Compiler:
gcc - Optimization:
-O3 -ffast-math -funroll-loops - SDL include path:
/usr/include/SDL - Links: SDL, SDL_image, libmikmod, GLFW
all- Build the pacman executable (default)clean- Remove object files and executable
Project documentation in Spanish, including:
- Feature overview
- Installation instructions
- Usage examples
- Resolution restoration explanation
- Git ignore policy
Git exclusion rules:
Compiled utility executable for sound/audio operations.Type: ELF 64-bit LSB executablePlatform: Linux x86-64
Source directory
Core source files
main.c (197 lines)
main.c (197 lines)
Purpose: Program entry point and initializationKey functions:
main()- Command-line parsing and game launchguardarResolucionOriginal()- Save display configurationrestaurarResolucionOriginal()- Restore display on exitxrandr_disponible()- Check for xrandr utilitysetup()- Initialize display detectionhelp()- Display usage information
src/main.cSee: Command-line referencegfx.c
gfx.c
Purpose: Graphics initialization and renderingHandles SDL surface management, screen updates, and video mode setup.
mov_fig.c
mov_fig.c
Purpose: Player character movementImplements Pacman movement logic, collision detection, and animation.
movefant.c
movefant.c
Purpose: Ghost AI and movementContains artificial intelligence for ghost behavior and pathfinding.
misc.c (largest file)
misc.c (largest file)
Purpose: Miscellaneous game utilitiesGeneral-purpose functions used throughout the game.
sprites.c
sprites.c
Purpose: Sprite loading and managementLoads sprite graphics from BMP files and manages sprite rendering.
menuopt.c
menuopt.c
Supporting files
Optimized x86 assembly implementation of memory copy operations for performance-critical rendering.Size: 228 bytes
Backup copies of modified source files for reference.
Header files
Key headers
Central configuration file with:
- Screen resolution constants (
RES_XB,RES_YB) - Game speed and timing
- Tile dimensions
- Color definitions
- Platform-specific macros
src/include/defines.hSprite system definitions:
- Sprite structure definitions
- Animation frame data
- Sprite coordinate constants
Core game structures:
- Player state
- Game board representation
- Score and lives
- Level data
Menu system structures:
- Menu options
- UI elements
- Option flags
Ghost (enemy) definitions:
- Ghost types and colors
- AI behavior modes
- Ghost state structures
Utility function prototypes:
- Timer functions
- Helper utilities
- Math operations
Data directory
Graphics assets
Main sprite sheet containing:
- Pacman animations (all directions)
- Ghost sprites (4 colors)
- Fruit and bonus items
- UI elements
Bitmap font for text rendering.Format: BMPSize: 192,054 bytes (largest asset)
Game board background texture.Format: BMPSize: 307,254 bytes (second largest)
Title screen / intro screen.Format: BMPSize: 192,054 bytes
Audio assets
Thedata/ directory contains numerous WAV files for game audio:
Background music
Background music
pacman.wav(746KB) - Main theme musicpacman3.wav(52KB) - Alternative music trackpacman4.wav(40KB) - Additional music
Sound effects
Sound effects
come.wav- Eating pellets soundstartups.wav(50KB) - Game start soundoffline.wav(91KB) - Game over soundcfaccess.wav- Menu/access sound
Siren sounds
Siren sounds
Ghost chase music with increasing tempo:
siren1.wav(70KB)siren2.wav(65KB)siren3.wav(55KB)siren4.wav(50KB)siren5.wav(45KB)
Other audio
Other audio
1b.wav(154KB) - Additional sound effectfondo.wav- Background ambient soundpacman2.wav- Short jingle
All audio files are in WAV format and played using libmikmod. Total audio data: approximately 1.5 MB.
Old assets directory
Archive of previous versions of graphics and audio files, including:
- Older sprite versions
- Previous font files
- Original audio recordings
PassThroughMovie.zip- Video content archive
Build artifacts
These files are generated during compilation and excluded from version control:Object files
During compilation, each.c file produces a corresponding .o object file:
src/main.osrc/gfx.osrc/menuopt.osrc/mov_fig.osrc/sprites.osrc/movefant.osrc/misc.o
pacman executable.
Executable
Final game executable after successful compilation.Type: ELF 64-bit LSB executablePlatform: Linux x86-64Usage:
./pacman -f or ./pacman -wSee: Command-line referenceTemporary files
Runtime generated files
Generated at: Game startup (fullscreen mode)Purpose: Restore display configuration on exitContains:
xrandrcommands for each connected display- Resolution and refresh rate settings
- Monitor position and layout
- Primary display designation
chmod +x)Location: /tmp/ directoryLifecycle: Created at startup, executed at exit, persists until system rebootDevelopment files
Editor and temporary files ignored by git:*~- Backup files from Emacs, Vim, and other editors.*.swp- Vim swap files*.o- Compiled object files
Project statistics
Approximate line counts and file sizes:
| Category | Files | Total Size | Notes |
|---|---|---|---|
| Source (.c) | 20+ | ~120 KB | Including main.c, gfx.c, etc. |
| Headers (.h) | 13 | ~15 KB | All in src/include/ |
| Graphics | 10+ | ~1.3 MB | BMP and GIF files |
| Audio | 15+ | ~1.5 MB | WAV format |
| Documentation | 1 | ~3 KB | README.md |
Navigation patterns
Finding specific functionality
See also
- Command-line reference - Usage and options
- Dependencies reference - Required libraries