mirror of
https://github.com/GTAmodding/re3.git
synced 2025-10-14 01:40:35 +00:00
finished CDamageManager
This commit is contained in:
parent
4d0e743232
commit
49d97f0033
4 changed files with 385 additions and 104 deletions
13
src/common.h
13
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 & m;
|
||||
}
|
||||
inline uint32 ldb(uint32 p, uint32 s, uint32 w)
|
||||
{
|
||||
return w>>p & (1<<s)-1;
|
||||
}
|
||||
|
||||
|
||||
// little hack
|
||||
extern void **rwengine;
|
||||
#define RwEngineInstance (*rwengine)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue