summaryrefslogtreecommitdiff
path: root/src/game/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/game.cpp')
-rw-r--r--src/game/game.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/game/game.cpp b/src/game/game.cpp
index 51dca09..9584817 100644
--- a/src/game/game.cpp
+++ b/src/game/game.cpp
@@ -178,32 +178,32 @@ void state_t::wake_everything(v2f_t x, float range)
}
}
-roll_params_t::roll_params_t(size_t sides_)
+die_t::die_t(size_t sides_)
{
sides = sides_;
}
-roll_params_t::roll_params_t(size_t count_, size_t sides_)
+die_t::die_t(size_t count_, size_t sides_)
{
count = count_;
sides = sides_;
}
-roll_params_t::roll_params_t(size_t count_, size_t sides_, size_t bonus_)
+die_t::die_t(size_t count_, size_t sides_, size_t bonus_)
{
count = count_;
sides = sides_;
bonus = bonus_;
}
-size_t state_t::roll(roll_params_t *P)
+size_t state_t::roll(die_t die)
{
size_t total = 0;
- for (size_t i = 0; i < P->count; i++)
- total += dice_prng.next() % P->sides + 1;
+ for (size_t i = 0; i < die.count; i++)
+ total += dice_prng.next() % die.sides + 1;
- return total + P->bonus;
+ return total + die.bonus;
}
bool load_assets(void)