| 3912 | } |
| 3913 | #if (defined(EDITOR) || defined(NEWEDITOR)) |
| 3914 | else if (ISCHUNK(CHUNK_SCRIPT)) { |
| 3915 | #if (defined(EDITOR) || defined(NEWEDITOR)) |
| 3916 | if (FindArg("-savescript")) { |
| 3917 | char path[_MAX_PATH], name[_MAX_PATH]; |
| 3918 | ddio_SplitPath(filename, path, name, NULL); |
| 3919 | strcat(path, name); |
| 3920 | strcat(path, ".scr"); |
| 3921 | CFILE *ofile = cfopen(path, "wb"); |
| 3922 | uint8_t buf[1000]; |
| 3923 | int n = chunk_size, r; |
| 3924 | while (n) { |
| 3925 | r = cf_ReadBytes(buf, std::min(n, static_cast<int>(sizeof(buf))), ifile); |
| 3926 | cf_WriteBytes(buf, r, ofile); |
| 3927 | n -= r; |
| 3928 | } |
| 3929 | cfclose(ofile); |
| 3930 | } |
| 3931 | #endif // ifdef EDITOR |
| 3932 | } |
| 3933 | #endif |
| 3934 | else if (ISCHUNK(CHUNK_SCRIPT_CODE)) { |
| 3935 | // Level_script = D3XLoadProgram(ifile); -- ripped out |
nothing calls this directly
no test coverage detected