Skip to content

Commit

Permalink
checkpoint - includeonce
Browse files Browse the repository at this point in the history
  • Loading branch information
grymmjack committed Feb 14, 2024
1 parent 6919b7e commit 98ec6f8
Show file tree
Hide file tree
Showing 33 changed files with 23 additions and 172 deletions.
5 changes: 1 addition & 4 deletions ANSI/ANSI.BAS
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
$IF GJ_LIB_UNIFIED_TESTING = DEFINED AND GJ_LIB_INC_BI = UNDEFINED THEN
'$INCLUDE:'../_GJ_LIB.BI'
$END IF
$IF GJ_LIB_ANSI_INC_BI = UNDEFINED THEN

'$INCLUDE:'ANSI.BI'
$END IF

OPTION _EXPLICIT
OPTION _EXPLICITARRAY
Expand Down Expand Up @@ -796,6 +795,4 @@ END SUB
$IF GJ_LIB_UNIFIED_TESTING = DEFINED AND GJ_LIB_INC_BM = UNDEFINED THEN
'$INCLUDE:'../_GJ_LIB.BM'
$END IF
$IF GJ_LIB_ANSI_INC_BM = UNDEFINED THEN
'$INCLUDE:'ANSI.BM'
$END IF
5 changes: 1 addition & 4 deletions ANSI/ANSI.BI
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@
' @uses _GJ_LIB_COMMON.BI
' @uses ANSI.BM
'
$LET GJ_LIB_ANSI_INC_BI = 1

$IF GJ_LIB_INC_COMMON_BI = UNDEFINED THEN
$INCLUDEONCE
'$INCLUDE:'../_GJ_LIB_COMMON.BI'
$END IF

' Emulate ANSI functionality using QB internals while outputing ANSI codes?
' Default = FALSE
Expand Down
3 changes: 0 additions & 3 deletions ANSI/ANSI.BM
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
' @uses ANSI.BI
' @see https://gist.github.com/grymmjack/9dae29a60ea65f086d0b35df96fe2291
'
$LET GJ_LIB_ANSI_INC_BM = 1



''
' Clamps a value from going below 0
Expand Down
1 change: 0 additions & 1 deletion ARR/ARR_BYTE.BAS
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
'$DYNAMIC
$LET GJ_LIB_ARR_BYTE_BAS = 1

''
' Slice an array from source to destination starting at index and count slices
Expand Down
1 change: 0 additions & 1 deletion ARR/ARR_DBL.BAS
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
'$DYNAMIC
$LET GJ_LIB_ARR_DBL_BAS = 1

''
' Slice an array from source to destination starting at index and count slices
Expand Down
1 change: 0 additions & 1 deletion ARR/ARR_FLT.BAS
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
'$DYNAMIC
$LET GJ_LIB_ARR_FLT_BAS = 1

''
' Slice an array from source to destination starting at index and count slices
Expand Down
1 change: 0 additions & 1 deletion ARR/ARR_INT.BAS
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
'$DYNAMIC
$LET GJ_LIB_ARR_INT_BAS = 1

''
' Slice an array from source to destination starting at index and count slices
Expand Down
1 change: 0 additions & 1 deletion ARR/ARR_INT64.BAS
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
'$DYNAMIC
$LET GJ_LIB_ARR_INT64_BAS = 1

''
' Slice an array from source to destination starting at index and count slices
Expand Down
1 change: 0 additions & 1 deletion ARR/ARR_LONG.BAS
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
'$DYNAMIC
$LET GJ_LIB_ARR_LONG_BAS = 1

''
' Slice an array from source to destination starting at index and count slices
Expand Down
1 change: 0 additions & 1 deletion ARR/ARR_SNG.BAS
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
'$DYNAMIC
$LET GJ_LIB_ARR_SNG_BAS = 1

''
' Slice an array from source to destination starting at index and count slices
Expand Down
1 change: 0 additions & 1 deletion ARR/ARR_STR.BAS
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
'$DYNAMIC
$LET GJ_LIB_ARR_STR_BAS = 1

''
' Slice an array from source to destination starting at index and count slices
Expand Down
1 change: 0 additions & 1 deletion ARR/ARR_TEMPLATE.BAS
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
'$DYNAMIC
$LET GJ_LIB_ARR_{UT}_BAS = 1

''
' Slice an array from source to destination starting at index and count slices
Expand Down
1 change: 0 additions & 1 deletion ARR/ARR_UBYTE.BAS
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
'$DYNAMIC
$LET GJ_LIB_ARR_UBYTE_BAS = 1

''
' Slice an array from source to destination starting at index and count slices
Expand Down
1 change: 0 additions & 1 deletion ARR/ARR_UINT.BAS
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
'$DYNAMIC
$LET GJ_LIB_ARR_UINT_BAS = 1

''
' Slice an array from source to destination starting at index and count slices
Expand Down
1 change: 0 additions & 1 deletion ARR/ARR_UINT64.BAS
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
'$DYNAMIC
$LET GJ_LIB_ARR_UINT64_BAS = 1

''
' Slice an array from source to destination starting at index and count slices
Expand Down
1 change: 0 additions & 1 deletion ARR/ARR_ULONG.BAS
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
'$DYNAMIC
$LET GJ_LIB_ARR_ULONG_BAS = 1

''
' Slice an array from source to destination starting at index and count slices
Expand Down
2 changes: 1 addition & 1 deletion ARR/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# generate was used on MacOS - so gnu-sed is needed on MacOS:
# brew install gnu-sed
# on linux, just replace $SED with sed
SED=gsed
SED=sed

TYPES=(
BYTE
Expand Down
4 changes: 0 additions & 4 deletions ASEPRITE/ASEPRITE.BAS
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,11 @@
$IF GJ_LIB_UNIFIED_TESTING = DEFINED AND GJ_LIB_INC_BI = UNDEFINED THEN
'$INCLUDE:'../_GJ_LIB.BI'
$END IF
$IF GJ_LIB_ASEPRITE_INC_BI = UNDEFINED THEN
'$INCLUDE:'ASEPRITE.BI'
$END IF



$IF GJ_LIB_UNIFIED_TESTING = DEFINED AND GJ_LIB_INC_BM = UNDEFINED THEN
'$INCLUDE:'../_GJ_LIB.BM'
$END IF
$IF GJ_LIB_ASEPRITE_INC_BM = UNDEFINED THEN
'$INCLUDE:'ASEPRITE.BM'
$END IF
8 changes: 0 additions & 8 deletions ASEPRITE/ASEPRITE.BI
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@
' @see https://github.com/aseprite/aseprite/blob/main/docs/ase-file-specs.md
' @author Rick Christy <grymmjack@gmail.com>
'
$LET GJ_LIB_ASEPRITE_INC_BI = 1



DECLARE SUB load_aseprite (img_path$)
DECLARE FUNCTION get_aseprite_info$ (img_path$)



TYPE ASEPRITE_IMAGE_HEADER
' A 128-byte header (same as FLC/FLI header, but with other magic number):
Expand Down
3 changes: 0 additions & 3 deletions ASEPRITE/ASEPRITE.BM
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
'
' @author Rick Christy <grymmjack@gmail.com>
'
$LET GJ_LIB_ASEPRITE_INC_BM = 1



''
' Loads an ASEPRITE image into memory
Expand Down
2 changes: 1 addition & 1 deletion CONSOLE/CONSOLE.BAS
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
$IF GJ_LIB_UNIFIED_TESTING = DEFINED AND GJ_LIB_INC_BI = UNDEFINED THEN
'$INCLUDE:'../_GJ_LIB.BI'
$END IF
'$INCLUDE:'CONSOLE.BI'

_TITLE "QB64_GJ_LIB CONSOLE OBJECT EXAMPLE"

PRINT "This example outputs only this message to the program window."
PRINT "To see the purpose and output look at the terminal window."

'$INCLUDE:'CONSOLE.BI'
console.log "This is a console.log message."

'If you are used to using console.log() you might want to use CALL to use ()'s
Expand Down
3 changes: 0 additions & 3 deletions CONSOLE/CONSOLE.BI
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
' @depends STRINGS/STRINGS.BI
' @author Rick Christy <grymmjack@gmail.com>
'
$LET GJ_LIB_CONSOLE_INC_BI = 1
$IF DEBUGGING = UNDEFINED THEN
$LET DEBUGGING = TRUE
$END IF
Expand Down Expand Up @@ -56,6 +55,4 @@ CONST BRIGHT_MAGENTA = 13%
CONST BRIGHT_YELLOW = 14%
CONST BRIGHT_WHITE = 15%

$IF GJ_LIB_STRINGS_INC_BI = UNDEFINED THEN
'$INCLUDE:'../STRINGS/STRINGS.BI'
$END IF
3 changes: 0 additions & 3 deletions CONSOLE/CONSOLE.BM
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
'
' @author Rick Christy <grymmjack@gmail.com>
'
$LET GJ_LIB_CONSOLE_INC_BM = 1

''
' Log a boxed message to console if DEBUGGING
Expand Down Expand Up @@ -114,6 +113,4 @@ SUB console.error(msg$)
msg$ = ""
END SUB

$IF GJ_LIB_STRINGS_INC_BM = UNDEFINED THEN
'$INCLUDE:'../STRINGS/STRINGS.BM'
$END IF
17 changes: 4 additions & 13 deletions DICT/DICT.BAS
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,13 @@
$IF GJ_LIB_UNIFIED_TESTING = DEFINED AND GJ_LIB_INC_BI = UNDEFINED THEN
'$INCLUDE:'../_GJ_LIB.BI'
$END IF
$IF GJ_LIB_DICT_INC_BI = UNDEFINED THEN
'$INCLUDE:'DICT.BI'
$END IF
$IF GJ_LIB_DUMP_INC_BI = UNDEFINED THEN
'$INCLUDE:'../DUMP/DUMP.BI'
$END IF
'$INCLUDE:'DICT.BI'
'$INCLUDE:'../DUMP/DUMP.BI'
'$DYNAMIC

OPTION _EXPLICIT
OPTION _EXPLICITARRAY


_TITLE "QB64_GJ_LIB Dict OBJECT TESTS"

SCREEN _NEWIMAGE(1024, 768, 32)
Expand Down Expand Up @@ -73,9 +68,5 @@ PRINT DUMP.dict(myDict(), "myDict swapped")
$IF GJ_LIB_UNIFIED_TESTING_BM = DEFINED AND GJ_LIB_INC_BM = UNDEFINED THEN
'$INCLUDE:'../_GJ_LIB.BM'
$END IF
$IF GJ_LIB_DICT_INC_BM = UNDEFINED THEN
'$INCLUDE:'DICT.BM'
$END IF
$IF GJ_LIB_DUMP_INC_BM = UNDEFINED THEN
'$INCLUDE:'../DUMP/DUMP.BM'
$END IF
'$INCLUDE:'DICT.BM'
'$INCLUDE:'../DUMP/DUMP.BM'
3 changes: 0 additions & 3 deletions DICT/DICT.BI
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
' @author Rick Christy <grymmjack@gmail.com>
' @uses DICT.BM
'
$LET GJ_LIB_DICT_INC_BI = 1



' DICTIONARY type consists of keys and values and is intended for array use
TYPE DICTIONARY
Expand Down
3 changes: 0 additions & 3 deletions DICT/DICT.BM
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
' @author Rick Christy <grymmjack@gmail.com>
' @uses DICT.BI
'
$LET GJ_LIB_DICT_INC_BM = 1
$IF GJ_LIB_DICT_INC_BI = UNDEFINED THEN
'$INCLUDE:'DICT.BI'
$END IF


''
Expand Down
17 changes: 4 additions & 13 deletions DUMP/DUMP.BAS
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,13 @@
$IF GJ_LIB_UNIFIED_TESTING = DEFINED AND GJ_LIB_INC_BI = UNDEFINED THEN
'$INCLUDE:'../_GJ_LIB.BI'
$END IF
$IF GJ_LIB_DICT_INC_BI = UNDEFINED THEN
'$INCLUDE:'../DICT/DICT.BI'
$END IF
$IF GJ_LIB_DUMP_INC_BI = UNDEFINED THEN
'$INCLUDE:'DUMP.BI'
$END IF
'$INCLUDE:'../DICT/DICT.BI'
'$INCLUDE:'DUMP.BI'
'$DYNAMIC

OPTION _EXPLICIT
OPTION _EXPLICITARRAY


_TITLE "QB64_GJ_LIB DUMP LIB TESTS"

SCREEN _NEWIMAGE(1024, 768, 32)
Expand Down Expand Up @@ -89,9 +84,5 @@ PRINT DUMP.dict$(myDict(), "myDict");
$IF GJ_LIB_UNIFIED_TESTING = DEFINED AND GJ_LIB_INC_BM = UNDEFINED THEN
'$INCLUDE:'../_GJ_LIB.BM'
$END IF
$IF GJ_LIB_DICT_INC_BM = UNDEFINED THEN
'$INCLUDE:'../DICT/DICT.BM'
$END IF
$IF GJ_LIB_DUMP_INC_BM = UNDEFINED THEN
'$INCLUDE:'DUMP.BM'
$END IF
'$INCLUDE:'../DICT/DICT.BM'
'$INCLUDE:'DUMP.BM'
17 changes: 7 additions & 10 deletions DUMP/DUMP.BI
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,14 @@
' @uses DUMP.BM
' @uses DICT.BI
'
$LET GJ_LIB_DUMP_INC_BI = 1
$IF GJ_LIB_DICT_INC_BI = UNDEFINED THEN
'$INCLUDE:'../DICT/DICT.BI'
$END IF

$IF GJ_LIB_NL = UNDEFINED THEN
$LET GJ_LIB_NL = 1
DIM SHARED GJ_LIB_NL AS STRING
$IF WIN THEN
GJ_LIB_NL$ = CHR$(13)
$ELSE
GJ_LIB_NL$ = CHR$(10)
$END IF
$LET GJ_LIB_NL = 1
DIM SHARED GJ_LIB_NL AS STRING
$IF WIN THEN
GJ_LIB_NL$ = CHR$(13)
$ELSE
GJ_LIB_NL$ = CHR$(10)
$END IF
$END IF
3 changes: 0 additions & 3 deletions DUMP/DUMP.BM
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@
' @see [0] https://www.merriam-webster.com/dictionary/dump
' @see [1] https://www.php.net/manual/en/function.print-r.php
'
$LET GJ_LIB_DUMP_INC_BM = 1



''
' Returns string with a dump of a string
Expand Down
6 changes: 1 addition & 5 deletions INPUT/LIGHTBAR.BAS
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
$IF GJ_LIB_UNIFIED_TESTING = DEFINED AND GJ_LIB_INC_BI <> 1 THEN
'$INCLUDE:'../_GJ_LIB.BI'
$END IF
$IF GJ_LIB_INPUT_LIGHTBAR_INC_BI = UNDEFINED THEN
'$INCLUDE:'LIGHTBAR.BI'
$END IF

_TITLE "QB64_GJ_LIB - INPUT LIB - LIGHTBAR DEMO"

Expand Down Expand Up @@ -128,6 +126,4 @@ COLOR 12, 0 : PRINT "Thank you! Come again!"
$IF GJ_LIB_UNIFIED_TESTING = DEFINED AND GJ_LIB_INC_BM <> 1 THEN
'$INCLUDE:'../_GJ_LIB.BM'
$END IF
$IF GJ_LIB_INPUT_LIGHTBAR_INC_BM = UNDEFINED THEN
'$INCLUDE:'LIGHTBAR.BM'
$END IF
'$INCLUDE:'LIGHTBAR.BM'
Loading

0 comments on commit 98ec6f8

Please sign in to comment.