| 204 | } |
| 205 | |
| 206 | void writeline(char *format, ...) { |
| 207 | char buffer[2048]; |
| 208 | va_list marker; |
| 209 | va_start(marker, format); |
| 210 | std::vsprintf(buffer, format, marker); |
| 211 | va_end(marker); |
| 212 | |
| 213 | MassScriptEditContent += buffer; |
| 214 | MassScriptEditContent += "\r\n"; |
| 215 | |
| 216 | MassScriptEdit->SetWindowText(MassScriptEditContent.GetBuffer(0)); |
| 217 | Descent->defer(); |
| 218 | |
| 219 | int total_lines = MassScriptEdit->GetLineCount(); |
| 220 | int curr_index = MassScriptEdit->GetFirstVisibleLine(); |
| 221 | if ((total_lines - curr_index) > 16) { |
| 222 | // we need to scroll down a line |
| 223 | MassScriptEdit->LineScroll((total_lines - curr_index) - 16); |
| 224 | } |
| 225 | } |
| 226 | |
| 227 | uint8_t DetermineScriptType(char *filename) { |
| 228 | CFILE *file; |