Commit Graph

75 Commits

Author SHA1 Message Date
b5a722eef0 Make a start on font rendering
I was hopeful I could use ebiten/text, but font.Face doesn't seem set
up for fixed-colour fonts.
2020-03-30 00:15:19 +01:00
27fbccdc5f Get the briefing menu linked up
Yes, that means hypertext is now a clickable.
2020-03-27 02:16:54 +00:00
c090fd32e9 Link various screens accessible from the bridge
This kind of linking is starting to creak...
2020-03-27 02:07:28 +00:00
316db89148 Get the bridge door animations running 2020-03-27 00:54:57 +00:00
79bfab7d6b We can reach the bridge \o/ 2020-03-26 23:35:34 +00:00
e4ce932324 Display overlay text in the UI
We still have fonts to do, so this is very ugly, but it at least shows
*something* on the screen now.
2020-03-26 22:09:26 +00:00
3d3a55af9d Break flow out of ordoor 2020-03-25 02:12:17 +00:00
4eb4b6e69f More menu navigation 2020-03-25 00:48:09 +00:00
7824396c24 Add stubs for unknown widget types 2020-03-25 00:23:28 +00:00
b986359047 Draw overlays 2020-03-24 23:26:21 +00:00
d376d9850c Wire the sliders into the config file
Not yet the game itself. That's still TODO.
2020-03-24 23:11:37 +00:00
20ad9ae6f8 Add a slider UI widget
I'm not too happy with how I have to configure the step for each one
separately, but it's the best I can do at the moment.
2020-03-24 22:33:26 +00:00
69971b2825 Rework the UI framework
Interface is now Driver, and Widget is now a set of interfaces with a
struct per widget type. This should make it easier to add other types.
2020-03-24 20:21:55 +00:00
bcee07e8f7 Make animations work in the options screen 2020-03-23 00:33:29 +00:00
c67ee206cd Implement hypertext (badly) 2020-03-22 23:29:40 +00:00
971b3178d6 Implement the options menu, part 1
This commit implements loading and saving options from/to config, and
enough UI toolkit magic to allow changes to boolean options to be
persisted.

We now respect the "play movies" setting and take screen resolution
from the config file.
2020-03-22 22:12:59 +00:00
0adbfaa573 Remove the -win-x and -win-y options for the ordoor binary 2020-03-22 22:12:20 +00:00
cfa56a0e12 Implement the main menu for the ordoor binary
In this commit, we also remove code that doesn't properly belong in
view-menu
2020-03-22 19:12:44 +00:00
d4d8a50ce4 Catch one more use of WH40K 2020-03-22 17:56:24 +00:00
3cb32b8962 Adjustments following kind discussion with LunarJetman on IRC 2020-03-22 17:19:26 +00:00
ba7c06e5fd Show tooltips when hovering 2020-03-22 15:37:48 +00:00
bfe9fbdf7d Start work on menu interactivity.
With this commit, we get a ui.Interface and ui.Widget type. The
interface monitors hover and mouse click state and tells the widgets
about them; the widgets execute code specified by the application when
events occur.

Next step: have wh40k load the main menu and play sound, etc.
2020-03-22 02:58:52 +00:00
bcaf3d9b58 Get view-menu to play the interface sound 2020-03-21 23:45:51 +00:00
83aa1c4768 Remove unwanted debugging prints 2020-03-21 23:14:15 +00:00
46925c09d1 Make the menu buttons work 2020-03-21 18:50:26 +00:00
be4229b8fe Remove internal/conv
This sets font rendering back a little bit, but not much.
2020-03-21 13:37:20 +00:00
4c0355ac4f HAXXX: Make videos skippable 2020-03-21 12:05:22 +00:00
8b02f534f1 Eager load used sprites 2020-03-21 10:59:07 +00:00
7a8e9dbd97 Respect sprite X and Y offsets
This makes menus display more correctly, and also fixes trees and other
objects on the main map, although it messes up bounds clipping (sigh).
2020-03-21 00:56:35 +00:00
576ac0570d Better logging 2020-03-20 00:02:27 +00:00
5fccf97f4b Lazily load sprite image data
This cuts memory use significantly, since many sprites in an object are
never used. We can get savings over time by evicting sprites when they
go out of scope, but that's, well, out of scope.

To achieve this, I introduce an assetstore package that is in charge of
loading things from the filesystem. This also allows some lingering
case-sensitivity issues to be handled cleanly.

I'd hoped that creating fewer ebiten.Image instances would help CPU
usage, but that doesn't seem to be the case.
2020-03-19 22:24:21 +00:00
34d12edc2a Use palettized images 2020-03-19 19:02:32 +00:00
d50a160f02 Use screen scaling 2020-03-19 18:44:51 +00:00
276885298a Allow ebiten.Run execution to be profiled 2020-03-19 18:36:20 +00:00
65249b59c4 Rename go module 2019-12-31 01:55:58 +00:00
c54ead71f3 ebiten: convert view-menu 2019-12-29 23:47:22 +00:00
77202d9fab ui: Add fps, tps display 2019-12-29 20:34:07 +00:00
51e066ade1 ui: run in background 2019-12-29 19:41:20 +00:00
d1a1c50afc ui: event handlers 2019-12-29 17:30:21 +00:00
6f605aa502 ebiten: convert view-obj 2019-12-29 15:38:49 +00:00
0320743b30 Play around with menus some more
We now display the buttons in Main.mnu, but a lot remains unknown.
2019-10-09 00:41:41 +01:00
997e2076d1 Start loading .fnt files. No display yet 2019-01-02 06:16:15 +00:00
568365be3a Fix a file descriptor leak in LoadMenu 2019-01-02 04:38:03 +00:00
b21767fe97 First pass at displaying Menu files 2018-12-30 23:23:08 +00:00
6d3a13fcfb Fix a typo in copy-pasted code 2018-12-30 23:22:20 +00:00
c441851a9b Don't destroy ordering information in conv.ConvertObjects 2018-12-30 23:22:01 +00:00
6f3ed56b99 Allow the windows to be resizeable 2018-12-30 23:19:21 +00:00
73804519b0 Beginnings of a WH40K.EXE implementation
So far, we just play the opening credits on an external video player.
I want to start loading and displaying the menus next. Perhaps I can
get the entire non-gameplay flow working?
2018-10-13 03:24:10 +01:00
019108bff8 Add a TOML configuration file 2018-10-13 03:23:55 +01:00
06625007fc Fix a 16-bit overflow for large objects 2018-10-13 02:38:25 +01:00