From bdc3250b89936aeeb77a47f1b5c5ff01dd0dbde1 Mon Sep 17 00:00:00 2001 From: Luke Ceddia Date: Mon, 25 Sep 2017 21:56:24 +1000 Subject: [PATCH 1/3] Resolved the issue of user mods not working for $console:only programs --- internal/c/libqb.cpp | 221 +++++++++++ .../c/parts/user_mods/include/luke_mods.h | 5 - .../c/parts/user_mods/include/steve_mods.h | 40 -- .../c/parts/user_mods/include/user_mods.h | 13 - internal/c/parts/user_mods/os/lnx/build.sh | 14 - .../c/parts/user_mods/os/lnx/setup_build.sh | 4 - .../c/parts/user_mods/os/lnx/temp/temp.bin | 0 .../c/parts/user_mods/os/osx/build.command | 15 - .../user_mods/os/osx/setup_build.command | 5 - .../c/parts/user_mods/os/osx/temp/temp.bin | 0 internal/c/parts/user_mods/os/win/build.bat | 4 - .../c/parts/user_mods/os/win/setup_build.bat | 3 - .../c/parts/user_mods/os/win/temp/temp.bin | 0 internal/c/parts/user_mods/src.cpp | 5 - .../src/Steve Stuff/convert_angle.cpp | 28 -- .../user_mods/src/Steve Stuff/extramath.cpp | 51 --- .../user_mods/src/Steve Stuff/screeninfo.cpp | 68 ---- .../user_mods/src/Steve Stuff/stringcomp.cpp | 45 --- internal/c/parts/user_mods/src/luke_mods.cpp | 25 -- internal/c/parts/user_mods/src/steve_mods.cpp | 8 - internal/c/purge_all_precompiled_content.bat | 7 +- .../c/purge_all_precompiled_content.command | 7 +- internal/c/purge_all_precompiled_content.sh | 7 +- .../c/purge_all_precompiled_content_lnx.sh | 8 +- .../purge_all_precompiled_content_osx.command | 8 +- .../c/purge_all_precompiled_content_win.bat | 7 +- internal/c/qbx.cpp | 27 +- setup_lnx.sh | 8 +- setup_osx.command | 11 - setup_win.bat | 8 +- source/qb64.bas | 25 +- .../extensions/Luke Stuff-ID_Includes.bas | 9 - .../extensions/Steve Stuff-ID_Includes.bas | 340 ----------------- .../extensions/extension_list.bas | 2 - source/subs_functions/subs_functions.bas | 348 ++++++++++++++++++ 35 files changed, 608 insertions(+), 768 deletions(-) delete mode 100644 internal/c/parts/user_mods/include/luke_mods.h delete mode 100644 internal/c/parts/user_mods/include/steve_mods.h delete mode 100644 internal/c/parts/user_mods/include/user_mods.h delete mode 100755 internal/c/parts/user_mods/os/lnx/build.sh delete mode 100755 internal/c/parts/user_mods/os/lnx/setup_build.sh delete mode 100644 internal/c/parts/user_mods/os/lnx/temp/temp.bin delete mode 100644 internal/c/parts/user_mods/os/osx/build.command delete mode 100644 internal/c/parts/user_mods/os/osx/setup_build.command delete mode 100644 internal/c/parts/user_mods/os/osx/temp/temp.bin delete mode 100644 internal/c/parts/user_mods/os/win/build.bat delete mode 100644 internal/c/parts/user_mods/os/win/setup_build.bat delete mode 100644 internal/c/parts/user_mods/os/win/temp/temp.bin delete mode 100644 internal/c/parts/user_mods/src.cpp delete mode 100644 internal/c/parts/user_mods/src/Steve Stuff/convert_angle.cpp delete mode 100644 internal/c/parts/user_mods/src/Steve Stuff/extramath.cpp delete mode 100644 internal/c/parts/user_mods/src/Steve Stuff/screeninfo.cpp delete mode 100644 internal/c/parts/user_mods/src/Steve Stuff/stringcomp.cpp delete mode 100644 internal/c/parts/user_mods/src/luke_mods.cpp delete mode 100644 internal/c/parts/user_mods/src/steve_mods.cpp delete mode 100644 source/subs_functions/extensions/Luke Stuff-ID_Includes.bas delete mode 100644 source/subs_functions/extensions/Steve Stuff-ID_Includes.bas delete mode 100644 source/subs_functions/extensions/extension_list.bas diff --git a/internal/c/libqb.cpp b/internal/c/libqb.cpp index e147a75b2..1c4419418 100644 --- a/internal/c/libqb.cpp +++ b/internal/c/libqb.cpp @@ -8460,6 +8460,49 @@ qbs *qbs_rtrim(qbs *str){ return tqbs; } +int32 func__str_nc_compare(qbs *s1, qbs *s2) { + int32 limit, l1, l2; + int32 v1, v2; + unsigned char *c1=s1->chr, *c2=s2->chr; + + l1 = s1->len; l2 = s2->len; //no need to get the length of these strings multiple times. + if (!l1) { + if (l2) return -1; else return 0; //if one is a null string we known the answer already. + } + if (!l2) return 1; + if (l1<=l2) limit = l1; else limit = l2; //our limit is going to be the length of the smallest string. + + for (int32 i=0;i64)&&(v1<91)) v1=v1|32; + if ((v2>64)&&(v2<91)) v2=v2|32; + if (v1v2) return 1; + c1++; + c2++; + } + + if (l1l1) return 1; + return 0; +} + +int32 func__str_compare(qbs *s1, qbs *s2) { + int32 i, limit, l1, l2; + l1 = s1->len; l2 = s2->len; //no need to get the length of these strings multiple times. + if (!l1) { + if (l2) return -1; else return 0; //if one is a null string we known the answer already. + } + if (!l2) return 1; + if (l1<=l2) limit = l1; else limit = l2; + i=memcmp(s1->chr,s2->chr,limit); + if (i<0) return -1; + if (i>0) return 1; + if (l1l2) return 1; + return 0; +} + qbs *qbs_inkey(){ if (new_error) return qbs_new(0,1); qbs *tqbs; @@ -8485,6 +8528,26 @@ qbs *qbs_inkey(){ return tqbs; } +void sub__keyclear(int32 buf, int32 passed) { + if (new_error) return; + if (passed && (buf > 3 || buf < 1)) error(5); + // Sleep(10); + if ((buf == 1 && passed) || !passed) { + //INKEY$ buffer + cmem[0x41a]=30; cmem[0x41b]=0; //head + cmem[0x41c]=30; cmem[0x41d]=0; //tail + } + if ((buf == 2 && passed) || !passed) { + //_KEYHIT buffer + keyhit_nextfree = 0; + keyhit_next = 0; + } + if ((buf == 3 && passed) || !passed) { + //INP(&H60) buffer + port60h_events = 0; + } +} + //STR() functions //singed integers qbs *qbs_str(int64 value){ @@ -12285,6 +12348,10 @@ void sub__controlchr(int32 onoff){ if (onoff==2) no_control_characters2=1; else no_control_characters2=0; } +int32 func__controlchr () { + return -no_control_characters2; +} + void qbs_print(qbs* str,int32 finish_on_new_line){ if (new_error) return; int32 i,i2,entered_new_line,x,x2,y,y2,z,z2,w; @@ -22519,6 +22586,85 @@ int32 func__loadfont(qbs *f,int32 size,qbs *requirements,int32 passed){ }//sub__icon #endif //DEPENDENCY_ICON + int32 func_screenwidth () { + #ifdef QB64_GLUT + while (!window_exists){Sleep(100);} + #ifdef QB64_WINDOWS + while (!window_handle){Sleep(100);} + #endif + return glutGet(GLUT_SCREEN_WIDTH); + #else + return 0; + #endif + } + + int32 func_screenheight () { + #ifdef QB64_GLUT + while (!window_exists){Sleep(100);} + #ifdef QB64_WINDOWS + while (!window_handle){Sleep(100);} + #endif + return glutGet(GLUT_SCREEN_HEIGHT); + #else + return 0; + #endif + } + + void sub_screenicon () { + #ifdef QB64_GLUT + while (!window_exists){Sleep(100);} + #ifdef QB64_WINDOWS + while (!window_handle){Sleep(100);} + #endif + glutIconifyWindow(); + return; + #endif + } + + int32 func_windowexists () { + #ifdef QB64_GLUT + #ifdef QB64_WINDOWS + if (!window_handle){return 0;} + #endif + return -window_exists; + #else + return -1; + #endif + } + + int32 func_screenicon () { + #ifdef QB64_GLUT + while (!window_exists){Sleep(100);} + #ifdef QB64_WINDOWS + while (!window_handle){Sleep(100);} + #endif + extern int32 screen_hide; + if (screen_hide) {error(5); return 0;} + #ifdef QB64_WINDOWS + return -IsIconic(window_handle); + #else + /* + Linux code not compiling for now + #include + #include + extern Display *X11_display; + extern Window X11_window; + extern int32 screen_hide; + XWindowAttributes attribs; + while (!(X11_display && X11_window)); + XGetWindowAttributes(X11_display, X11_window, &attribs); + if (attribs.map_state == IsUnmapped) return -1; + return 0; + #endif */ + return 0; //if we get here and haven't exited already, we failed somewhere along the way. + #endif + #endif + } + + int32 func__autodisplay () { + if (autodisplay) {return -1;} + return 0; + } void sub__autodisplay(){ autodisplay=1; } @@ -29376,7 +29522,82 @@ void sub__maptriangle(int32 cull_options,float sx1,float sy1,float sx2,float sy2 return b; } + /* Extra maths functions - we do what we must because we can */ + double func_deg2rad (double value) { + return (value * 0.01745329251994329576923690768489); + } + double func_rad2deg (double value) { + return (value * 57.29577951308232); + } + + double func_deg2grad (double value) { + return (value * 1.111111111111111); + } + + double func_grad2deg (double value) { + return (value * 0.9); + } + + double func_rad2grad (double value) { + return (value * 63.66197723675816); + } + + double func_grad2rad (double value) { + return (value * .01570796326794896); + } + + double func_pi (double multiplier,int32 passed) { + if (passed) {return 3.14159265358979323846264338327950288419716939937510582 * multiplier;} + return (3.14159265358979323846264338327950288419716939937510582); + } + + double func_arcsec (double num) { + int sign = (num > 0) - (num < 0); + if (num<-1||num>1) {error(5);return 0;} + return atan(num / sqrt(1 - num * num)) + (sign - 1) * (2 * atan(1)); + } + + double func_arccsc (double num) { + int sign = (num > 0) - (num < 0); + if (num<-1||num>1) {error(5);return 0;} + return atan(num / sqrt(1 - num * num)) + (sign - 1) * (2 * atan(1)); + } + + double func_arccot (double num) {return 2 * atan(1) - atan(num);} + + double func_sech (double num) { + if (num>88.02969) {error(5);return 0;} + if (exp(num) + exp(-num)==0) {error(5);return 0;} + return 2/ (exp(num) + exp(-num)); + } + + double func_csch (double num) { + if (num>88.02969) {error(5);return 0;} + if (exp(num) - exp(-num)==0) {error(5);return 0;} + return 2/ (exp(num) - exp(-num)); + } + + double func_coth (double num) { + if (num>44.014845) {error(5);return 0;} + if (2 * exp(num) - 1==0) {error(5);return 0;} + return 2 * exp(num) - 1; + } + + double func_sec (double num) { + if (cos(num)==0) {error(5);return 0;} + return 1/cos(num); + } + + double func_csc (double num) { + if (sin(num)==0) {error(5);return 0;} + return 1/sin(num); + } + + double func_cot (double num) { + if (tan(num)==0) {error(5);return 0;} + return 1/tan(num); + } void GLUT_key_ascii(int32 key,int32 down){ diff --git a/internal/c/parts/user_mods/include/luke_mods.h b/internal/c/parts/user_mods/include/luke_mods.h deleted file mode 100644 index 8d1dd09c5..000000000 --- a/internal/c/parts/user_mods/include/luke_mods.h +++ /dev/null @@ -1,5 +0,0 @@ -/* Routines by Luke - * The actual code is in luke_mods.cpp - * Write me at if I broke something - */ -void sub__keyclear(int32 buf, int32 passed); diff --git a/internal/c/parts/user_mods/include/steve_mods.h b/internal/c/parts/user_mods/include/steve_mods.h deleted file mode 100644 index 3878c494e..000000000 --- a/internal/c/parts/user_mods/include/steve_mods.h +++ /dev/null @@ -1,40 +0,0 @@ - -//*************************************************************** -//** -//** Declarations for routines proved by Steve McNeill -//** Email: smcneill@swva.net -//** -//**************************************************************** - -//Angle Conversion Formulas -double func_deg2rad(double degree); -double func_deg2grad(double degree); -double func_rad2deg(double degree); -double func_rad2grad(double degree); -double func_grad2deg(double degree); -double func_grad2rad(double degree); - -double func_pi(double multiplier,int32 passed); -int32 func_screenwidth(); -int32 func_screenheight(); -void sub_screenicon(); -int32 func_windowexists (); -int32 func__controlchr(); -int32 func__str_nc_compare(qbs *s1, qbs *s2); -int32 func__str_compare(qbs *s1, qbs *s2); -double func_arcsec (double num); -double func_arccsc (double num); -double func_arccot (double num); -double func_sech (double num); -double func_csch (double num); -double func_coth (double num); -double func_sec (double num); -double func_csc (double num); -double func_cot (double num); -int32 func_screenicon (); - -#ifdef QB64_WINDOWS - extern HWND window_handle; -#endif - -int32 func__autodisplay (); \ No newline at end of file diff --git a/internal/c/parts/user_mods/include/user_mods.h b/internal/c/parts/user_mods/include/user_mods.h deleted file mode 100644 index e83a91444..000000000 --- a/internal/c/parts/user_mods/include/user_mods.h +++ /dev/null @@ -1,13 +0,0 @@ -//************************************************************ -//** -//** A listing of all the Users who have added routines for us -//** This makes for easy tracking of original authors in case of problems with their code -//** or if alterations need to be made in the future -//** -//** I just put these in alphabitical order. It has nothing to do with user rankings or anything silly like that. -//** Alpha lists are easy to look through and expand nicely for future reference. ;) -//** -//************************************************************* - -#include "luke_mods.h" -#include "steve_mods.h" diff --git a/internal/c/parts/user_mods/os/lnx/build.sh b/internal/c/parts/user_mods/os/lnx/build.sh deleted file mode 100755 index 8b576a163..000000000 --- a/internal/c/parts/user_mods/os/lnx/build.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -gcc -I../../../../ -DFREEGLUT_STATIC -I../../include -c ../../src/luke_mods.cpp -o temp/luke_mods.o -gcc -I../../../../ -DFREEGLUT_STATIC -I../../include -c ../../src/steve_mods.cpp -o temp/steve_mods.o -ar rcs src.a temp/steve_mods.o temp/luke_mods.o -echo "Press any key to continue..." -Pause() -{ -OLDCONFIG=`stty -g` -stty -icanon -echo min 1 time 0 -dd count=1 2>/dev/null -stty $OLDCONFIG -} -Pause - diff --git a/internal/c/parts/user_mods/os/lnx/setup_build.sh b/internal/c/parts/user_mods/os/lnx/setup_build.sh deleted file mode 100755 index f6f69ee79..000000000 --- a/internal/c/parts/user_mods/os/lnx/setup_build.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -gcc -I../../../../ -DFREEGLUT_STATIC -I../../include -c ../../src/luke_mods.cpp -o temp/luke_mods.o -gcc -I../../../../ -DFREEGLUT_STATIC -I../../include -c ../../src/steve_mods.cpp -o temp/steve_mods.o -ar rcs src.a temp/steve_mods.o temp/luke_mods.o diff --git a/internal/c/parts/user_mods/os/lnx/temp/temp.bin b/internal/c/parts/user_mods/os/lnx/temp/temp.bin deleted file mode 100644 index e69de29bb..000000000 diff --git a/internal/c/parts/user_mods/os/osx/build.command b/internal/c/parts/user_mods/os/osx/build.command deleted file mode 100644 index 4b17e6744..000000000 --- a/internal/c/parts/user_mods/os/osx/build.command +++ /dev/null @@ -1,15 +0,0 @@ -cd "$(dirname "$0")" - -gcc -I../../../../ -I../../include -c ../../src/luke_mods.cpp -o temp/luke_mods.o -gcc -I../../../../ -I../../include -c ../../src/steve_mods.cpp -o temp/steve_mods.o -ar rcs src.a temp/steve_mods.o temp/luke_mods.o - -echo "Press any key to continue..." -Pause() -{ -OLDCONFIG=`stty -g` -stty -icanon -echo min 1 time 0 -dd count=1 2>/dev/null -stty $OLDCONFIG -} -Pause diff --git a/internal/c/parts/user_mods/os/osx/setup_build.command b/internal/c/parts/user_mods/os/osx/setup_build.command deleted file mode 100644 index 02970bac4..000000000 --- a/internal/c/parts/user_mods/os/osx/setup_build.command +++ /dev/null @@ -1,5 +0,0 @@ -cd "$(dirname "$0")" - -gcc -I../../../../ -I../../include -c ../../src/luke_mods.cpp -o temp/luke_mods.o -gcc -I../../../../ -I../../include -c ../../src/steve_mods.cpp -o temp/steve_mods.o -ar rcs src.a temp/steve_mods.o temp/luke_mods.o diff --git a/internal/c/parts/user_mods/os/osx/temp/temp.bin b/internal/c/parts/user_mods/os/osx/temp/temp.bin deleted file mode 100644 index e69de29bb..000000000 diff --git a/internal/c/parts/user_mods/os/win/build.bat b/internal/c/parts/user_mods/os/win/build.bat deleted file mode 100644 index 272a2ba12..000000000 --- a/internal/c/parts/user_mods/os/win/build.bat +++ /dev/null @@ -1,4 +0,0 @@ -..\..\..\..\c_compiler\bin\gcc -DFREEGLUT_STATIC -I..\..\..\..\ -I..\..\include -c ..\..\src\luke_mods.cpp -o temp\luke_mods.o -..\..\..\..\c_compiler\bin\gcc -DFREEGLUT_STATIC -I..\..\..\..\ -I..\..\include -c ..\..\src\steve_mods.cpp -o temp\steve_mods.o -..\..\..\..\c_compiler\bin\ar rcs src.a temp\steve_mods.o temp\luke_mods.o -pause diff --git a/internal/c/parts/user_mods/os/win/setup_build.bat b/internal/c/parts/user_mods/os/win/setup_build.bat deleted file mode 100644 index 1143bec7e..000000000 --- a/internal/c/parts/user_mods/os/win/setup_build.bat +++ /dev/null @@ -1,3 +0,0 @@ -..\..\..\..\c_compiler\bin\gcc -DFREEGLUT_STATIC -I..\..\..\..\ -I..\..\include -c ..\..\src\luke_mods.cpp -o temp\luke_mods.o -..\..\..\..\c_compiler\bin\gcc -DFREEGLUT_STATIC -I..\..\..\..\ -I..\..\include -c ..\..\src\steve_mods.cpp -o temp\steve_mods.o -..\..\..\..\c_compiler\bin\ar rcs src.a temp\steve_mods.o temp\luke_mods.o diff --git a/internal/c/parts/user_mods/os/win/temp/temp.bin b/internal/c/parts/user_mods/os/win/temp/temp.bin deleted file mode 100644 index e69de29bb..000000000 diff --git a/internal/c/parts/user_mods/src.cpp b/internal/c/parts/user_mods/src.cpp deleted file mode 100644 index ace3666da..000000000 --- a/internal/c/parts/user_mods/src.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef DEPENDENCY_USER_MODS -//No stubs required -#else -#include "include/user_mods.h" -#endif diff --git a/internal/c/parts/user_mods/src/Steve Stuff/convert_angle.cpp b/internal/c/parts/user_mods/src/Steve Stuff/convert_angle.cpp deleted file mode 100644 index 53b75e267..000000000 --- a/internal/c/parts/user_mods/src/Steve Stuff/convert_angle.cpp +++ /dev/null @@ -1,28 +0,0 @@ -// ****************************************************************************************************** -// ** Angle Conversion Formulas -// ****************************************************************************************************** - -double func_deg2rad (double value) { - return (value * 0.01745329251994329576923690768489); -} - -double func_rad2deg (double value) { - return (value * 57.29577951308232); -} - -double func_deg2grad (double value) { - return (value * 1.111111111111111); -} - -double func_grad2deg (double value) { - return (value * 0.9); -} - -double func_rad2grad (double value) { - return (value * 63.66197723675816); -} - -double func_grad2rad (double value) { - return (value * .01570796326794896); -} - diff --git a/internal/c/parts/user_mods/src/Steve Stuff/extramath.cpp b/internal/c/parts/user_mods/src/Steve Stuff/extramath.cpp deleted file mode 100644 index d00e4559e..000000000 --- a/internal/c/parts/user_mods/src/Steve Stuff/extramath.cpp +++ /dev/null @@ -1,51 +0,0 @@ -double func_pi (double multiplier,int32 passed) { - if (passed) {return 3.14159265358979323846264338327950288419716939937510582 * multiplier;} - return (3.14159265358979323846264338327950288419716939937510582); -} - -double func_arcsec (double num) { - int sign = (num > 0) - (num < 0); - if (num<-1||num>1) {error(5);return 0;} - return atan(num / sqrt(1 - num * num)) + (sign - 1) * (2 * atan(1)); -} - -double func_arccsc (double num) { - int sign = (num > 0) - (num < 0); - if (num<-1||num>1) {error(5);return 0;} - return atan(num / sqrt(1 - num * num)) + (sign - 1) * (2 * atan(1)); -} - -double func_arccot (double num) {return 2 * atan(1) - atan(num);} - -double func_sech (double num) { - if (num>88.02969) {error(5);return 0;} - if (exp(num) + exp(-num)==0) {error(5);return 0;} - return 2/ (exp(num) + exp(-num)); -} - -double func_csch (double num) { - if (num>88.02969) {error(5);return 0;} - if (exp(num) - exp(-num)==0) {error(5);return 0;} - return 2/ (exp(num) - exp(-num)); -} - -double func_coth (double num) { - if (num>44.014845) {error(5);return 0;} - if (2 * exp(num) - 1==0) {error(5);return 0;} - return 2 * exp(num) - 1; -} - -double func_sec (double num) { - if (cos(num)==0) {error(5);return 0;} - return 1/cos(num); -} - -double func_csc (double num) { - if (sin(num)==0) {error(5);return 0;} - return 1/sin(num); -} - -double func_cot (double num) { - if (tan(num)==0) {error(5);return 0;} - return 1/tan(num); -} \ No newline at end of file diff --git a/internal/c/parts/user_mods/src/Steve Stuff/screeninfo.cpp b/internal/c/parts/user_mods/src/Steve Stuff/screeninfo.cpp deleted file mode 100644 index 0d18627f9..000000000 --- a/internal/c/parts/user_mods/src/Steve Stuff/screeninfo.cpp +++ /dev/null @@ -1,68 +0,0 @@ -int32 func_screenwidth () { - while (!window_exists){Sleep(100);} - #ifdef QB64_WINDOWS - while (!window_handle){Sleep(100);} - #endif - return glutGet(GLUT_SCREEN_WIDTH); -} - -int32 func_screenheight () { - while (!window_exists){Sleep(100);} - #ifdef QB64_WINDOWS - while (!window_handle){Sleep(100);} - #endif - return glutGet(GLUT_SCREEN_HEIGHT); -} - -void sub_screenicon () { - while (!window_exists){Sleep(100);} - #ifdef QB64_WINDOWS - while (!window_handle){Sleep(100);} - #endif - glutIconifyWindow(); - return; -} - -int32 func_windowexists () { - #ifdef QB64_WINDOWS - if (!window_handle){return 0;} - #endif - return -window_exists; -} - -int32 func__controlchr () { - return -no_control_characters2; -} - -int32 func_screenicon () { - while (!window_exists){Sleep(100);} - #ifdef QB64_WINDOWS - while (!window_handle){Sleep(100);} - #endif - extern int32 screen_hide; - if (screen_hide) {error(5); return 0;} - #ifdef QB64_WINDOWS - #include - return -IsIconic(window_handle); - #else - /* - Linux code not compiling for now - #include - #include - extern Display *X11_display; - extern Window X11_window; - extern int32 screen_hide; - XWindowAttributes attribs; - while (!(X11_display && X11_window)); - XGetWindowAttributes(X11_display, X11_window, &attribs); - if (attribs.map_state == IsUnmapped) return -1; - return 0; - #endif */ - return 0; //if we get here and haven't exited already, we failed somewhere along the way. - #endif -} - -int32 func__autodisplay () { - if (autodisplay) {return -1;} - return 0; -} \ No newline at end of file diff --git a/internal/c/parts/user_mods/src/Steve Stuff/stringcomp.cpp b/internal/c/parts/user_mods/src/Steve Stuff/stringcomp.cpp deleted file mode 100644 index 555082b4d..000000000 --- a/internal/c/parts/user_mods/src/Steve Stuff/stringcomp.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#include - -int32 func__str_nc_compare(qbs *s1, qbs *s2) { - int32 limit, l1, l2; - int32 v1, v2; - unsigned char *c1=s1->chr, *c2=s2->chr; - - l1 = s1->len; l2 = s2->len; //no need to get the length of these strings multiple times. - if (!l1) { - if (l2) return -1; else return 0; //if one is a null string we known the answer already. - } - if (!l2) return 1; - if (l1<=l2) limit = l1; else limit = l2; //our limit is going to be the length of the smallest string. - - for (int32 i=0;i64)&&(v1<91)) v1=v1|32; - if ((v2>64)&&(v2<91)) v2=v2|32; - if (v1v2) return 1; - c1++; - c2++; - } - - if (l1l1) return 1; - return 0; -} - - -int32 func__str_compare(qbs *s1, qbs *s2) { - int32 i, limit, l1, l2; - l1 = s1->len; l2 = s2->len; //no need to get the length of these strings multiple times. - if (!l1) { - if (l2) return -1; else return 0; //if one is a null string we known the answer already. - } - if (!l2) return 1; - if (l1<=l2) limit = l1; else limit = l2; - i=memcmp(s1->chr,s2->chr,limit); - if (i<0) return -1; - if (i>0) return 1; - if (l1l2) return 1; - return 0; -} diff --git a/internal/c/parts/user_mods/src/luke_mods.cpp b/internal/c/parts/user_mods/src/luke_mods.cpp deleted file mode 100644 index fe52fef0e..000000000 --- a/internal/c/parts/user_mods/src/luke_mods.cpp +++ /dev/null @@ -1,25 +0,0 @@ -#include -#include -#include -#include "libqb.h" -#include "luke_mods.h" - -void sub__keyclear(int32 buf, int32 passed) { - if (new_error) return; - if (passed && (buf > 3 || buf < 1)) error(5); - // Sleep(10); - if ((buf == 1 && passed) || !passed) { - //INKEY$ buffer - cmem[0x41a]=30; cmem[0x41b]=0; //head - cmem[0x41c]=30; cmem[0x41d]=0; //tail - } - if ((buf == 2 && passed) || !passed) { - //_KEYHIT buffer - keyhit_nextfree = 0; - keyhit_next = 0; - } - if ((buf == 3 && passed) || !passed) { - //INP(&H60) buffer - port60h_events = 0; - } -} diff --git a/internal/c/parts/user_mods/src/steve_mods.cpp b/internal/c/parts/user_mods/src/steve_mods.cpp deleted file mode 100644 index c5e666d92..000000000 --- a/internal/c/parts/user_mods/src/steve_mods.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include "libqb.h" -#include "steve_mods.h" - -#include "Steve Stuff/convert_angle.cpp" -#include "Steve Stuff/extramath.cpp" -#include "Steve Stuff/stringcomp.cpp" -#include "Steve Stuff/screeninfo.cpp" - diff --git a/internal/c/purge_all_precompiled_content.bat b/internal/c/purge_all_precompiled_content.bat index 07e009492..44c40d8cd 100644 --- a/internal/c/purge_all_precompiled_content.bat +++ b/internal/c/purge_all_precompiled_content.bat @@ -27,9 +27,4 @@ del parts\audio\out\os\win\temp\*.o del parts\audio\out\os\lnx\temp\*.o del parts\video\font\ttf\os\win\src.o -del parts\video\font\ttf\os\lnx\src.o - -del parts\user_mods\os\win\src.a -del parts\user_mods\os\lnx\src.a -del parts\user_mods\os\win\temp\*.o -del parts\user_mods\os\lnx\temp\*.o +del parts\video\font\ttf\os\lnx\src.o \ No newline at end of file diff --git a/internal/c/purge_all_precompiled_content.command b/internal/c/purge_all_precompiled_content.command index d0e248a49..0d58b169d 100644 --- a/internal/c/purge_all_precompiled_content.command +++ b/internal/c/purge_all_precompiled_content.command @@ -29,9 +29,4 @@ rm parts/audio/out/os/win/temp/*.o rm parts/audio/out/os/lnx/temp/*.o rm parts/video/font/ttf/os/win/src.o -rm parts/video/font/ttf/os/lnx/src.o - -rm parts/user_mods/os/win/src.a -rm parts/user_mods/os/lnx/src.a -rm parts/user_mods/os/win/temp/*.o -rm parts/user_mods/os/lnx/temp/*.o \ No newline at end of file +rm parts/video/font/ttf/os/lnx/src.o \ No newline at end of file diff --git a/internal/c/purge_all_precompiled_content.sh b/internal/c/purge_all_precompiled_content.sh index d263f6668..7684aed3a 100755 --- a/internal/c/purge_all_precompiled_content.sh +++ b/internal/c/purge_all_precompiled_content.sh @@ -29,9 +29,4 @@ rm parts/audio/out/os/win/temp/*.o rm parts/audio/out/os/lnx/temp/*.o rm parts/video/font/ttf/os/win/src.o -rm parts/video/font/ttf/os/lnx/src.o - -rm parts/user_mods/os/win/src.a -rm parts/user_mods/os/lnx/src.a -rm parts/user_mods/os/win/temp/*.o -rm parts/user_mods/os/lnx/temp/*.o \ No newline at end of file +rm parts/video/font/ttf/os/lnx/src.o \ No newline at end of file diff --git a/internal/c/purge_all_precompiled_content_lnx.sh b/internal/c/purge_all_precompiled_content_lnx.sh index 3486191aa..7684aed3a 100755 --- a/internal/c/purge_all_precompiled_content_lnx.sh +++ b/internal/c/purge_all_precompiled_content_lnx.sh @@ -29,10 +29,4 @@ rm parts/audio/out/os/win/temp/*.o rm parts/audio/out/os/lnx/temp/*.o rm parts/video/font/ttf/os/win/src.o -rm parts/video/font/ttf/os/lnx/src.o - -rm parts/user_mods/os/win/src.a -rm parts/user_mods/os/lnx/src.a -rm parts/user_mods/os/win/temp/*.o -rm parts/user_mods/os/lnx/temp/*.o - +rm parts/video/font/ttf/os/lnx/src.o \ No newline at end of file diff --git a/internal/c/purge_all_precompiled_content_osx.command b/internal/c/purge_all_precompiled_content_osx.command index a60022eba..0d58b169d 100644 --- a/internal/c/purge_all_precompiled_content_osx.command +++ b/internal/c/purge_all_precompiled_content_osx.command @@ -29,10 +29,4 @@ rm parts/audio/out/os/win/temp/*.o rm parts/audio/out/os/lnx/temp/*.o rm parts/video/font/ttf/os/win/src.o -rm parts/video/font/ttf/os/lnx/src.o - -rm parts/user_mods/os/win/src.a -rm parts/user_mods/os/lnx/src.a -rm parts/user_mods/os/win/temp/*.o -rm parts/user_mods/os/lnx/temp/*.o - +rm parts/video/font/ttf/os/lnx/src.o \ No newline at end of file diff --git a/internal/c/purge_all_precompiled_content_win.bat b/internal/c/purge_all_precompiled_content_win.bat index 192c341e5..44c40d8cd 100644 --- a/internal/c/purge_all_precompiled_content_win.bat +++ b/internal/c/purge_all_precompiled_content_win.bat @@ -27,9 +27,4 @@ del parts\audio\out\os\win\temp\*.o del parts\audio\out\os\lnx\temp\*.o del parts\video\font\ttf\os\win\src.o -del parts\video\font\ttf\os\lnx\src.o - -del parts\user_mods\os\win\src.a -del parts\user_mods\os\lnx\src.a -del parts\user_mods\os\win\temp\*.o -del parts\user_mods\os\lnx\temp\*.o \ No newline at end of file +del parts\video\font\ttf\os\lnx\src.o \ No newline at end of file diff --git a/internal/c/qbx.cpp b/internal/c/qbx.cpp index d63b000e1..a0cf498e1 100644 --- a/internal/c/qbx.cpp +++ b/internal/c/qbx.cpp @@ -9,8 +9,6 @@ #include #endif -#include "parts/user_mods/src.cpp" - /* testing only #ifdef QB64_WINDOWS @@ -196,9 +194,15 @@ extern void sub__consoletitle(qbs*); extern void sub__screenshow(); extern void sub__screenhide(); extern int32 func__screenhide(); +extern int32 func_windowexists(); +extern int32 func_screenicon(); +extern int32 func_screenwidth(); +extern int32 func_screenheight(); +extern void sub_screenicon(); extern void sub__console(int32); extern int32 func__console(); extern void sub__controlchr(int32); +extern int32 func__controlchr(); extern void sub__blink(int32); extern int32 func__blink(); extern int32 func__hasfocus(); @@ -346,6 +350,8 @@ extern void sub_mid(qbs *dest,int32 start,int32 l,qbs* src,int32 passed); extern qbs *func_mid(qbs *str,int32 start,int32 l,int32 passed); extern qbs *qbs_ltrim(qbs *str); extern qbs *qbs_rtrim(qbs *str); +extern int32 func__str_nc_compare(qbs *s1, qbs *s2); +extern int32 func__str_compare(qbs *s1, qbs *s2); extern qbs *qbs_inkey(); extern qbs *qbs_str(int64 value); extern qbs *qbs_str(int32 value); @@ -364,6 +370,22 @@ extern int32 qbs_greaterthan(qbs *str1,qbs *str2); extern int32 qbs_lessthan(qbs *str1,qbs *str2); extern int32 qbs_lessorequal(qbs *str1,qbs *str2); extern int32 qbs_greaterorequal(qbs *str1,qbs *str2); +extern double func_deg2rad(double degree); +extern double func_deg2grad(double degree); +extern double func_rad2deg(double degree); +extern double func_rad2grad(double degree); +extern double func_grad2deg(double degree); +extern double func_grad2rad(double degree); +extern double func_arcsec (double num); +extern double func_arccsc (double num); +extern double func_arccot (double num); +extern double func_sech (double num); +extern double func_csch (double num); +extern double func_coth (double num); +extern double func_sec (double num); +extern double func_csc (double num); +extern double func_cot (double num); +extern double func_pi(double multiplier,int32 passed); extern int32 qbs_asc(qbs*); extern int32 qbs_asc(qbs*,uint32); extern int32 qbs_len(qbs *str); @@ -1058,6 +1080,7 @@ void sub__icon(int32 i, int32 i2, int32 passed); void sub__display(); void sub__autodisplay(); +int32 func__autodisplay(); diff --git a/setup_lnx.sh b/setup_lnx.sh index c7e504a9c..d0dfd3d18 100755 --- a/setup_lnx.sh +++ b/setup_lnx.sh @@ -183,12 +183,6 @@ else ./setup_build.sh cd ../../../../../../../.. - echo "Building User Additions" - cd internal/c/parts/user_mods/os/lnx - rm -f src.a - ./setup_build.sh - cd ../../../../../.. - echo "Building library 'Core:FreeGLUT'" cd internal/c/parts/core/os/lnx rm -f src.a @@ -198,7 +192,7 @@ else echo "Building 'QB64'" cp -r ./internal/source/* ./internal/temp/ cd internal/c - g++ -w qbx.cpp parts/user_mods/os/lnx/src.a libqb/os/lnx/libqb_setup.o parts/video/font/ttf/os/lnx/src.o parts/core/os/lnx/src.a -lGL -lGLU -lX11 -lpthread -ldl -lrt -D FREEGLUT_STATIC -DDEPENDENCY_USER_MODS -o ../../qb64 + g++ -w qbx.cpp libqb/os/lnx/libqb_setup.o parts/video/font/ttf/os/lnx/src.o parts/core/os/lnx/src.a -lGL -lGLU -lX11 -lpthread -ldl -lrt -D FREEGLUT_STATIC -o ../../qb64 cd ../.. fi diff --git a/setup_osx.command b/setup_osx.command index 44d5c99fa..f7b38d763 100755 --- a/setup_osx.command +++ b/setup_osx.command @@ -44,17 +44,6 @@ if [ ! -f ./src.o ]; then fi cd ../../../../../../../.. -echo "Building User Additions" -cd internal/c/parts/user_mods/os/osx -rm -f src.a -./setup_build.command -if [ ! -f ./src.a ]; then - echo "Compilation of ./internal/c/parts/user_mods/os/osx/src.a failed!" - Pause - exit 1 -fi -cd ../../../../../.. - echo "Building 'QB64' (~3 min)" cp ./internal/source/* ./internal/temp/ cd internal/c diff --git a/setup_win.bat b/setup_win.bat index 1f02a7070..a7ffc33bb 100644 --- a/setup_win.bat +++ b/setup_win.bat @@ -27,12 +27,6 @@ if exist src.o del src.o call setup_build.bat cd ../../../../../../../.. -echo Building User Additions -cd internal/c/parts/user_mods/os/win -if exist src.a del src.a -call setup_build.bat -cd ../../../../../.. - echo Building library 'Core:FreeGLUT' cd internal/c/parts/core/os/win if exist src.a del src.a @@ -45,7 +39,7 @@ copy source\qb64.ico internal\temp\ >nul copy source\icon.rc internal\temp\ >nul cd internal\c c_compiler\bin\windres.exe -i ..\temp\icon.rc -o ..\temp\icon.o -c_compiler\bin\g++ -mconsole -s -Wfatal-errors -w -Wall qbx.cpp libqb\os\win\libqb_setup.o ..\temp\icon.o parts\user_mods\os\win\src.a -D DEPENDENCY_USER_MODS -D DEPENDENCY_LOADFONT parts\video\font\ttf\os\win\src.o -D DEPENDENCY_SOCKETS -D DEPENDENCY_NO_PRINTER -D DEPENDENCY_ICON -D DEPENDENCY_NO_SCREENIMAGE parts\core\os\win\src.a -lopengl32 -lglu32 -mwindows -static-libgcc -static-libstdc++ -D GLEW_STATIC -D FREEGLUT_STATIC -lws2_32 -lwinmm -lgdi32 -o "..\..\qb64.exe" +c_compiler\bin\g++ -mconsole -s -Wfatal-errors -w -Wall qbx.cpp libqb\os\win\libqb_setup.o ..\temp\icon.o -D DEPENDENCY_LOADFONT parts\video\font\ttf\os\win\src.o -D DEPENDENCY_SOCKETS -D DEPENDENCY_NO_PRINTER -D DEPENDENCY_ICON -D DEPENDENCY_NO_SCREENIMAGE parts\core\os\win\src.a -lopengl32 -lglu32 -mwindows -static-libgcc -static-libstdc++ -D GLEW_STATIC -D FREEGLUT_STATIC -lws2_32 -lwinmm -lgdi32 -o "..\..\qb64.exe" cd ..\.. echo. diff --git a/source/qb64.bas b/source/qb64.bas index d353751df..7ecf19e7b 100644 --- a/source/qb64.bas +++ b/source/qb64.bas @@ -88,13 +88,12 @@ CONST DEPENDENCY_AUDIO_DECODE = 3: DEPENDENCY_LAST = DEPENDENCY_LAST + 1 CONST DEPENDENCY_AUDIO_OUT = 4: DEPENDENCY_LAST = DEPENDENCY_LAST + 1 CONST DEPENDENCY_GL = 5: DEPENDENCY_LAST = DEPENDENCY_LAST + 1 CONST DEPENDENCY_IMAGE_CODEC = 6: DEPENDENCY_LAST = DEPENDENCY_LAST + 1 -CONST DEPENDENCY_USER_MODS = 7: DEPENDENCY_LAST = DEPENDENCY_LAST + 1 -CONST DEPENDENCY_CONSOLE_ONLY = 8: DEPENDENCY_LAST = DEPENDENCY_LAST + 1 '=2 if via -g switch, =1 if via metacommand $CONSOLE:ONLY -CONST DEPENDENCY_SOCKETS = 9: DEPENDENCY_LAST = DEPENDENCY_LAST + 1 -CONST DEPENDENCY_PRINTER = 10: DEPENDENCY_LAST = DEPENDENCY_LAST + 1 -CONST DEPENDENCY_ICON = 11: DEPENDENCY_LAST = DEPENDENCY_LAST + 1 -CONST DEPENDENCY_SCREENIMAGE = 12: DEPENDENCY_LAST = DEPENDENCY_LAST + 1 -CONST DEPENDENCY_DEVICEINPUT = 13: DEPENDENCY_LAST = DEPENDENCY_LAST + 1 'removes support for gamepad input if not present +CONST DEPENDENCY_CONSOLE_ONLY = 7: DEPENDENCY_LAST = DEPENDENCY_LAST + 1 '=2 if via -g switch, =1 if via metacommand $CONSOLE:ONLY +CONST DEPENDENCY_SOCKETS = 8: DEPENDENCY_LAST = DEPENDENCY_LAST + 1 +CONST DEPENDENCY_PRINTER = 9: DEPENDENCY_LAST = DEPENDENCY_LAST + 1 +CONST DEPENDENCY_ICON = 10: DEPENDENCY_LAST = DEPENDENCY_LAST + 1 +CONST DEPENDENCY_SCREENIMAGE = 11: DEPENDENCY_LAST = DEPENDENCY_LAST + 1 +CONST DEPENDENCY_DEVICEINPUT = 12: DEPENDENCY_LAST = DEPENDENCY_LAST + 1 'removes support for gamepad input if not present @@ -11856,17 +11855,6 @@ IF DEPENDENCY(DEPENDENCY_AUDIO_OUT) THEN libs$ = libs$ + " " + d2$ + "\src.a" END IF -IF DEPENDENCY(DEPENDENCY_USER_MODS) THEN - defines$ = defines$ + defines_header$ + "DEPENDENCY_USER_MODS" - d1$ = "parts\user_mods" - d2$ = d1$ + "\os\" + o$ - d3$ = "internal\c\" + d2$ - IF _FILEEXISTS(d3$ + "\src.a") = 0 THEN - Build d3$ - END IF - libs$ = libs$ + " " + d2$ + "\src.a" -END IF - 'finalize libs$ and defines$ strings IF LEN(libs$) THEN libs$ = libs$ + " " PATH_SLASH_CORRECT libs$ @@ -20397,7 +20385,6 @@ END SUB SUB reginternal reginternalsubfunc = 1 '$INCLUDE:'subs_functions\subs_functions.bas' -'$INCLUDE:'subs_functions\extensions\extension_list.bas' reginternalsubfunc = 0 END SUB diff --git a/source/subs_functions/extensions/Luke Stuff-ID_Includes.bas b/source/subs_functions/extensions/Luke Stuff-ID_Includes.bas deleted file mode 100644 index c2ec97125..000000000 --- a/source/subs_functions/extensions/Luke Stuff-ID_Includes.bas +++ /dev/null @@ -1,9 +0,0 @@ -clearid -id.n = "_KEYCLEAR" -id.subfunc = 2 -id.args = 1 -id.arg = MKL$(LONGTYPE - ISPOINTER) -id.specialformat = "[?]" -id.callname = "sub__keyclear" -id.Dependency = DEPENDENCY_USER_MODS -regid diff --git a/source/subs_functions/extensions/Steve Stuff-ID_Includes.bas b/source/subs_functions/extensions/Steve Stuff-ID_Includes.bas deleted file mode 100644 index 916b57696..000000000 --- a/source/subs_functions/extensions/Steve Stuff-ID_Includes.bas +++ /dev/null @@ -1,340 +0,0 @@ -clearid -id.n = "_D2R" -id.subfunc = 1 -id.callname = "func_deg2rad" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.Dependency = DEPENDENCY_USER_MODS -regid - -clearid -id.n = "_D2G" -id.subfunc = 1 -id.callname = "func_deg2grad" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.Dependency = DEPENDENCY_USER_MODS -regid - -clearid -id.n = "_R2D" -id.subfunc = 1 -id.callname = "func_rad2deg" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.Dependency = DEPENDENCY_USER_MODS -regid - -clearid -id.n = "_R2G" -id.subfunc = 1 -id.callname = "func_rad2grad" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.Dependency = DEPENDENCY_USER_MODS -regid - -clearid -id.n = "_G2D" -id.subfunc = 1 -id.callname = "func_grad2deg" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.Dependency = DEPENDENCY_USER_MODS -regid - -clearid -id.n = "_G2R" -id.subfunc = 1 -id.callname = "func_grad2rad" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.Dependency = DEPENDENCY_USER_MODS -regid - -clearid 'Clear the old id info so we set the slate for a new one -id.n = "_ATAN2" 'The name of our new one -id.subfunc = 1 'And this is a function -id.callname = "atan2" 'The C name of the function -id.args = 2 'It takes 2 parameters to work -id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) 'These simply add up to represent the 2 patameters from what I can tell -id.ret = FLOATTYPE - ISPOINTER 'we want it to return to us a nice _FLOAT value -regid 'and we're finished with ID registration - -clearid 'Clear the old id info so we set the slate for a new one -id.n = "_HYPOT" 'The name of our new one -id.subfunc = 1 'And this is a function -id.callname = "hypot" 'The C name of the function -id.args = 2 'It takes 2 parameters to work -id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) 'These simply add up to represent the 2 patameters from what I can tell -id.ret = FLOATTYPE - ISPOINTER 'we want it to return to us a nice _FLOAT value -regid 'and we're finished with ID registration - -clearid -id.n = "_ASIN" -id.subfunc = 1 -id.callname = "asin" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -regid - -clearid -id.n = "_ACOS" -id.subfunc = 1 -id.callname = "acos" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -regid - -clearid -id.n = "_SINH" -id.subfunc = 1 -id.callname = "sinh" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -regid - -clearid -id.n = "_COSH" -id.subfunc = 1 -id.callname = "cosh" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -regid - -clearid -id.n = "_TANH" -id.subfunc = 1 -id.callname = "tanh" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -regid - -clearid -id.n = "_ASINH" -id.subfunc = 1 -id.callname = "asinh" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -regid - -clearid -id.n = "_ACOSH" -id.subfunc = 1 -id.callname = "acosh" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -regid - -clearid -id.n = "_ATANH" -id.subfunc = 1 -id.callname = "atanh" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -regid - -clearid -id.n = "_CEIL" -id.subfunc = 1 -id.callname = "ceil" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -regid - -clearid -id.n = "_PI" -id.subfunc = 1 -id.callname = "func_pi" -id.args = 1 -id.arg = MKL$(DOUBLETYPE - ISPOINTER) -id.ret = DOUBLETYPE - ISPOINTER -id.specialformat = "[?]" -id.Dependency = DEPENDENCY_USER_MODS -regid - -clearid -id.n = "_DESKTOPHEIGHT" -id.subfunc = 1 -id.callname = "func_screenheight" -id.args = 0 -id.ret = LONGTYPE - ISPOINTER -id.Dependency = DEPENDENCY_USER_MODS -regid - -clearid -id.n = "_DESKTOPWIDTH" -id.subfunc = 1 -id.callname = "func_screenwidth" -id.args = 0 -id.ret = LONGTYPE - ISPOINTER -id.Dependency = DEPENDENCY_USER_MODS -regid - -clearid -id.n = "_SCREENICON" 'name change to from _ICONIFYWINDOW to _SCREENICON to match the screenshow and screenhide -id.subfunc = 2 -id.callname = "sub_screenicon" -id.Dependency = DEPENDENCY_USER_MODS -regid - -clearid -id.n = "_SCREENEXISTS" -id.subfunc = 1 -id.callname = "func_windowexists" -id.Dependency = DEPENDENCY_USER_MODS -regid - -clearid -id.n = "_CONTROLCHR" -id.subfunc = 1 -id.callname = "func__controlchr" -id.args = 0 -id.ret = LONGTYPE - ISPOINTER -id.Dependency = DEPENDENCY_USER_MODS -regid - -clearid -id.n = "_STRICMP" -id.subfunc = 1 -id.callname = "func__str_nc_compare" -id.args = 2 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.Dependency = DEPENDENCY_USER_MODS -regid - -clearid -id.n = "_STRCMP" -id.subfunc = 1 -id.callname = "func__str_compare" -id.args = 2 -id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) -id.ret = LONGTYPE - ISPOINTER -id.Dependency = DEPENDENCY_USER_MODS -regid - -clearid -id.n = "_ARCSEC" -id.subfunc = 1 -id.callname = "func_arcsec" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.Dependency = DEPENDENCY_USER_MODS -regid - -clearid -id.n = "_ARCCSC" -id.subfunc = 1 -id.callname = "func_arccsc" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.Dependency = DEPENDENCY_USER_MODS -regid - -clearid -id.n = "_ARCCOT" -id.subfunc = 1 -id.callname = "func_arccot" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.Dependency = DEPENDENCY_USER_MODS -regid - -clearid -id.n = "_SECH" -id.subfunc = 1 -id.callname = "func_sech" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.Dependency = DEPENDENCY_USER_MODS -regid - -clearid -id.n = "_CSCH" -id.subfunc = 1 -id.callname = "func_csch" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.Dependency = DEPENDENCY_USER_MODS -regid - -clearid -id.n = "_COTH" -id.subfunc = 1 -id.callname = "func_coth" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.Dependency = DEPENDENCY_USER_MODS -regid - -clearid -id.n = "_SEC" -id.subfunc = 1 -id.callname = "func_sec" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.Dependency = DEPENDENCY_USER_MODS -regid - -clearid -id.n = "_CSC" -id.subfunc = 1 -id.callname = "func_csc" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.Dependency = DEPENDENCY_USER_MODS -regid - -clearid -id.n = "_COT" -id.subfunc = 1 -id.callname = "func_cot" -id.args = 1 -id.arg = MKL$(FLOATTYPE - ISPOINTER) -id.ret = FLOATTYPE - ISPOINTER -id.Dependency = DEPENDENCY_USER_MODS -regid - -clearid -id.n = "_SCREENICON" -id.subfunc = 1 -id.callname = "func_screenicon" -id.args = 0 -id.ret = LONGTYPE - ISPOINTER -id.Dependency = DEPENDENCY_USER_MODS -regid - -clearid -id.n = "_AUTODISPLAY" -id.subfunc = 1 -id.callname = "func__autodisplay" -id.args = 0 -id.ret = LONGTYPE - ISPOINTER -id.Dependency = DEPENDENCY_USER_MODS -regid - - diff --git a/source/subs_functions/extensions/extension_list.bas b/source/subs_functions/extensions/extension_list.bas deleted file mode 100644 index b1679e068..000000000 --- a/source/subs_functions/extensions/extension_list.bas +++ /dev/null @@ -1,2 +0,0 @@ -'$INCLUDE:'Luke Stuff-ID_Includes.bas' -'$INCLUDE:'Steve Stuff-ID_Includes.bas' diff --git a/source/subs_functions/subs_functions.bas b/source/subs_functions/subs_functions.bas index 834a93124..4d063e0a6 100644 --- a/source/subs_functions/subs_functions.bas +++ b/source/subs_functions/subs_functions.bas @@ -2928,3 +2928,351 @@ id.callname = "func__inclerrorfile" id.ret = STRINGTYPE - ISPOINTER regid +clearid +id.n = "_KEYCLEAR" +id.subfunc = 2 +id.args = 1 +id.arg = MKL$(LONGTYPE - ISPOINTER) +id.specialformat = "[?]" +id.callname = "sub__keyclear" +id.Dependency = DEPENDENCY_USER_MODS +regid + +clearid +id.n = "_D2R" +id.subfunc = 1 +id.callname = "func_deg2rad" +id.args = 1 +id.arg = MKL$(FLOATTYPE - ISPOINTER) +id.ret = FLOATTYPE - ISPOINTER +id.Dependency = DEPENDENCY_USER_MODS +regid + +clearid +id.n = "_D2G" +id.subfunc = 1 +id.callname = "func_deg2grad" +id.args = 1 +id.arg = MKL$(FLOATTYPE - ISPOINTER) +id.ret = FLOATTYPE - ISPOINTER +id.Dependency = DEPENDENCY_USER_MODS +regid + +clearid +id.n = "_R2D" +id.subfunc = 1 +id.callname = "func_rad2deg" +id.args = 1 +id.arg = MKL$(FLOATTYPE - ISPOINTER) +id.ret = FLOATTYPE - ISPOINTER +id.Dependency = DEPENDENCY_USER_MODS +regid + +clearid +id.n = "_R2G" +id.subfunc = 1 +id.callname = "func_rad2grad" +id.args = 1 +id.arg = MKL$(FLOATTYPE - ISPOINTER) +id.ret = FLOATTYPE - ISPOINTER +id.Dependency = DEPENDENCY_USER_MODS +regid + +clearid +id.n = "_G2D" +id.subfunc = 1 +id.callname = "func_grad2deg" +id.args = 1 +id.arg = MKL$(FLOATTYPE - ISPOINTER) +id.ret = FLOATTYPE - ISPOINTER +id.Dependency = DEPENDENCY_USER_MODS +regid + +clearid +id.n = "_G2R" +id.subfunc = 1 +id.callname = "func_grad2rad" +id.args = 1 +id.arg = MKL$(FLOATTYPE - ISPOINTER) +id.ret = FLOATTYPE - ISPOINTER +id.Dependency = DEPENDENCY_USER_MODS +regid + +clearid 'Clear the old id info so we set the slate for a new one +id.n = "_ATAN2" 'The name of our new one +id.subfunc = 1 'And this is a function +id.callname = "atan2" 'The C name of the function +id.args = 2 'It takes 2 parameters to work +id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) 'These simply add up to represent the 2 patameters from what I can tell +id.ret = FLOATTYPE - ISPOINTER 'we want it to return to us a nice _FLOAT value +regid 'and we're finished with ID registration + +clearid 'Clear the old id info so we set the slate for a new one +id.n = "_HYPOT" 'The name of our new one +id.subfunc = 1 'And this is a function +id.callname = "hypot" 'The C name of the function +id.args = 2 'It takes 2 parameters to work +id.arg = MKL$(FLOATTYPE - ISPOINTER) + MKL$(FLOATTYPE - ISPOINTER) 'These simply add up to represent the 2 patameters from what I can tell +id.ret = FLOATTYPE - ISPOINTER 'we want it to return to us a nice _FLOAT value +regid 'and we're finished with ID registration + +clearid +id.n = "_ASIN" +id.subfunc = 1 +id.callname = "asin" +id.args = 1 +id.arg = MKL$(FLOATTYPE - ISPOINTER) +id.ret = FLOATTYPE - ISPOINTER +regid + +clearid +id.n = "_ACOS" +id.subfunc = 1 +id.callname = "acos" +id.args = 1 +id.arg = MKL$(FLOATTYPE - ISPOINTER) +id.ret = FLOATTYPE - ISPOINTER +regid + +clearid +id.n = "_SINH" +id.subfunc = 1 +id.callname = "sinh" +id.args = 1 +id.arg = MKL$(FLOATTYPE - ISPOINTER) +id.ret = FLOATTYPE - ISPOINTER +regid + +clearid +id.n = "_COSH" +id.subfunc = 1 +id.callname = "cosh" +id.args = 1 +id.arg = MKL$(FLOATTYPE - ISPOINTER) +id.ret = FLOATTYPE - ISPOINTER +regid + +clearid +id.n = "_TANH" +id.subfunc = 1 +id.callname = "tanh" +id.args = 1 +id.arg = MKL$(FLOATTYPE - ISPOINTER) +id.ret = FLOATTYPE - ISPOINTER +regid + +clearid +id.n = "_ASINH" +id.subfunc = 1 +id.callname = "asinh" +id.args = 1 +id.arg = MKL$(FLOATTYPE - ISPOINTER) +id.ret = FLOATTYPE - ISPOINTER +regid + +clearid +id.n = "_ACOSH" +id.subfunc = 1 +id.callname = "acosh" +id.args = 1 +id.arg = MKL$(FLOATTYPE - ISPOINTER) +id.ret = FLOATTYPE - ISPOINTER +regid + +clearid +id.n = "_ATANH" +id.subfunc = 1 +id.callname = "atanh" +id.args = 1 +id.arg = MKL$(FLOATTYPE - ISPOINTER) +id.ret = FLOATTYPE - ISPOINTER +regid + +clearid +id.n = "_CEIL" +id.subfunc = 1 +id.callname = "ceil" +id.args = 1 +id.arg = MKL$(FLOATTYPE - ISPOINTER) +id.ret = FLOATTYPE - ISPOINTER +regid + +clearid +id.n = "_PI" +id.subfunc = 1 +id.callname = "func_pi" +id.args = 1 +id.arg = MKL$(DOUBLETYPE - ISPOINTER) +id.ret = DOUBLETYPE - ISPOINTER +id.specialformat = "[?]" +id.Dependency = DEPENDENCY_USER_MODS +regid + +clearid +id.n = "_DESKTOPHEIGHT" +id.subfunc = 1 +id.callname = "func_screenheight" +id.args = 0 +id.ret = LONGTYPE - ISPOINTER +id.Dependency = DEPENDENCY_USER_MODS +regid + +clearid +id.n = "_DESKTOPWIDTH" +id.subfunc = 1 +id.callname = "func_screenwidth" +id.args = 0 +id.ret = LONGTYPE - ISPOINTER +id.Dependency = DEPENDENCY_USER_MODS +regid + +clearid +id.n = "_SCREENICON" 'name change to from _ICONIFYWINDOW to _SCREENICON to match the screenshow and screenhide +id.subfunc = 2 +id.callname = "sub_screenicon" +id.Dependency = DEPENDENCY_USER_MODS +regid + +clearid +id.n = "_SCREENEXISTS" +id.subfunc = 1 +id.callname = "func_windowexists" +id.Dependency = DEPENDENCY_USER_MODS +regid + +clearid +id.n = "_CONTROLCHR" +id.subfunc = 1 +id.callname = "func__controlchr" +id.args = 0 +id.ret = LONGTYPE - ISPOINTER +id.Dependency = DEPENDENCY_USER_MODS +regid + +clearid +id.n = "_STRICMP" +id.subfunc = 1 +id.callname = "func__str_nc_compare" +id.args = 2 +id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) +id.ret = LONGTYPE - ISPOINTER +id.Dependency = DEPENDENCY_USER_MODS +regid + +clearid +id.n = "_STRCMP" +id.subfunc = 1 +id.callname = "func__str_compare" +id.args = 2 +id.arg = MKL$(STRINGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) +id.ret = LONGTYPE - ISPOINTER +id.Dependency = DEPENDENCY_USER_MODS +regid + +clearid +id.n = "_ARCSEC" +id.subfunc = 1 +id.callname = "func_arcsec" +id.args = 1 +id.arg = MKL$(FLOATTYPE - ISPOINTER) +id.ret = FLOATTYPE - ISPOINTER +id.Dependency = DEPENDENCY_USER_MODS +regid + +clearid +id.n = "_ARCCSC" +id.subfunc = 1 +id.callname = "func_arccsc" +id.args = 1 +id.arg = MKL$(FLOATTYPE - ISPOINTER) +id.ret = FLOATTYPE - ISPOINTER +id.Dependency = DEPENDENCY_USER_MODS +regid + +clearid +id.n = "_ARCCOT" +id.subfunc = 1 +id.callname = "func_arccot" +id.args = 1 +id.arg = MKL$(FLOATTYPE - ISPOINTER) +id.ret = FLOATTYPE - ISPOINTER +id.Dependency = DEPENDENCY_USER_MODS +regid + +clearid +id.n = "_SECH" +id.subfunc = 1 +id.callname = "func_sech" +id.args = 1 +id.arg = MKL$(FLOATTYPE - ISPOINTER) +id.ret = FLOATTYPE - ISPOINTER +id.Dependency = DEPENDENCY_USER_MODS +regid + +clearid +id.n = "_CSCH" +id.subfunc = 1 +id.callname = "func_csch" +id.args = 1 +id.arg = MKL$(FLOATTYPE - ISPOINTER) +id.ret = FLOATTYPE - ISPOINTER +id.Dependency = DEPENDENCY_USER_MODS +regid + +clearid +id.n = "_COTH" +id.subfunc = 1 +id.callname = "func_coth" +id.args = 1 +id.arg = MKL$(FLOATTYPE - ISPOINTER) +id.ret = FLOATTYPE - ISPOINTER +id.Dependency = DEPENDENCY_USER_MODS +regid + +clearid +id.n = "_SEC" +id.subfunc = 1 +id.callname = "func_sec" +id.args = 1 +id.arg = MKL$(FLOATTYPE - ISPOINTER) +id.ret = FLOATTYPE - ISPOINTER +id.Dependency = DEPENDENCY_USER_MODS +regid + +clearid +id.n = "_CSC" +id.subfunc = 1 +id.callname = "func_csc" +id.args = 1 +id.arg = MKL$(FLOATTYPE - ISPOINTER) +id.ret = FLOATTYPE - ISPOINTER +id.Dependency = DEPENDENCY_USER_MODS +regid + +clearid +id.n = "_COT" +id.subfunc = 1 +id.callname = "func_cot" +id.args = 1 +id.arg = MKL$(FLOATTYPE - ISPOINTER) +id.ret = FLOATTYPE - ISPOINTER +id.Dependency = DEPENDENCY_USER_MODS +regid + +clearid +id.n = "_SCREENICON" +id.subfunc = 1 +id.callname = "func_screenicon" +id.args = 0 +id.ret = LONGTYPE - ISPOINTER +id.Dependency = DEPENDENCY_USER_MODS +regid + +clearid +id.n = "_AUTODISPLAY" +id.subfunc = 1 +id.callname = "func__autodisplay" +id.args = 0 +id.ret = LONGTYPE - ISPOINTER +id.Dependency = DEPENDENCY_USER_MODS +regid \ No newline at end of file From b1baec3f2b11e8e70194746f81f337df4916e17f Mon Sep 17 00:00:00 2001 From: Luke Ceddia Date: Mon, 25 Sep 2017 22:48:15 +1000 Subject: [PATCH 2/3] Correct Travis buildscript --- .travis/build.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis/build.sh b/.travis/build.sh index acda6a8b4..c5b2b1c6b 100755 --- a/.travis/build.sh +++ b/.travis/build.sh @@ -22,13 +22,12 @@ com_build() { com_build "libqb" "libQB" com_build "parts/video/font/ttf" "FreeType" -com_build "parts/user_mods" "User Additions" com_build "parts/core" "FreeGLUT" cp -r internal/source/* internal/temp/ cd internal/c echo -n "Bootstrapping QB64..." -g++ -w qbx.cpp parts/user_mods/os/lnx/src.a libqb/os/lnx/libqb_setup.o parts/video/font/ttf/os/lnx/src.o parts/core/os/lnx/src.a -lGL -lGLU -lX11 -lpthread -ldl -lrt -D FREEGLUT_STATIC -DDEPENDENCY_USER_MODS -o ../../qb64_bootstrap +g++ -w qbx.cpp libqb/os/lnx/libqb_setup.o parts/video/font/ttf/os/lnx/src.o parts/core/os/lnx/src.a -lGL -lGLU -lX11 -lpthread -ldl -lrt -D FREEGLUT_STATIC -DDEPENDENCY_USER_MODS -o ../../qb64_bootstrap if [ $? -ne 0 ]; then echo "QB64 bootstrap failed" exit 1 From 54574c1ca64890fab849a669028aa0b48b4938bb Mon Sep 17 00:00:00 2001 From: Luke Ceddia Date: Mon, 25 Sep 2017 23:03:38 +1000 Subject: [PATCH 3/3] Add declaration for sub__keyclear() --- internal/c/qbx.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/c/qbx.cpp b/internal/c/qbx.cpp index a0cf498e1..ee0465d87 100644 --- a/internal/c/qbx.cpp +++ b/internal/c/qbx.cpp @@ -353,6 +353,7 @@ extern qbs *qbs_rtrim(qbs *str); extern int32 func__str_nc_compare(qbs *s1, qbs *s2); extern int32 func__str_compare(qbs *s1, qbs *s2); extern qbs *qbs_inkey(); +extern void sub__keyclear(int32 buf, int32 passed); extern qbs *qbs_str(int64 value); extern qbs *qbs_str(int32 value); extern qbs *qbs_str(int16 value);