//String Processor //v0.1 int Preprocess_Buffer[2147447]; void PreProcessString(int address){ int strings[]={string1,string2,string3,string4,string5,string6,string7,string8,string9,string10}; int string1[214747]={ } int string2[214747]={ } int string3[214747]={ } int string4[214747]={ } int string5[214747]={ } int string6[214747]={ } int string7[214747]={ } int string8[214747]={ } int string9[214747]={ } int string10[214747]={ } //Get the address int adr_lookup; //A place to store the last located address ina string. int adr_buffer[6]; //A place to store the string address as char. int read_adr_buffer[6]; int q = 0; int e = 0; int r = 0; int t = 0; int u; int adr_index[3]; int matched_adr; //Convert the addres to char and store it in the buffer. itoa(adr_buffer,address); do { //Load each big string table from the array with their pointers for ( ; q < SizeOfArray(strings); q++ ) { //This needs to be a while loop. while ( !matched_adr ) //Scan the string, and find the $ char for ( ; w < SizeOfArray(strings[q]); w++ ) { if ( strings[q][w] == IsChar(CHAR_DOLLAR) ) { //We found an address, let's store it. adr_index[0] = q; adr_index[1] = w; //0 is the string pointer, 1 is the index with the $ token for ( e = adr_index[1]; e < SizeOfArray(adr_index[1]); e++ ) { //Find a colon if ( adr_index[1][e] == IsChar(CHAR_COLON) ) { //We found a colon, so store it... adr_index[2] = e; //2 is the index of the colon, so we know where to end the loop. //Copy the address into the buffer, and compare the two buffers. t = 0; //Clear this, as we'll need it. for ( r = adr_index[1]; r < adr_index[2]; r++ ) { read_adr_buffer[t] = adr_index[0][r]; t++; //Store into the buffer. } //Compare the read buffer to the lookup buffer. for ( u = 0; q < 6; u++ ) { if ( read_adr_buffer[u] == adr_buffer[u] ) matched_adr = 1; else { matched_adr = 0; //not a match //Go back to w, and start on the position next in the list. break; } } } } } } } while ( !matched_adr ); //Use the values that we recorded for the pointer, the first index, and the last index, and copy the string to our main buffer for processing. } }