Commit Graph

197 Commits

Author SHA1 Message Date
ohsqueezy 9a6b80f443 added function for extracting a grid of tile surfaces from a larger SDL surface 2023-09-18 22:10:04 -04:00
ohsqueezy d882e111b3 - fix sb::Pad to move the collision box when scaled or translated
- add warning about config JSON copy
- add setter for sb::Pad::_plane
- move point on circle functions from extension to math
2023-09-16 21:04:43 -04:00
ohsqueezy 4c3235c2ff frame timing updated to run at maximum allowable framerate, delay between frame calls configurable, vsync flag configurable, max framerate configurable up to unlimited 2023-09-09 23:34:36 -04:00
ohsqueezy c0fe0c782d add doc comment to box scale functions 2023-09-04 16:31:10 -04:00
ohsqueezy 081328e63d store size and format of texture object, only regenerate texture and reallocate memory if size and format are changing 2023-08-16 18:57:35 -04:00
ohsqueezy e453a62679 update sprite class's private member var comments, remove extraneous quotes from texture log message 2023-08-14 16:44:25 -04:00
ohsqueezy a055001482 add method to clear texture list to sprite class, add comments explaining model class's private member vars 2023-08-14 16:30:38 -04:00
ohsqueezy edafaf08ea add texture index to Sprite class, add more error checks to texture surface creation 2023-08-08 12:41:10 -04:00
ohsqueezy 62450f7033 add support for specifying multiple keys per command in config 2023-08-02 13:17:44 -04:00
ohsqueezy 67fa7e61c3 docstring example for outputting attributes to stream 2023-07-27 23:21:14 -04:00
ohsqueezy 67c3e193f4 add more info to message when exeception is raised while enabling model attributes 2023-07-23 20:01:45 -04:00
ohsqueezy f9d171626f added more conversion rules for JSON array to GLM vertex, truncate attribute string representation, post reconfig event on configuration reload, added font load function, added exception handling to functions that bind textures 2023-07-23 17:11:41 -04:00
ohsqueezy b93aae19e0 rename sb::Text::size to sb::Text::dimensions 2023-07-22 14:00:37 -04:00
ohsqueezy 1d527898aa watch multiple config files for changes 2023-07-21 00:51:19 -04:00
ohsqueezy 27d2128e1f move post command into delegate 2023-07-19 12:47:18 -04:00
ohsqueezy cd66f70d0c attribute index exception, overload attributes bind, model add and bind methods 2023-07-18 23:23:29 -04:00
ohsqueezy d1fe6b927c move sprite and pad into sb namespace 2023-07-15 12:19:37 -04:00
ohsqueezy 7bbc0f851d minor fix to model documentation 2023-07-15 12:05:06 -04:00
ohsqueezy 9a727513a1 added sprite and pad classes 2023-07-15 11:48:08 -04:00
ohsqueezy ba8f4753bf throw exception if VBO is not bound when allocate is called, reset VBO offset on ID generation 2023-07-14 00:30:30 -04:00
ohsqueezy b9dd2836f2 add documentation to VBO header file 2023-07-13 21:51:07 -04:00
ohsqueezy 89fbe359f6 Add exception handling to Attributes::bind, add default constructor to Model 2023-07-13 21:38:53 -04:00
ohsqueezy cdd01672c3 check for texture path existence on load 2023-07-10 20:33:15 -04:00
ohsqueezy 55d6e08480 convert between glm::vec and sb::Color, print hierarchy on config access error, composite text onto a separate background surface, set frame time to zero when timer paused 2023-07-08 16:19:31 -04:00
ohsqueezy 6cb9688bec add world coordinate transformations to math library 2023-07-05 20:08:11 -04:00
ohsqueezy f7f6bee582 add support for verbose log priority 2023-07-01 19:21:06 -04:00
ohsqueezy 88cf70b828 add const qualifier to Model::size 2023-06-30 13:41:05 -04:00
ohsqueezy 3db0a3bd32 set invert Y to default for Box class, add support for any size GLM vector to JSON library 2023-06-27 14:33:14 -04:00
ohsqueezy 12e5a15d1c add exception checks to Texture::bind and GLObject::id, make collision info storage a std::optional object 2023-06-26 20:49:14 -04:00
ohsqueezy c0b55752e1 track timestamp with Timer class 2023-06-24 13:05:40 -04:00
ohsqueezy 635562263b allow arbitrary functions to be attached to animation objects instead of only node object member functions 2023-06-23 01:45:28 -04:00
ohsqueezy 5be1c38e7f make game update function pure virtual, add Animation class to sb namespace 2023-06-23 01:18:15 -04:00
ohsqueezy b02ae013ab rename velocity_to_delta to angle_to_vector, remove endpoint function 2023-06-22 21:25:57 -04:00
ohsqueezy c0852ba04f add extend vector function, 2D endpoint function, input check on wrap point 2023-06-22 14:38:56 -04:00
ohsqueezy 772c5482dd unsubscribe delegate subcribers in game's quit function and remove destructor calls to unsubscribe; delete ID memory when GL object is deleted; disable recorder because of memory leak 2023-06-11 21:49:04 -04:00
ohsqueezy aaaebc006d - use vector instead of map to store textures in Model class
- require a font to be passed to the Text class constructor
- convert default font from static member to non-static so it unloads from memory before TTF library unloads
- construct delegate object first so that it deletes last and other objects can call unsubscribe successfully
2023-06-11 01:07:15 -04:00
ohsqueezy 6371f9c279 remove Sprite class 2023-06-08 20:04:40 -04:00
ohsqueezy c16d71222d add example for using configuration's parenthesis operator 2023-06-08 18:02:04 -04:00
ohsqueezy f7368907da add parenthesis operator access to configuration 2023-06-08 17:58:20 -04:00
ohsqueezy e3941707e3 start recorder animation in game constructor after config fully loads 2023-06-08 12:56:21 -04:00
ohsqueezy 355ab4d8c4 - pass timestamp of frame start time to all update functions
- use timestamp instead of SDL_GetTicks to keep time in Timer class
- use seconds instead of milliseconds in Timer class
2023-06-07 20:22:20 -04:00
ohsqueezy 1ca956b5ac - add function for wrapping an arbitrary point or curve into an arbitrary clip space
- remove custom mod functions in favor of glm::mod
- deactivate recorder object during game construction after full config is loaded
2023-06-05 18:22:43 -04:00
ohsqueezy 824efcc71f add external resources; add alpha to plane colors 2023-06-03 01:07:18 -04:00
ohsqueezy 2f7a4cb602 - attributes objects track their offset in the VBO
- call to glVertexAttribPointer moved from VBO class to Attributes class
- added a public domain function for computing bezier points
2023-06-02 14:54:06 -04:00
ohsqueezy 9ed0e9ea71 - add a text plane class
- load default font as a static class variable, make it a shared pointer
- add filter option to texture storage
- move Color into sb namespace
- move Delegate object into protected
2023-05-31 15:06:29 -04:00
ohsqueezy e5aef6ffb8 auto merge WASM config on emscripten builds 2023-05-30 18:22:20 -04:00
ohsqueezy 9f33ac872f - move Timer into sb namespace
- debug statement for FPS
- string conversion in Switch class
2023-05-30 16:20:28 -04:00
ohsqueezy 7140e8a3eb - add untransform, transform, and specialized transforms to Model class
- reset viewport on window resize events
- add boolean assignment operator to Switch class
- throw error if GL object is generated before GL context is created
- add Selection container
- add string conversion to Box
2023-05-24 22:49:05 -04:00
ohsqueezy 3ba3be4496 - add Switch and time_it classes
- finish adding #pragma once to headers
- move configuration initialization into Game class
- print debug to stdout by default
- explicitly pass file to refresh to config auto refresh
- add delegate to sb namespace and deprecate get_delegate() in favor of delegate()
- set custom log function before loading config
- raise exception when no model textures are available
2023-05-23 15:28:53 -04:00
ohsqueezy 8c086ba161 add instructions for curl; add array operator to configuration, give configuration object access to nodes; fix src paths in android skeleton script; add copy file function 2023-05-10 02:51:11 -04:00