aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/kmath.cpp
AgeCommit message (Collapse)Author
2010-08-20SCI: added another comment to kRandomMartin Kiewitz
about hoyle4 svn-id: r52246
2010-08-20SCI: kRandom now exactly behaving like sierra sciMartin Kiewitz
hoyle4 and lsl5 door code work now svn-id: r52244
2010-08-20SCI: Fixed typos in kRandom()Filippos Karapetis
svn-id: r52242
2010-08-20SCI: Reverted kRandom to use unsigned integers again (used e.g. in LSL5) and ↵Filippos Karapetis
added a temporary hack for the special case in Hoyle 4 (0x0, 0xFFFF), till we find out how this is handled correctly svn-id: r52240
2010-08-20SCI: Fixed bug #3039308 - "HOYLE4: Rules Dialog missing background"Filippos Karapetis
svn-id: r52237
2010-08-15SCI: Change abs() to ABS()Torbjörn Andersson
I'm not sure why we define our own ABS(), but I assume we have some compelling reason for it. svn-id: r52105
2010-07-30SCI: Switch to Common::RandomSource.Johannes Schickel
Since I got no response to my mail to -devel, I just assume that there is no specific reason for using rand() in SCI. As explained in my mail to -devel about why SCI uses rand, this might allow SCI to work with our event recording, when that ever gets finished. I adapted kRandom so that it also supports negative random numbers. And furthermore that the toNumber argument is smaller than the fromNumber argument. I am not sure whether that really happens though, but it should be safer to have this. I marked that place with an TODO/CHECKME. svn-id: r51521
2010-07-28SCI: changed kRandom signatureMartin Kiewitz
accepts 1-3 parameters now for all SCI versions (shouldnt hurt and argc 3 will error() out anyway) changed comments a bit svn-id: r51438
2010-07-28SCI: implement additional variants of kRandomMartin Kiewitz
fixes pq1vga poker game (bug #3036125) svn-id: r51435
2010-07-10SCI: removing hoyle workaround from kAbs & signature and adding it into ↵Martin Kiewitz
workaround table svn-id: r50790
2010-06-28SCI: Turn more warnings into errors.Max Horn
If one of these is triggered for you, you can add an exception to the error, together with a comment explaining why this exception is necessary. Ideally after verifying that the cause is a script bug and not a bug in our code... svn-id: r50442
2010-06-26SCI: making hack inside kAbs hoyle1 specific, added fixmeMartin Kiewitz
svn-id: r50309
2010-06-17Moved kMulDiv together with the rest of the math functions, and kPlayVMD ↵Filippos Karapetis
together with the rest of the video playing functions svn-id: r49920
2009-11-14Moved getAngle() inside kmovement.cpp, the only place where it's actually usedFilippos Karapetis
svn-id: r45903
2009-11-02SCI: Fix hoyle hackWalter van Niftrik
svn-id: r45619
2009-10-20SCI: Fix warning about double being silently converted to intMax Horn
svn-id: r45262
2009-10-19SCI: kRandom behaviour fixed, fixes lsl5 patty random door codeMartin Kiewitz
svn-id: r45250
2009-09-30Added a new special reg_t, SIGNAL_REG, for signaling when an error occurs ↵Filippos Karapetis
(usually), or to signal success in some special occasions svn-id: r44505
2009-09-29- Changed the unimplemented debug SCI kernel functions (InspectObj, ↵Filippos Karapetis
ShowSends, ShowObjs, ShowFree, StackUsage and Profiler) to be dummy functions - we have our own debugger, and don't use these functions for debugging - Removed the function number parameter from all kernel functions, as it's no longer needed, and removed the FAKE_FUNCT_NR hack - Removed kUnknown() and kStub() - Dummy/unknown kernel functions are no longer invoked, and a warning is shown instead, with the paremeters passed to them Note: there is an evil hack used for debugging scripts in invoke_selector(), which probably no longer works now svn-id: r44461
2009-09-25Create a define for the special "signal" offset used throughout the engine, ↵Filippos Karapetis
and fixed the arbitrary 0 values from commit #44294, set when some math functions do invalid calculations svn-id: r44359
2009-09-25SCI: Pedantic cleanupMax Horn
svn-id: r44356
2009-09-24SCI: Fix spellingMax Horn
svn-id: r44318
2009-09-24Fix what looks like a typo in the condition, which checks for a divide by zero.Johannes Schickel
svn-id: r44306
2009-09-24The maximum value that a signed 16-bit integer can hold is 32767, not 32768 ↵Filippos Karapetis
(0x8000) svn-id: r44294
2009-09-02SCI: funct_nr is not used in 99% of all opcodes -- hide it in those (to be ↵Max Horn
removed eventually) svn-id: r43905
2009-06-07Replaced KP_ALT, SKPV_OR_ALT and UKPV_OR_ALTFilippos Karapetis
svn-id: r41340
2009-06-07Replaced/removed KP_UINT, KP_SINT, SKPV and UKPV as well as the ↵Filippos Karapetis
VIEW_PRIORITY and PRIORITY_BAND_FIRST wrappers svn-id: r41338
2009-02-27SCI: Renamed include/engine.h to engine/state.h; added a corresponding .cpp ↵Max Horn
file with the EngineState constructor svn-id: r38921
2009-02-24SCI: Moved kernel.h and kdebug.h from include/ to engine/; untangled header ↵Max Horn
deps some more svn-id: r38833
2009-02-21SCI: Got rid of include/scitypes.hMax Horn
svn-id: r38746
2009-02-21Replaced "typedef struct _state state_t" with "struct EngineState"Jordi Vilalta Prat
svn-id: r38678
2009-02-21Wrapped the SCI engine in the Sci namespace.Oystein Eftevaag
svn-id: r38676
2009-02-20Started conversion of debug messages and debug levels to the ScummVM ↵Filippos Karapetis
equivalents. Removed the "stubs" and "warnings" debug levels and replaced such kinds of messages with normal warnings svn-id: r38617
2009-02-20formatingPaweł Kołodziejski
svn-id: r38600
2009-02-17Update headers. engine/Eugene Sandulenko
svn-id: r38408
2009-02-15SCI: Run astyle to make the code be more compliant with our Code Formatting ↵Max Horn
Guidelines: engine dir svn-id: r38317
2009-02-15fixed compilation and linking with msvc9Paweł Kołodziejski
svn-id: r38232
2009-02-15Silenced more warningsFilippos Karapetis
svn-id: r38230
2009-02-15- Remove some unneeded filesEugene Sandulenko
- Mass rename .c to .cpp svn-id: r38227