README 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. Voxelands - rewritten in C
  2. What to do with this repo:
  3. clone it
  4. pick some functionality from the current tree
  5. rewrite it in C(89)
  6. commit it here
  7. if something needs a bit of boilerplate, darkrose probably already has it - ask
  8. libs included here already:
  9. array.h - gives dynamic arrays
  10. crypto.h - some some basic hashes, base64, etc
  11. file.h - interact with files as memory buffers, use this to load/read/write/save files, also useful for replacing stream buffers in cpp
  12. list.h - linked list code, any struct with the four prev/next/first/last pointers can use this
  13. nvp.h - name/value pair, basic hash table on top of a linked list, use for config, or to replace cpp std::map
  14. path.h - path resolution, use this to get the path of a file
  15. thread.h - threads and mutexes, can safely lock a mutex twice from the same thread without locking up
  16. common.h - includes some 3D maths, logging, and config functions, as well as some string functions (including cross-arch strdup)
  17. - also has some macros for exposing functions in headers
  18. - and some common/useful structs (vectors, positions, colours, quaternions, rectangles, collision boxes, etc)
  19. SOME TODO:
  20. collision.c is waiting on content*.c/h for getting block data
  21. log.c is waiting on ui and in-game console
  22. Makefile.mingw-cross/other-platform need writting
  23. crypto needs sha1
  24. content can probably start going in, very little graphics support in content features at the moment though
  25. help system in command system needs implementing, also help function should list all commands
  26. COMMANDS:
  27. commands will eventually work the same from the in-game console (prefixed with /), from the system console, in config files, and on the command line when starting the client or server:
  28. so far only config files and command line are implemented.
  29. bind <name> [<modifier>+[...]]<key-or-button>
  30. - bind a key or mouse button, with optional modifiers (ctlr,alt,shift,super)
  31. - to a command or event, <name> must be a single-word command or event
  32. - a key is typically a single character (eg: k,Ä,w), or key-name (eg: space, up)
  33. - a mouse button is one of mouse-left, mouse-centre, mouse-right, scroll-up, scroll-down
  34. alias [name] [command]
  35. - alias a command to another command, helps with keybindings, as multi-word
  36. - commands can be aliased to a single word,
  37. - eg: alias fullscreen set wm.fullscreen true
  38. - if no command is given, will unalias (delete) the <name> command
  39. - if no arguments are given, will list all aliases
  40. set <name> <value>
  41. - set config setting <name> to <value>
  42. get <name>
  43. - prints the value of config setting <name> to console (not yet implemented)
  44. unset <name>
  45. - unset config setting <name>, this restores the default value
  46. exec <file>
  47. - execute the commands in <file>
  48. ignore <file>
  49. - set the ignore flag for <file>, this will prevent a file from being loaded
  50. - such as automatically loaded files (default.cfg) or files loaded from exec in
  51. - other config files
  52. - will also prevent a file from having config saved to it
  53. - note that `exec <file>` removes this flag when used after initial config loading
  54. help [command]
  55. - shows a list of commands, or help for a command (not fully implemented)