Commit Graph

77 Commits

Author SHA1 Message Date
c1268e8d57 Start reorganising for multiple games 2020-06-01 01:08:53 +01:00
cf58be6a20 Use map rect 2020-05-31 14:58:46 +01:00
eea5dea98a Determine the Soldiers At War palette
This commit also takes the first step towards making it configurable;
override `internal/palettes.DefaultPaletteName` at build time to choose
one palette over another. It would be nice to set this at runtime!
2020-05-19 21:33:49 +01:00
9d0750d134 Scenario viewpoint, Z index management, and arrow controls 2020-04-20 00:16:21 +01:00
6e70ddcb60 Fix some errors in iso->pix->iso conversions, add debugging
Maps now render a bit more properly, and our mouse position can be
correctly assigned to a cell. Kind of, mostly.
2020-04-18 00:12:15 +01:00
4fe9a75d69 White background 2020-04-16 15:39:06 +01:00
2b83ce4f7f Build a simple animation viewer 2020-04-16 15:30:47 +01:00
b690c763bb A few more .idx realisations, and some parsing code 2020-04-16 03:03:51 +01:00
32fd9f9aa9 More investigation into animation 2020-04-15 21:11:01 +01:00
acb7882549 Do some more file format spelunking
`WarHammer.ani` turns out to be a regular `obj` file; `WarHammer.idx`
is partially decoded, but I'm struggling to link it to the former in
a reasonable way at the moment.
2020-04-15 00:27:43 +01:00
786d261f98 Allow dialogues to be hidden or shown
To do this, MENU and SUBMENU are split into two types (at last), and
a Widget type is introduced. This should allow lots of code to be
removed at some point.
2020-04-14 03:14:49 +01:00
5f8606377a Integrate view-map into ordoor
Now we can view scenario maps from the main game interface. We can't
cancel out of a scenario yet, though.
2020-04-11 00:13:28 +01:00
f3fea83173 Reimplement cursor as a query operation 2020-04-10 20:54:58 +01:00
bb3ddc4896 First pass at custom cursor display 2020-04-10 19:55:16 +01:00
8ce24ce5f8 Display listbox text 2020-04-01 19:45:57 +01:00
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
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
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
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
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
8d48da1999 Fix bounds clipping 2020-03-21 11:48:29 +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
98fd06edd1 Forbid z index 7 2020-03-20 00:04:47 +00:00
e7d9083e6b Reorder drawn objects 2020-03-20 00:03:03 +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
73553cb8b0 Bounds checking 2020-03-18 23:23:09 +00:00
65249b59c4 Rename go module 2019-12-31 01:55:58 +00:00
e90bea4513 ebiten: convert view-map 2019-12-30 00:51:20 +00:00
c54ead71f3 ebiten: convert view-menu 2019-12-29 23:47:22 +00:00
7475bdf0e7 ebiten: convert view-set 2019-12-29 20:41:41 +00:00
32b722ae88 ebiten: Convert view-minimap 2019-12-29 19:44:36 +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
b21767fe97 First pass at displaying Menu files 2018-12-30 23:23:08 +00:00
c441851a9b Don't destroy ordering information in conv.ConvertObjects 2018-12-30 23:22:01 +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
e2d3a1a8d6 Render Z levels slightly more accurately 2018-10-13 02:02:57 +01:00
0dd44d9de7 Limit texture size to 8192x8192 pixels 2018-10-13 01:37:44 +01:00
1fa61c72c2 WIP: Speed up rendering by using a spritesheet 2018-10-12 23:02:24 +01:00
056976721c Determine the RLE format for .obj file sprite pixeldata 2018-09-08 02:00:03 +01:00
9d56dff54e Add an FPS timer 2018-03-28 01:16:52 +01:00