From 85bb040f4b98e2e8e8802dc34d70ce8fd8cb04d8 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 15 Nov 2021 19:14:30 -0800 Subject: [PATCH] CHEWY: Refactor use of rand() function --- engines/chewy/main.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp index 8518c1121ab..70c2e1c0af8 100644 --- a/engines/chewy/main.cpp +++ b/engines/chewy/main.cpp @@ -20,8 +20,6 @@ * */ -#define FORBIDDEN_SYMBOL_EXCEPTION_rand - #include "chewy/main.h" #include "chewy/chewy.h" #include "chewy/events.h" @@ -1500,7 +1498,7 @@ int16 calc_maus_txt(int16 x, int16 y, int16 mode) { else set_person_spr(P_LEFT, P_CHEWY); } - r_val = rand() % MAX_RAND_NO_USE; + r_val = g_engine->_rnd.getRandomNumber(MAX_RAND_NO_USE - 1); action_flag = start_ats_wait(RAND_NO_USE[r_val], TXT_MARK_USE, 14, INV_USE_DEF); } }