102 Dalmatians: Puppies to the Rescue
Decompilation Source Reference | GitLab repository
Loading...
Searching...
No Matches
integer.c
Go to the documentation of this file.
1/* Recovered game implementation; original addresses identify provenance. */
3#include <intrin.h>
4#include <math.h>
5#include <stdarg.h>
6#include <string.h>
7
8// Original pcdogs.exe: 0x447470
9// Returns the low 64 bits of a 64-bit product, retaining the original wrapping arithmetic.
10int64_t __stdcall __allmul(int64_t lhs, int64_t rhs)
11{
12 return (int64_t)((uint64_t)lhs * (uint64_t)rhs);
13}
14
15// Original pcdogs.exe: 0x44b1d0
16// Computes the unsigned 64-bit quotient for a nonzero divisor.
17uint64_t __stdcall __aulldiv(uint64_t dividend, uint64_t divisor)
18{
19 return dividend / divisor;
20}
21
22// Original pcdogs.exe: 0x44b240
23// Computes the unsigned 64-bit remainder for a nonzero divisor.
24uint64_t __stdcall __aullrem(uint64_t dividend, uint64_t divisor)
25{
26 return dividend % divisor;
27}
int64_t __allmul(int64_t lhs, int64_t rhs)
Definition integer.c:10
uint64_t __aullrem(uint64_t dividend, uint64_t divisor)
Definition integer.c:24
uint64_t __aulldiv(uint64_t dividend, uint64_t divisor)
Definition integer.c:17