1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-06-30 05:10:37 +00:00

Applies common naming convention and makes _SHL/_SHR functions inline.

This commit is contained in:
FellippeHeitor 2018-10-30 00:32:12 -03:00
parent 48ddedb080
commit 369d522a98
3 changed files with 11 additions and 10 deletions

View file

@ -29741,9 +29741,3 @@ void reinit_glut_callbacks(){
#endif
}
int64 _SHL(int64 a1,int b1)
{return a1<<b1;}
int64 _SHR(int64 a1,int b1)
{return a1>>b1;}

View file

@ -618,8 +618,8 @@ extern float string2s(qbs*str);
extern double string2d(qbs*str);
extern long double string2f(qbs*str);
//Cobalt(aka Dave) added the next 2 lines
extern int64 _SHR(int64 a1, int b1);
extern int64 _SHL(int64 a1, int b1);
int64 func__shr(int64 a1, int b1);
int64 func__shl(int64 a1, int b1);
#ifndef QB64_WINDOWS
extern void Sleep(uint32 milliseconds);
extern void ZeroMemory(void *ptr,int64 bytes);
@ -947,6 +947,13 @@ inline int32 func_sgn(long double v){
return 0;
}
//bit-shifting
inline int64 func__shl(int64 a1,int b1)
{return a1<<b1;}
inline int64 func__shr(int64 a1,int b1)
{return a1>>b1;}
//Working with 32bit colors:
inline uint32 func__rgb32(int32 r,int32 g,int32 b,int32 a){
if (r<0) r=0;

View file

@ -3347,7 +3347,7 @@ regid
clearid
id.n = "_SHR"
id.subfunc = 1
id.callname = "_SHR"
id.callname = "func__shr"
id.args = 2
id.arg = MKL$(INTEGER64TYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER)
id.ret = INTEGER64TYPE - ISPOINTER
@ -3356,7 +3356,7 @@ regid
clearid
id.n = "_SHL"
id.subfunc = 1
id.callname = "_SHL"
id.callname = "func__shl"
id.args = 2
id.arg = MKL$(INTEGER64TYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER)
id.ret = INTEGER64TYPE - ISPOINTER