Files
2025-03-07 15:11:34 +03:00

21 lines
1.0 KiB
Markdown

# HearthMod Build Commands and Code Guidelines
## Build Commands
- `docker-compose up --build` - Build and start the project container
- `bash docker_ctl.sh compile` - Compile and install server stack
- `bash docker_ctl.sh start` - Start server stack
- `bash docker_ctl.sh stop` - Stop server stack
- Component-specific: `cd hm_gameserver && make`
- Base library: `make -C ../hm_base target=game`
## Code Style Guidelines
- **Indentation**: 4 spaces for C/C++/Python
- **Naming**:
- C: snake_case for functions/variables, UPPER_SNAKE_CASE for constants
- C++: camelCase for methods/variables, UPPER_SNAKE_CASE for constants
- Structs use _s suffix, enums use _e suffix
- **Headers**: System includes first, then project includes
- **Error handling**: Functions return int (0=success, negative=failure)
- **Logging**: Use `hm_log(LOG_LEVEL, log_instance, "message")`
- **Memory**: Always free allocated resources, use pooled allocation when possible
- **Initialization**: Follow component-specific init/cleanup patterns