Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* text=auto eol=lf
*.sln text eol=crlf
*.vcxproj text eol=crlf
*.vcxproj.filters text eol=crlf
35 changes: 19 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
/config.h

*.SnipesGame

# Visual C++
/*.vcxproj.user
/*.suo
/ipch
/Release
/Debug
/SDL Release
/SDL Debug

# GNUmakefile
/snipes
/snipes.exe
/config.h

*.SnipesGame

# Visual C++
/*.vcxproj.user
/*.suo
/ipch
/Release
/Debug
/SDL Release
/SDL Debug

# GNUmakefile
/snipes
/snipes.exe

# Font
SnipesConsole.ttf
40 changes: 40 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# AGENTS.md

This file provides additional technical guidance for AI agents and automated tools when working with the Snipes codebase.

## Quick Reference for Agents

### Code Style Guidelines
- Follow existing code conventions in each file
- Use tabs for indentation in C++ files
- Maintain 80-character line width where practical
- Preserve original game logic exactly when making fixes

### Platform-Specific Considerations

#### macOS
- SDL operations must run on the main thread
- Use `SDL_MAIN_HANDLED` macro
- Font fallback system searches system fonts if custom font unavailable

#### Windows
- Both SDL and console builds must remain functional
- Visual Studio solution supports multiple configurations
- Console build uses Windows-specific APIs in `windows/` directory

#### Linux/POSIX
- SDL build is primary target
- Ensure POSIX compliance for portability
- Test with various distributions when possible

### Testing Guidelines
- Preserve 100% game logic compatibility with original
- Test both windowed and fullscreen modes
- Verify replay file compatibility
- Check keyboard input with different layouts

### Common Pitfalls to Avoid
- Don't modify core game logic in Snipes.cpp unless fixing documented bugs
- Maintain platform abstraction layer boundaries
- Keep SDL-specific code in `sdl/` directory
- Don't break Windows console build when adding SDL features
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ For more information, see the [vogons.org forum thread](https://www.vogons.org/v

SDL builds require the SDL2 and SDL2_ttf libraries.

On startup, the SDL build will attempt to load a custom font, which can be obtained separately from [here](http://kingbird.myphotos.cc/ee22d44076adb8a34d8e20df4be3730a/SnipesConsole.ttf).
On startup, the SDL build will attempt to load a custom font, which can be obtained separately from [here](http://kingbird.myphotos.cc/ee22d44076adb8a34d8e20df4be3730a/SnipesConsole.ttf). The custom font is required for authentic visuals. If unavailable, the game will fall back to system fonts with a warning that visuals will differ from the original.

#### With Visual Studio

Expand All @@ -23,6 +23,8 @@ On startup, the SDL build will attempt to load a custom font, which can be obtai
1. (Optional) Copy `config-sample.h` to `config.h`, and edit as desired
2. Run `make` to compile an SDL build.

The SDL build works on Linux, Windows, and macOS.

For Arch Linux, you can use the [snipes-git](https://aur.archlinux.org/packages/snipes-git/) AUR package.

### Replay recording
Expand Down
Loading