1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-06-16 06:29:37 +00:00
Commit Graph

24 Commits

Author SHA1 Message Date
Peter Evans
281544bf43 Avoid polling for events until we're ready for a frame redraw
This change drastically cuts the number of times we poll for events, and
consequently drastically speeds up the number of frames we can draw
within any given span of time.

In other words, we go from "this barely moves as fast as the actual
Apple II" to "holy shit this moves so fast".
2018-04-06 11:47:54 -05:00
Peter Evans
df960220ef First crack at lo-res graphics 2018-03-11 23:28:28 -05:00
Peter Evans
92ee67c8d8 Allow us to signal that we should exit 2018-02-05 00:35:04 -06:00
Peter Evans
f36bba2e83 Add extern for the prepare function 2018-01-24 20:05:19 -06:00
Peter Evans
775a145480 Rework screen display logic for more efficiency 2018-01-23 14:52:16 -06:00
Peter Evans
bf529d6c9b Finish map, mapper handling for keyboard events
We still need to revise the test code we currently have for handling
keyboard functions; I imagine some code will need to be removed.
2018-01-17 01:07:31 -06:00
Peter Evans
b1177784a0 Allow access to the last key pressed and key_pressed status 2018-01-16 23:42:10 -06:00
Peter Evans
b2add9c3de Move vm_area logic into its own file 2018-01-07 20:05:02 -06:00
Peter Evans
1942a75d9e More documentation; remove DEFWIDTH/DEFHEIGHT 2017-12-27 17:14:54 -06:00
Peter Evans
6a230341e1 Make vm_area_set be an inline function.
Gets most of the benefits of being a macro, but also gains type safety
(which macros do not have).
2017-12-27 17:10:51 -06:00
Peter Evans
30223e0bca Remove screen area field; document area fields 2017-12-27 16:59:56 -06:00
Peter Evans
efb8f04555 Use vm_area for draw_rect.
This simplifies and to some degree normalizes the way we reference areas
in the vm subsystem.
2017-12-27 16:42:30 -06:00
Peter Evans
c7b830bb4a Switch references from SDL_Rect to vm_area
We still use SDL_Rect internally, but we want to abstract the use of it
in our API. The only thing the rest of the app should care about is the
vm_area struct.
2017-12-27 16:31:02 -06:00
Peter Evans
89a6161272 Reorganize header files 2017-12-26 16:47:34 -06:00
Peter Evans
b1c146c62d Add ability to set logical size of window at any time
We also removed the scale field, as the screen does not expect to manage
its own logical coordinates in SDL.

Additionally, we added an xcoords and ycoords function to the screen
externs so that you don't have to "know" that screen has those as
fields.
2017-12-20 16:44:24 -06:00
Peter Evans
4ef9e50792 Really basic implementation of SDL2.
Plus a crappy rectangle to prove that our vm screen code is working in
principle. (It will be removed shortly.)
2017-12-17 23:31:56 -06:00
Peter Evans
ad37d59b2d Remove references to OpenGL/GLFW/GLEW 2017-12-17 20:20:11 -06:00
Peter Evans
83dcfaf646 Add glew, defines for width/height 2017-12-17 19:09:54 -06:00
Peter Evans
a73c15c37c Rename vm_screen_context to vm_screen 2017-12-17 16:42:05 -06:00
Peter Evans
8beb761535 Actually show a window.
This is also the beginning outline of how we want to abstract graphics
away in erc.
2017-12-16 23:38:59 -06:00
Peter Evans
b646bfc511 First stab at adding graphics.
This involves using glfw. This first commit creates a window but doesn't
do anything with it; it also just hangs until you can escape out
somehow.
2017-12-16 22:45:39 -06:00
Peter Evans
dccf80be5d More documentation 2017-12-06 21:37:14 -06:00
Peter Evans
3cebed2377 Adding all of the instruction files 2017-12-02 13:05:53 -06:00
Peter Evans
237d5e3cb6 First commit 2017-11-21 23:24:51 -06:00