Nunuhara Cabbage
de7cbf1c1e
Merge pull request #87 from kichikuou/reign
...
ReignEngine improvements
2022-12-16 21:53:33 -08:00
kichikuou
8c72c5b5e0
ReignEngine: Normalize vectors after applying normal_transform
...
normal_transform can be non-orthogonal, so after transforming with it
direction vectors must be normalized.
This fixes a bug where President Garter is rendered too specular.
2022-12-17 10:59:16 +09:00
kichikuou
9a6553f215
ReignEngine: Fix glTexImage2D arguments for shadow renderer
...
GL_DEPTH_COMPONENT is not a valid value for internalFormat in OpenGL ES.
2022-12-17 10:59:16 +09:00
kichikuou
3ef252c68b
ReignEngine: Improve z-sorting
...
This fixes billboard rendering issue in some dungeons.
* For polygon models, use its AABB's center coordinates.
* Consider the camera angle, i.e. sort by view-space Z-coordinate
instead of world-space Z-coordinate.
2022-12-17 10:59:16 +09:00
kichikuou
6cc0bd7cb4
ReignEngine: Implement (both) mesh attribute
...
I'm not sure what it means exactly, but at least it disables shadow
drawing (but does not disable shadow casting).
2022-12-17 10:59:16 +09:00
kichikuou
02b0c8c80c
ReignEngine: Implement (nomakeshadow) mesh attribute
2022-12-17 10:59:16 +09:00
Nunuhara Cabbage
a0f4f9a4ab
Merge pull request #86 from kichikuou/effect
...
Implement EFFECT_TV_SWITCH_ON
2022-12-11 16:42:37 -08:00
kichikuou
86bee21a9d
Implement EFFECT_TV_SWITCH_ON
...
Used in Toushin Toshi 3.
2022-12-11 21:48:02 +09:00
Nunuhara Cabbage
4897dbf3c7
Merge pull request #85 from kichikuou/reign
...
ReignEngine improvements
2022-12-10 13:42:57 -08:00
kichikuou
b79eb9ccea
ReignEngine: Do not WARNING() on SetBackCGName("")
...
It just unloads current CG.
2022-12-10 11:34:34 +09:00
kichikuou
408f35f4ec
Fix ReignEngine.SetInstanceScaleZ
2022-12-10 11:26:14 +09:00
kichikuou
5b9e7ac7e4
ReignEngine: Correctly mark transparent materials
...
There are two types of transparent materials: materials that have an
alpha map and materials that have a color map with an alpha channel.
This change makes the latter to be considered transparent.
2022-12-10 11:25:42 +09:00
kichikuou
c5b0122d72
ReignEngine: Use glDepthFunc(GL_LEQUAL) when drawing billboards
...
So that multiple billboards overlapping on a plane are rendered
correctly.
2022-12-10 11:24:38 +09:00
Nunuhara Cabbage
0d83bce07d
Merge pull request #84 from kichikuou/R_NOTE
...
Implement R_NOTE instruction
2022-12-04 07:52:41 -08:00
kichikuou
f78013b70b
Implement R_NOTE instruction
...
It corresponds to the !== operator.
2022-12-04 17:14:19 +09:00
Nunuhara Cabbage
592e7c3f9f
Merge pull request #83 from kichikuou/data-hll
...
Implement Data.hll
2022-12-03 22:54:09 -08:00
kichikuou
f152f41d0a
Implement Data.hll
...
No AliceSoft game uses this, but it's included in the System4 SDK and
used by some indie games.
2022-12-03 09:47:16 +09:00
Nunuhara Cabbage
7aaa19404c
Merge pull request #82 from kichikuou/mmap
...
Do not use ARCHIVE_MMAP on 32-bit systems
2022-11-26 20:34:01 -08:00
kichikuou
6efa31454d
Do not use ARCHIVE_MMAP on 32-bit systems
...
Some games have assets that are too large to mmap everything on a 32-bit
address space. For example, TT3 has a total of 2.82GB of assets, which
is too large for the 3GB address space limit of 32-bit Linux. On Android
it's even stricter and mmaps of hundreds of MB can fail.
2022-11-26 22:29:57 +09:00
Nunuhara Cabbage
31e91cc3ad
Merge pull request #81 from kichikuou/font
...
font_freetype: Consider glyph information for horizontal positioning
2022-11-24 19:25:08 -08:00
Nunuhara Cabbage
b9637a59ff
Merge pull request #80 from kichikuou/drawtype
...
ReignEngine: Implement {Get,Set}InstanceDrawType
2022-11-24 19:16:50 -08:00
kichikuou
638de2057a
font_freetype: Consider glyph information for horizontal positioning
...
When creating a block-sized texture from a glyph, use the bitmap_left
field of FT_GlyphSlot instead of just centering it horizontally.
This improves positioning of punctuation marks in Japanese text.
2022-11-20 12:02:18 +09:00
kichikuou
28f95bfe38
ReignEngine: Implement {Get,Set}InstanceDrawType
...
Billboards of draw type 1 are drawn with additive blending.
2022-11-20 09:47:10 +09:00
Nunuhara Cabbage
c296ca1682
Merge pull request #79 from kichikuou/cursor
...
Implement Cursor.Set HLL function
2022-11-19 08:32:59 -08:00
kichikuou
33760da0fa
Implement Cursor.Set HLL function
...
In Toushin Toshi 3, it is used only to show / hide the mouse cursor.
2022-11-19 21:46:11 +09:00
Nunuhara Cabbage
36d2216e66
Merge pull request #78 from kichikuou/reign
...
ReignEngine: Per-mesh control of drawing order
2022-11-16 20:20:56 -08:00
kichikuou
00d1d01353
ReignEngine: Per-mesh control of drawing order
...
Before this, the order of drawing was determined on an instance-by-
instance basis. Instances with even a single transparent material were
drawn after fully opaque instances.
After this, first the opaque meshes in all instances are drawn, and then
the transparent meshes are drawn from the nearest to the farthest.
2022-11-13 14:20:31 +09:00
Nunuhara Cabbage
a3e3232825
Update libsys4
2022-11-11 20:28:45 -08:00
Nunuhara Cabbage
eec9663145
Merge pull request #77 from kichikuou/tt3
...
ReignEngine improvements
2022-11-09 16:37:53 -08:00
kichikuou
5f17dafdf8
ReignEngine: Set correct initial value for fog parameters
...
This fixes rendering issue of the model viewer in Alice's Mansion.
2022-11-05 22:17:38 +09:00
kichikuou
581593f9b5
ReignEngine: Support (env) mesh attribute
...
If specified, the mesh should be rendered with environment mapping
using the material's COLOR_MAP as a matcap texture.
2022-11-05 20:56:26 +09:00
kichikuou
241f631d9d
ReignEngine: Set loop frame range for particle effects
...
Without this, update_motion cannot calculate current_frame correctly
when the effect is used with RE_MOTION_STATE_LOOP state.
2022-11-05 20:56:26 +09:00
kichikuou
814ebb7d3d
ReignEngine: Support (sprite) material attribute
...
If specified, alpha test is used instead of alpha blend.
2022-11-05 20:56:25 +09:00
kichikuou
1a9a2e9753
ReignEngine: Support (nolighting) mesh attribute
...
In ReignEngine, the mesh name field may contain keywords that change
rendering behavior. The "(nolighting)" keyword disables lighting and
fog.
2022-11-05 20:56:25 +09:00
kichikuou
31823f5731
ReignEngine: Draw instances in z-order
...
To get correct blending effect for overlapped transparent objects.
2022-11-05 20:56:25 +09:00
Nunuhara Cabbage
835679205c
Merge pull request #76 from kichikuou/overflow
...
Fix integer overflow in audio_mixer.c
2022-10-22 09:30:22 -07:00
kichikuou
88268b084c
Fix integer overflow in audio_mixer.c
...
This fixes a bug in Toushin Toshi 3 where the audio thread crashes when
battle ended, after exploring the second dungeon for (INT_MAX / 44100)
milliseconds (~= 50 secs).
2022-10-22 10:23:22 +09:00
Nunuhara Cabbage
76aba9cd6b
Merge pull request #75 from kichikuou/tt3
...
Fixes / improvements for Toushin Toshi 3
2022-10-12 20:05:20 -07:00
kichikuou
2370052b54
ReignEngine: Fix bone mapping between model and motion
...
Some motion files (e.g. maidsan_ahoge_* and otokomae_*) have wrong bone
IDs, so bone names should be used to look up matching bones in the
model.
However, this does not always work because masokan.POL has multiple
bones with the same name. In that case ID matching must be used.
2022-10-10 14:20:20 +09:00
kichikuou
252f1b5464
Fix out-of-bounds access in MsgSkip HLL
...
Toushin Toshi 3 calls MsgSkip.{Get,Set}Flag with msgnum = -1.
2022-10-10 14:20:20 +09:00
kichikuou
5c288f87e5
Implement EFFECT_TV_SWITCH_OFF
...
Used in Toushin Toshi 3.
2022-10-10 14:20:20 +09:00
Nunuhara Cabbage
0dec3ff5eb
Merge pull request #74 from kichikuou/gles
...
Fix text rendering issue in OpenGL ES
2022-10-03 21:54:32 -07:00
kichikuou
3f1d76cd9f
Fix text rendering issue in OpenGL ES
...
This fixes an issue where text is not rendered on Android.
In OpenGL ES3.0, GL_RED is not a valid value for the internalFormat
parameter of glTexImage2D.
2022-10-03 21:59:30 +09:00
Nunuhara Cabbage
bc852567f2
Merge pull request #73 from kichikuou/gles
...
Fix shader compilation errors in OpenGL ES
2022-10-01 10:37:52 -07:00
Nunuhara Cabbage
11356db636
Merge pull request #72 from kichikuou/reign
...
ReignEngine improvements
2022-10-01 10:34:19 -07:00
kichikuou
1ae812ff03
Fix shader compilation errors in OpenGL ES
2022-10-01 16:41:51 +09:00
kichikuou
3615223b52
ReignEngine: Implement alpha mapping
2022-10-01 16:24:20 +09:00
kichikuou
fbf74db7a4
ReignEngine: Fix rim lighting for very small rim_exponent values
2022-10-01 16:24:16 +09:00
kichikuou
773cce03eb
ReignEngine: Implement camera quake effect
2022-10-01 16:24:13 +09:00
Nunuhara Cabbage
8d0cf7cdcb
Merge pull request #71 from kichikuou/particle
...
ReignEngine: Implement particle rendering
2022-09-26 17:04:34 -07:00