; timings_and_texts.inc ; Compofiller Studio project text strings and timings section .textstr0 data %ifdef USE_WIDECHAR_TEXTS %define DEFINE_STRING dw %else %define DEFINE_STRING db %endif %define END_STRING , 0 %define SHADER_SOURCE_TEXT ; each timing entry is a bunch of dwords %define DEFINE_TIMING dd %ifndef TIME_DIVIDER_INT error! TIME_DIVIDER_INT MUST BE DEFINED!!! %endif ; Kludge Construction Kit: x and y are floating point values used by the IDE's timings and texts editor, ; and z is the final integer value that has x, y and TIME_DIVIDER_INT baked into it. :/ This is needed ; because NASM is apparently unable to do the calculation and float-to-int conversion at compile time. %define TIMING_TIME(x,y,z) (z) REC_TIMINGS_TIME_FIELD_SIZE equ 4 ; alias is only used by the IDE, not actually assembled into any sort of data %define TIMING_ALIAS(x) %ifdef USE_CUSTOM_UNIFORM %define TIMING_CUSTOM(x) , x REC_TIMINGS_CUSTOM_FIELD_SIZE equ 4 %else %define TIMING_CUSTOM(x) REC_TIMINGS_CUSTOM_FIELD_SIZE equ 0 %endif %define TIMING_STRING(x, y) , y REC_TIMINGS_STRING_PTR_FIELD_SIZE equ 4 TIMINGS_REC_SIZE equ (REC_TIMINGS_TIME_FIELD_SIZE + REC_TIMINGS_CUSTOM_FIELD_SIZE + REC_TIMINGS_STRING_PTR_FIELD_SIZE) TIMINGS_REC_STRING_PTR_FIELD_OFS equ (REC_TIMINGS_TIME_FIELD_SIZE + REC_TIMINGS_CUSTOM_FIELD_SIZE) ; Separating the timings and actual string data enables us to do things section .textstr1 data ;______STRINGS_START______ _string0: DEFINE_STRING 32 END_STRING _string1: DEFINE_STRING 65, 115, 115, 101, 109, 98, 108, 121, 13, 50, 48, 50, 52 END_STRING _string2: DEFINE_STRING 71, 111, 111, 100, 98, 121, 101, 33 END_STRING ;______STRINGS_END______ section .textstr2 data text_string_timings: ;______TIMINGS_START______ DEFINE_TIMING TIMING_TIME(0,0.00000,0) TIMING_ALIAS('') TIMING_CUSTOM(0) TIMING_STRING(0,_string0) ; DEFINE_TIMING TIMING_TIME(4,0.00000,318315) TIMING_ALIAS('') TIMING_CUSTOM(0) TIMING_STRING(0,_string1) ; DEFINE_TIMING TIMING_TIME(20,0.00000,1591578) TIMING_ALIAS('END_TIME') TIMING_CUSTOM(0) TIMING_STRING(0,_string2) ; ;______TIMINGS_END______ dd 0xFFFFFFFF ; end-of-time