With all the graphic problems some people are having with CE I've gone ahead and, with a little prodding from Boots, uploaded the CE script editor as a standalone program (first post). That way those who do not like the editor or those that can't get the editor to work can still use the script portion for their mods.
Celtic Minstrel said:
I recommend wxWidgets – it seems fairly simple to use. Then again, converting your current code to use it would probably be a lot of work...
Thanks for the suggestion. I'll check it out but you're right it would be a lot of work.
Celtic Minstrel said:
I think OpenGL wouldn't be such a good choice for the graphics, actually, since it's more for 3D stuff. SDL is good for 2D stuff, but for this I think it's better to use widget toolkits that support drawing directly in windows (which you're already doing, of course
).
True OpenGL is way more than is needed for this since it's basically just bitmap stretching and masking but I want to learn it anyways. Plus the current method used doesn't seem to work properly for all people. I haven't heard of SDL before but again this would require a lot of rework of code to use.
Celtic Minstrel said:
But why do you even need a limit? Just use a std::string. Or if for some reason you don't want to (I notice you're not using the standard library at all) you can seek to the end of the file, check the file position, and allocate that much memory.
The limit I was referring to is actually built into Cave Story itself. Of course, dynamically allocating the appropriate memory would be easy but why allow scripts of any size when Cave Story won't read them correctly? Currently I've just adjusted the script buffer size in Cave Story up to 500,000 characters but dynamically changing this would be far more complicated than it would be worth for the scope of this editor.