Hello, I am making a level editor for the game I'm working on!
I am using SDL and C++
My problem is... I want to make it so you can resize the level after you already made the map... why this is an issue is because the maps are saved like so.
Is there any command that only jumps to the end of ONE line? because ive been looking for one and it kept saying eof, but that jumps to the end of the whole file.
You can not go to the end of a line in a file and simply add a new object at the end of it... this would overwrite the next few bytes (depending on the sice of the new one) instead of adding it...
The most fitting practice would be to read the whole file into a buffer (or multiple buffers - one for each existing line -) and add the data there.
Then write the buffer´s content(s) back to the file...
MAC = Entertainment
Linux = Programming
Windows = Games
That's ridiculous. All of those operating systems are general-purpose. You can play games on a Mac or on Linux (Steam and the Source engine were ported to Mac recently, and there's also WINE), you can program on a Mac or on Windows and you can do "entertainment" on Linux and Windows.
edward wrote:
i don't have anything against windows
edward wrote:
windows users i tell you haha
Well clearly, you assume all it's users are idiots...
i know, but with Linux it automatically detects it anyway
That's nothing to do with Linux. That's the file manager you're using. And it doesn't "automatically detect" anything. It just checks the file's mime-type (which I assume is stored somewhere) and whether or not it's executable to see what kind of file it is, what image to display as an icon for it, and what to do when the user tries to open it.