mirror of
https://github.com/QB64Official/qb64.git
synced 2024-07-03 03:01:22 +00:00
Update qbx.cpp
This commit is contained in:
parent
eba05938bb
commit
d0935e041e
|
@ -643,6 +643,10 @@ extern long double string2f(qbs*str);
|
|||
//Cobalt(aka Dave) added the next 2 lines
|
||||
int64 func__shr(int64 a1, int b1);
|
||||
int64 func__shl(int64 a1, int b1);
|
||||
int64 func__readbit(int64 a1, int b1);
|
||||
int64 func__setbit(int64 a1, int b1);
|
||||
int64 func__resetbit(int64 a1, int b1);
|
||||
int64 func__togglebit(int64 a1, int b1);
|
||||
#ifndef QB64_WINDOWS
|
||||
extern void Sleep(uint32 milliseconds);
|
||||
extern void ZeroMemory(void *ptr,int64 bytes);
|
||||
|
@ -977,6 +981,18 @@ inline int64 func__shl(int64 a1,int b1)
|
|||
inline int64 func__shr(int64 a1,int b1)
|
||||
{return a1>>b1;}
|
||||
|
||||
inline int64 func__readbit(int64 a1, int b1)
|
||||
{if (a1 & 1<<b1) return -1; else return 0;}
|
||||
|
||||
inline int64 func__setbit(int64 a1, int b1)
|
||||
{return a1 | 1<<b1;}
|
||||
|
||||
inline int64 func__resetbit(int64 a1, int b1)
|
||||
{return a1 & ~(1<<b1);}
|
||||
|
||||
inline int64 func__togglebit(int64 a1, int b1)
|
||||
{return a1 ^ 1<<b1;}
|
||||
|
||||
//Working with 32bit colors:
|
||||
inline uint32 func__rgb32(int32 r,int32 g,int32 b,int32 a){
|
||||
if (r<0) r=0;
|
||||
|
@ -2211,4 +2227,4 @@ void QBMAIN(void *unused)
|
|||
#include "../temp/main.txt"
|
||||
#endif
|
||||
|
||||
//} (closed by main.txt)
|
||||
//} (closed by main.txt)
|
||||
|
|
Loading…
Reference in a new issue