From 49d97f0033c4406a359cba88e988c7311241a76a Mon Sep 17 00:00:00 2001 From: aap Date: Fri, 5 Jul 2019 22:19:52 +0200 Subject: finished CDamageManager --- src/common.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/common.h') diff --git a/src/common.h b/src/common.h index 3d260f6e..79626acb 100644 --- a/src/common.h +++ b/src/common.h @@ -49,6 +49,19 @@ typedef uint16_t wchar; #define ALIGNPTR(p) (void*)((((uintptr)(void*)p) + sizeof(void*)-1) & ~(sizeof(void*)-1)) +// PDP-10 like byte functions +#define MASK(p, s) (((1<<(s))-1) << (p)) +inline uint32 dpb(uint32 b, uint32 p, uint32 s, uint32 w) +{ + uint32 m = MASK(p,s); + return w & ~m | b<

>p & (1<