I guess you can't do ".float 62.23, 6.28, 1e6" analogous to .byte/.word (apart from having to define a macro/function for the purpose or including some magic library file every time you need this).
I dont use repository, its just a source file and an assembler and a few data files generated in vb6 or python, I dont like to overcomplicate things. but whatever floats your boat, hide the source include in some .cfg file you will forget even exists, its much nicer to be able to see it in the main source right away. but that is just my opinion, you do it as you like.
Quoting KrillI guess you can't do ".float 62.23, 6.28, 1e6" analogous to .byte/.word (apart from having to define a macro/function for the purpose or including some magic library file every time you need this). Also, now you have to write it as something like EmitFloats(List().add(1, 2, 3, 4, 5)) (short of defining all the N variants you'll ever use). If we had variadic macros, you could write EmitFloats(1, 2, 3, 4, 5) instead, which doesn't feel too bad to me. Variadic macros and functions could be generally useful to clean up some noise here and there, and their implementation could be straightforward: they would always be declared with a single List-typed argument, possibly with a dedicated keyword like .varmacro/.varfunction.
.var myList = [[ $10, $20, $30, "Hello", "World"]] .var myHashTable = {{ "Name" : "Codebase64", Message: "Support Frantic and Moloch" }}
.var myList = [[ x foreach x in range(10)]] // Fill 5 sprites in alternating colors // (Spriterange returns structs with n= spriteNo, x=xpos, y=....) .var colors = [[ %10101010, %01010101, %11111111, %10011001, %01100110 ]] .fill [[ colors.get(s.n) foreach s in spriteRange(5) ]]
.pseudocommand float f0 : f1 : f2 : f3 : f4 : f5 : f6 : f7 { .var varargs = List().add(f0,f1,f2,f3,f4,f5,f6,f7) .foreach (var f in varargs) { .if (f.getType()== AT_NONE) .return; .fill myToBasicFloatFunc(f.getValue()) } } // Use: float 1.234 : 0.000123 : -123.123