From bedd6906eabdd513042d6a178d4dc56a3a41d1d3 Mon Sep 17 00:00:00 2001 From: Fox Caminiti Date: Fri, 16 Dec 2022 20:16:43 -0500 Subject: v3, file/build organization --- strings.cpp | 92 ------------------------------------------------------------- 1 file changed, 92 deletions(-) delete mode 100644 strings.cpp (limited to 'strings.cpp') diff --git a/strings.cpp b/strings.cpp deleted file mode 100644 index d2acc03..0000000 --- a/strings.cpp +++ /dev/null @@ -1,92 +0,0 @@ -static bool32 Hacko = false; -static int32 EffectSel = -1; - -// I'm using the filter's grep functionality to sort the effects for us -// (probably severely suboptimal), so I'm just using this callback function to -// signal back to our code that tab has been pressed in the text edit. -static int -EffectConsoleCallback(ImGuiInputTextCallbackData* data) -{ - if (data->EventFlag == ImGuiInputTextFlags_CallbackCompletion) - { - Hacko = true; - } - return 0; -} - -static void -CopyStrings(void *Dest, void *Data) -{ - for (int i = 0; i < STRING_SIZE; i++) - { - *((char *)Dest + i) = *((char *)Data + i); - } -} - -static uint16 -String_AddToFile(memory *Memory, char *Char) -{ - uint16 FileIndex = Memory_Block_AllocateNew(Memory, F_Strings); - block_string *String = (block_string *)Memory_Block_AddressAtIndex(Memory, F_Strings, FileIndex, 0); - History_Action_Block_Swap(Memory, F_Strings, String); - String->Occupied = 1; - uint16 i = 0; - while (Char[i] != '\0') { - String->Char[i] = Char[i]; - i++; - } - return FileIndex; -} - -static bool32 -String_Compare(char *String1, char *String2, uint32 Length) -{ - for (int i = 0; i < Length; i++) { - if (String1[i] != String2[i]) - return 0; - } - return 1; -} - -static uint32 -String_Length(char *Char) -{ - int32 i = 0; - while (Char[i] != '\0') { - i++; - } - return i; -} - -static void -String_Copy(char *String1, char *String2, uint32 Length) -{ - int32 i = 0; - while (i < Length) { - String1[i] = String2[i]; - i++; - } -} - -static void -String_Append(char *String1, char *String2, uint32 Length) -{ - int32 i = 0; - while (String1[i] != '\0') { - String1[i] = String2[i]; - } -} - -static void -String_PathToLayerName(char *Path, char *Dest) -{ - uint32 i = 0; - uint32 LastSlash = 0; - while (Path[i] != '\0') { - if (Path[i] == '/') - LastSlash = i; - i++; - } - for (int s = 0; s < i - LastSlash; s++) - Dest[s] = Path[s + LastSlash + 1]; -} -- cgit v1.2.3