Commit graph

31 commits

Author SHA1 Message Date
Stephen Seo e79b95c482 Get argc/argv when using WinMain 2020-08-11 12:08:49 +09:00
Stephen Seo 4219b79ed8 Fix header usage in MSVS build 2020-08-09 17:00:27 +09:00
Stephen Seo bfe92f50f9 Add SFML info to README.md 2020-08-09 16:23:12 +09:00
Stephen Seo 9c7c423247 Fix build with MS Visual Studio 2020-08-09 16:14:33 +09:00
Stephen Seo 674ffce5d4 Update README.md 2020-08-09 15:32:21 +09:00
Stephen Seo 2ea40ebe8d Add README.md, LICENSE 2020-08-09 15:26:49 +09:00
Stephen Seo d30a792aca Impl edit tri color, and more
Added way to select and edit colors of placed Tris.
Added third_party catch unit test framework that builds the UnitTest in
Debug builds.
Refactor internal use of notification_text.
Rename src/imgui_helper.hpp to src/helpers.hpp
Added some helper functions, including "is_within_shape" (used for
selecting a Tri).
Fixed use of flags in helpers not using enum values.
2020-08-04 21:13:17 +09:00
Stephen Seo 72e1675f5f Fix memory corruption bug
Increased buffer for notificationText. Previous implementation wrote to
notificationText but was possible for buffer overflows when writing to
it with strcpy. Also fixed by using strncpy instead of strcpy.
2020-08-03 16:01:38 +09:00
Stephen Seo 298073d850 Use enum for flag values 2020-08-02 19:59:18 +09:00
Stephen Seo 508ed0d7d4 Impl changing window size 2020-07-30 20:11:57 +09:00
Stephen Seo c386dcd8d9 Impl pick color from what was drawn
Some refactoring around "notification" window.
2020-07-29 17:53:39 +09:00
Stephen Seo ada25dc852 Rename "include" to less ambiguous "build_include" 2020-07-24 17:57:43 +09:00
Stephen Seo ffc3848d96 Add close button to windows without one 2020-07-24 17:55:39 +09:00
Stephen Seo c278bddc27 Decouple drawing selected points from drawing tris 2020-07-22 21:17:49 +09:00
Stephen Seo fea2379d58 Fix render bug by setting cache dirty on start 2020-07-22 20:43:42 +09:00
Stephen Seo bcf94cd105 Fix draw cache not redrawing after color picking
Also fix being able to draw when help window is open.
2020-07-22 19:09:05 +09:00
Stephen Seo a6517b8982 Render to cache that only updates on click
This is to prevent slowdown when drawing per frame. Previously, the
program would draw each individual triangle each frame. Now the draws
are cached to a texture that is drawn each frame, and the cache is
recreated on click or undo/redo events.
2020-07-22 19:03:33 +09:00
Stephen Seo 3d266137d7 Impl saving image with "S" 2020-07-22 18:19:34 +09:00
Stephen Seo 099b0e65d6 Impl changing background color, with "B" 2020-07-22 17:46:20 +09:00
Stephen Seo 4a90dd41e6 Dont save window settings for help windows 2020-07-22 16:30:16 +09:00
Stephen Seo 187c52bf5f Impl choosing colors by color picker menu "C" 2020-07-22 16:26:57 +09:00
Stephen Seo 7c71ce4d1b Add starting help info, impl undo tri in progress 2020-07-22 16:12:21 +09:00
Stephen Seo 20418c9a5a Impl undo/redo with U/R keys 2020-07-22 15:33:09 +09:00
Stephen Seo d7b8dd23a9 Impl drawing of white triangles 2020-07-22 15:28:36 +09:00
Stephen Seo b9d7a0496d Some restructuring of State 2020-07-22 15:19:37 +09:00
Stephen Seo 2fe86ad368 Move logic/data to state
Also set "H" key to toggle help window instead of only showing when "H"
is pressed down.
2020-07-22 15:11:21 +09:00
Stephen Seo 34d1955bd1 Fix check for git submodules 2020-07-22 15:02:38 +09:00
Stephen Seo 204aeb8a9a Some work on mouse input to tri 2020-07-21 20:44:10 +09:00
Stephen Seo 1434948db9 Impl some structure to the project 2020-07-21 20:34:39 +09:00
Stephen Seo 26c7aacea0 Impl basic drawing, a basic start to the program 2020-07-21 20:15:10 +09:00
Stephen Seo 5a7f214a5d Init skeleton project 2020-07-21 20:03:22 +09:00