Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@israpps
Copy link
Collaborator

@israpps israpps commented Oct 30, 2025

breaking changes:

file open modes

  • FREAD becomes O_RDONLY
  • FWRITE becomes O_WRONLY
  • FCREATE gets removed (to get same effect use O_CREAT | O_WRONLY)
  • exposes O_CREAT
  • exposes O_TRUNC
  • FRDWR becomes O_RDWR

Deprecation of System.rename()

Instead, use System.moveFile()
Both functions were internally the same, so I removed rename since it's name does not match what happens inside

important changes

New return values for several functions that did not have one or had an incomplete one:

  • System.removeFile(): returns the result of C remove()
  • System.createDirectory(): returns the result of C mkdir()
  • System.removeDirectory(): returns the result of C rmdir()
  • System.closeFile(): returns the result of C close()
  • System.seekFile(): returns the result of seek() (Wich is the new seek position of this file)
  • System.readFile(): now returns both the readed data and the length of the readed data (wich may be less than what you passed as parameter!)

Also, some functions like the texture loading, will now return nil on error. Wich allows better error handling, and makes intellisense raise warnings if you didn't check if a loaded image is nil before using

these files are automatically picked up by the following vscode extension https://github.com/LuaLS/lua-language-server

and used for intellisense, helps a lot and also encourages good practices in some cases
API BREAKING CHANGE HERE:
- FREAD becomes O_RDONLY
- FWRITE becomes O_WRONLY
- FCREATE gets removed (to get same effect use O_CREAT | O_WRONLY)
- exposes O_CREAT
- exposes O_TRUNC
- FRDWR becomes O_RDWR

Seek modes remain the same name for simplicity
and add warnings if loading images or fonts and discarding their return values

now all TTF alignment tokens are forwarded to LUA
@israpps israpps marked this pull request as draft October 30, 2025 03:45
@israpps
Copy link
Collaborator Author

israpps commented Oct 30, 2025

PS2SDK broke enceladus. PR paused for now

@israpps israpps marked this pull request as ready for review October 30, 2025 20:19
@israpps israpps merged commit 21a7047 into DanielSant0s:main Oct 30, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant