mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-07-19 04:24:54 -04:00
Open object format
- To make prototyping and possibly future custom content easier, I've created a JSON-based object format with the same properties found in The Sims - Renamed dorms directory to dorm - Added some d20 C code I found to possibly enhance the skill system in the future - Added voting machine by Don Hopkins - Removed core.h in favor of niotso.zig which accomplishes the same thing
This commit is contained in:
parent
00255a6c17
commit
a1cdd92c3f
31 changed files with 259 additions and 33 deletions
22
library/extra/d20/d20.h
Normal file
22
library/extra/d20/d20.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
/** @file d20.h
|
||||
* @brief Implements Dungeons & Dragons style dice in C
|
||||
*
|
||||
* d20.h is a reimplementation of https://github.com/opensourcedoc/d20-c,
|
||||
* but following the principles of being a single header/file library with
|
||||
* a minimal API
|
||||
*
|
||||
* @author adamml
|
||||
* @date 2022-11-07
|
||||
*/
|
||||
|
||||
#ifndef COM_GITHUB_ADAMML_D20
|
||||
#define COM_GITHUB_ADAMML_D20
|
||||
|
||||
|
||||
#define ROLL_FROM_CHAR_ARRAY_PARSE_FAILURE_NO_NUMBER_DICE -9999; /* The number of dices to roll was not correctly parsed */
|
||||
#define ROLL_FROM_CHAR_ARRAY_PARSE_FAILURE_NO_NUMBER_OF_SIDES -99999; /* The number of sides on the dice was not correctl parsed */
|
||||
|
||||
int roll_from_char_array(const char *ca);
|
||||
int roll(int dice, int sides, int modifer);
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue