Commit Graph
3 Commits
Author SHA1 Message Date
Nunuhara Cabbage 9f42ee379d Improve performance of vm_image_to_json
Use a callback-based function to create the heap JSON array. This avoids
the O(n) insertion time of cJSON_AddItemToArray.
2022-06-25 10:00:24 -07:00
Nunuhara Cabbage f01f002a54 Improve performance of vm_save_image
cJSON_AddArrayItem is O(n), which made saving arrays O(n^2). This was
causing extremely poor performance when saving large arrays, such as
those created by MultiSprite_Encode.

A special cJSON_CreateIntArray_cb function is now used instead, which
can create and populate an array in O(n).
2022-04-03 13:42:36 -07:00
Nunuhara Cabbage 5d6f148e1b Reorganize project file structure
- Create separate directories for source and header files.
- Build code shared between xsystem4 and aindump as a static library.
- Create header dirs gfx/ system4/ and vm/
- Make CG.c/h usable without a running VM
2019-12-31 17:50:40 -08:00