Commit Graph
69 Commits
Author SHA1 Message Date
Nunuhara Cabbage 50a719ba76 Implement DrawGraph.FillAMap{Over,Under}Border
Used in Alice 2010.
2021-05-14 18:35:29 -07:00
Nunuhara Cabbage 291bb82be6 Implement DrawGraph.CopyStretchWithAlphaMap 2021-05-13 18:34:17 -07:00
Nunuhara Cabbage 4120e344f1 Fix SACT2.SP_CreatePixelOnly
Create pixel-only textures as RGB (no alpha). This fixes some issues
with DrawGraph functions writing to an alpha channel that shouldn't
exist (e.g. causes black screen in Haru Urare).

This doesn't fix the analogous issue for CGs which shouldn't have an
alpha channel.
2021-05-10 22:11:28 -07:00
Nunuhara Cabbage 713a612d2c Implement DrawGraph.CopyWithAlphaMap
Used in Haru Urare.
2021-05-09 16:19:57 -07:00
kichikuou adb558c67c Initial implementation of DrawDungeon.hll (Rance VI)
In addition to DrawDungeon.c, this adds the following files in
{src,include}/dungeon/:

- dgn.{h,c}: Parser for .dgn (map data)
- dtx.{h,c}: Parser for .dtx (textures)
- tes.{h,c}: Parser for .tes (sound IDs associated with textures)
- dungeon.{h,c}: Renderer main routines
- mesh.{h,c}: Renderer for walls and stairs
- skybox.{h,c}: Renderer for background cubemap
- event_markers.{h,c}: Renderer for event markers

And the following changes are made to the existing graphics code:

- sact_Update() calls dungeon_update(), so that event markers animate
- gfx_render_texture() renders vertically flipped image when
  texture.flip_y == true (see the comment in dungeon_context_create())

Some features are not implemented yet, including 2D maps and door
animation.

This makes cglm a dependency.
2021-05-08 22:42:57 +09:00
kichikuou e5cb875f9b Implement DrawGraph.BlendAMapColor and DrawGraph.BlendDA_DAxSA
And fixes DrawGraph.SubDA_DAxSA.
2021-05-08 20:52:48 +09:00
Nunuhara Cabbage 0fb1ef1c05 Implement DrawGraph.FillWithAlpha
Used in Vanish!
2021-05-02 18:05:40 -07:00
Nunuhara Cabbage ffc08d40f0 Implement DrawGraph.SubDA_DAxSA
Used in ほいっぷハニー.
2021-04-22 20:25:47 -07:00
Nunuhara Cabbage f282c69266 Implement DrawGraph.CopyColorReverse
Just a copy operation that inverts colors. Used in Rance VI Sonogo.
2021-04-22 19:20:12 -07:00
Nunuhara Cabbage 7a5db00085 Merge branch 'mac-opengl' of https://github.com/kichikuou/xsystem4 into kichikuou-mac-opengl 2020-09-03 10:18:43 -07:00
Nunuhara Cabbage a901404d3c Declare global variables extern in headers
Recent versions of gcc seem to emit symbols for unadorned declarations,
leading to linker errors.
2020-09-03 10:15:25 -07:00
kichikuou 7fcacb3c16 Fix OpenGL issues on MacOS
MacOS does not support OpenGL compatibility profile, so the following
changes had to be made:

- Replaced deprecated texture2D() with texture() in shaders
- Renamed `texture` uniform variable to `tex`, to avoid name conflict
- Use VAO, which is mandatory in OpenGL 3 core profile
2020-09-03 23:16:08 +09:00
Nunuhara Cabbage d9e50ab809 Implement DrawGraph.blend 2020-08-27 17:22:03 -07:00
Nunuhara Cabbage d9d8a201e8 Implement miscellaneous HLL functions
Reduce console spam by implementing some commonly used functions.

DrawGraph.SetFontName
SACT2.Mouse_SetPos
SACT2.Sound_ReverseLR
2020-08-16 19:57:46 -07:00
Nunuhara Cabbage 45ebe96220 Handle explicitly set char spacing
Handle char spacing set up by SACT2.SP_SetTextCharSpace and
DrawGraph.SetFontSpace.
2020-08-15 10:33:23 -07:00
Nunuhara Cabbage 80f0e7b436 Allow specifying font paths on command line 2020-08-05 19:53:23 -07:00
Nunuhara Cabbage c2aae50dca Various improvements to SengokuRanceFont/fnl 2020-07-30 20:55:17 -07:00
Nunuhara Cabbage f164480f35 Initial fnl (bitmap) font rendering implementation
Enough to get text on the screen, but it isn't pretty. No antialiasing,
kerning, vertical placement isn't correct, probably the size isn't even
quite correct, etc.
2020-04-25 08:09:13 -07:00
Nunuhara Cabbage 5d6f148e1b Reorganize project file structure
- Create separate directories for source and header files.
- Build code shared between xsystem4 and aindump as a static library.
- Create header dirs gfx/ system4/ and vm/
- Make CG.c/h usable without a running VM
2019-12-31 17:50:40 -08:00