I'm trying to write to a file (again) while using PhysFS.
How to use al_fputc() for instance, without switching to the standard file interface?
I have mounted the "./" directory as root. I'm not even sure if that's allowed, hehe. Not that I'd have any experience stringing absolute paths together with the lib.
main.cpp
al_set_physfs_file_interface(); /* Set up PhysicsFS. */ if(!PHYSFS_init(0)) std::cout << "failed initializing" << std::endl; // This creates a ~/.allegro directory, which is very annoying to say the // least - and no need for it in this example. // if (!PHYSFS_setSaneConfig("allegro", "ex_physfs", NULL, 0, 0)) // return 1; else if(!PHYSFS_addToSearchPath("data", 1) || !PHYSFS_addToSearchPath("shaders", 1)) std::cout << "failed adding search path" << std::endl; else if(!PHYSFS_mount("./", "", 1)) std::cout << "failed mounting file path" << std::endl;
writer.cpp
Writer testwriter("sheep.txt"); testwriter.write_big3(70000); //Crash
I get Assertion failed: f, file d:\Libraries\build\allegro\src\allegro-5.0.x\allegro-5.0.x\src\file.c, line 208
I realize it's an old Allegro build.
Thanks!