Commit graph

2946 commits

Author SHA1 Message Date
Andrei Alexeyev
642bdfd2d7
portrait_render: make sure to not pass 0 as viewport width/height
That would trip an assertion. May happen with the null renderer (e.g.
replay verification mode), where the fake textures are always 1x1, or
with bad sprite data.
2020-06-09 03:18:40 +03:00
Andrei Alexeyev
ae8194ae78
Various fixes & improvements for concurrent loading (#235)
- RESF_UNSAFE is removed.
- Resources that don't have to be finalized on the main thread can load
completely asynchronously.
- A thread waiting for a concurrent task to complete can start executing
that task itself if it hasn't started yet.
- Refactor the resource loading interface, add support for load-time
dependencies.
- Main-thread finalization of asynchronously loaded resources is now
spread out across multiple frames to mitigate frametime spikes.
- Remove some archaisms from the resource management code.
- Fix potential hashtable synchronization issue.
- Fix some deadlock edge cases.
- Don't spawn more worker threads than there are CPU cores (degrades
performance).
- Add TAISEI_AGGRESSIVE_PRELOAD env variable to attempt to aggressively
discover and preload every possible resource.
- Make r_texture_fill{,_region} expect optimal pixmaps, so that it's
never forced to convert them on the main thread. The optimal format may
be queried with the new r_texture_optimal_pixmap_format_for_type API.
These functions will also no longer needlessly copy the entire image
into a staging buffer - previously they did this even if no conversion
was needed.
- Other random changes to facilitate the stuff above.

The overall effect is somewhat faster load times.

Of course it's still all terrible and full of lock contention because I
suck at concurrent programming, but it's not worse than it was.
Probably.
2020-06-09 03:01:53 +03:00
Andrei Alexeyev
8692a1a05c
Fix segfault in progress file loader 2020-06-08 02:06:52 +03:00
Andrei Alexeyev
fb3d8af3b7
fix vertex layout setup for static models 2020-06-07 08:37:20 +03:00
Andrei Alexeyev
235432db37
iqm: fix loading of multi-mesh models 2020-06-06 22:07:26 +03:00
Andrei Alexeyev
ee3bec1c22
Replace .obj models with .iqm (#232)
http://sauerbraten.org/iqm/

The iqms were converted from the objs with the official iqm "compiler",
but can be also exported directly from Blender with a script from the
SDK.

In addition, indexed rendering was fixed (it's not useless anymore), and
the winding order convention changed from counter-clockwise to clockwise
to facilitate faster model loading.

A limited subset of IQM functionality is currently supported:
	- One mesh per model.
	- Only floating point data in vertex arrays.
	- Only standard vertex arrays: positions, UVs, normals,
	tangents.
	- No animations etc.

The "standard" shader interface now receives an additional vec4 tangent
attribute. This attribute is currently ignored by shaders. The bitangent
vector can be computed in a vertex shader as:
	vec3 bitangent = cross(normal, tangent.xyz) * tangent.w;

* iqm: remove axis scrambling and re-export models

* remove debug stuff
2020-06-06 18:27:08 +03:00
Andrei Alexeyev
d9ba91ecac
Fantasy Seal tweaks
- Remove movement speed penalty
- Make the balls go off a bit faster
2020-06-02 13:37:42 +03:00
Andrei Alexeyev
930d735740
boss: disable hurtbox when dying or fleeing
closes #180
2020-06-01 14:01:00 +03:00
Andrei Alexeyev
ab894e0658
update cglm 2020-05-31 17:37:43 +03:00
Alice D
9e7cbaf252
Small edits to the endings (#230)
* minor edits to the ending (proper smart-quotes, small style changes)

* more minor edits to the ending (PR changes)

* grammar tweaks

* line was too long
2020-05-23 07:24:25 +03:00
Andrei Alexeyev
7b7af8cd25
Enable rng deprecation warnings 2020-05-20 20:47:22 +03:00
Andrei Alexeyev
b7233ce801
Fix sprites without .spr files having zero area
Regression introduced in a9775c06
2020-05-20 05:52:08 +03:00
Andrei Alexeyev
1408904b1a
Add option to convert texture into linear color space on load
If "linearize = true" is specified in the .tex file, colors will be
converted from the sRGB color space into the linear RGB color space on
load. Ideally this should be the default, and we should be doing all
color manipulations in linear space, but there's too many things to fix
to make that a reality.

Additionally, "multiply_alpha = false" to prevent colors from being
multiplied by the alpha channel on load.

The texture_post_load shader will no longer be applied when the
preprocessing operation is a no-op.
2020-05-19 05:24:59 +03:00
Andrei Alexeyev
cd11971eea
tweak perfect freeze 2020-05-18 22:57:04 +03:00
Andrei Alexeyev
db9cb15d21
Split stage1 into multiple files (#228) 2020-05-18 22:44:11 +03:00
Andrei Alexeyev
bd7bb3a351
fix segfault 2020-05-17 19:19:55 +03:00
Andrei Alexeyev
7072fe447d
Revamp screen shake system (#225) 2020-05-16 23:42:22 +03:00
Andrei Alexeyev
00e4837827
Separate StageInfo-related APIs from game-stage code (#227) 2020-05-16 23:41:54 +03:00
Andrei Alexeyev
f7763fe6f4
tweak ReimuB bomb view shake 2020-05-10 19:07:18 +03:00
Andrei Alexeyev
b22aac5207
update portraits 2020-05-10 18:40:19 +03:00
Andrei Alexeyev
0331d1490d
fix usage of removed typedef 2020-05-09 13:52:15 +03:00
Andrei Alexeyev
61cbf5153c
fix wrong bgm name in stage 6 2020-05-09 13:45:30 +03:00
Andrei Alexeyev
d9a84e083d
Some texture loading optimizations 2020-05-09 13:45:29 +03:00
Andrei Alexeyev
54ca97587c
Rename cmplx32 into cmplxf for better consistency 2020-05-09 09:31:20 +03:00
Andrei Alexeyev
bd5082c0f0
Get rid of float32 and float64 typedefs
Use plain float and double when precision matters. There's no way to
consistently enforce usage of the typedefs now.
2020-05-09 09:25:38 +03:00
Andrei Alexeyev
f5f8f9fb49
Get rid of custom min() and max() functions
Use the standard fmin() and fmax() for floating point values, and ours
imin(), imax(), umin(), umax() for integers.
2020-05-09 09:16:07 +03:00
Andrei Alexeyev
0f2a6a0229
attempt to improve consistency of atlas generator output 2020-05-07 04:10:18 +03:00
Andrei Alexeyev
3b217fd015
update portraits 2020-05-07 03:46:25 +03:00
Andrei Alexeyev
b8088998d8
dialog: animate x position for multiple actors on the same side 2020-05-05 11:48:44 +03:00
Andrei Alexeyev
9deea31f06
Update portraits 2020-05-04 05:21:46 +03:00
Andrei Alexeyev
556ba2ee6f
Cancel hosted events before unregistering hosted entity 2020-05-02 01:19:15 +03:00
Andrei Alexeyev
b7a855c323
Make INIT_BOSS_ATTACK useful outside of BossAttack-conforming tasks 2020-04-30 21:49:10 +03:00
Andrei Alexeyev
31adaa7e0f
Add WAIT_EVENT_ONCE(event)
Waits for event if it hasn't been signaled yet. It if has, returns
without waiting, as if the event has just been signaled.
2020-04-30 21:49:10 +03:00
Andrei Alexeyev
354fa2718e
fix rng_irange macro 2020-04-30 21:49:10 +03:00
Andrei Alexeyev
032829656b
the stars need to align 2020-04-29 00:25:16 +03:00
Andrei Alexeyev
174a6f582e
remove bogus UV clamping from boss_zoom shader 2020-04-28 04:58:33 +03:00
Andrei Alexeyev
9bcaa36634
Revamp boss distortion effect 2020-04-28 03:53:27 +03:00
Andrei Alexeyev
8e6d2ff71e
implement vecX versions of tanh for legacy glsl 2020-04-28 02:25:24 +03:00
Andrei Alexeyev
21e9b0cbbe
Fix broken logic in GLSL_ATLEAST and ESSL_ATLEAST macros 2020-04-28 02:25:21 +03:00
Andrei Alexeyev
a7eb246664
Purge some dead code 2020-04-28 00:13:15 +03:00
Andrei Alexeyev
9f10dfef21
bunch of portrait and dialog-related shuffling around 2020-04-27 22:59:16 +03:00
Alice D
ea90164f3a
Merge pull request #221 from taisei-project/remove-swp
Delete .swp
2020-04-26 20:33:13 -04:00
Alice D
c734967d69
Delete .swp 2020-04-26 20:32:38 -04:00
Alice D
56e64498a6
Player Statistics (#219) 2020-04-26 22:27:13 +03:00
Andrei Alexeyev
7d7f1b157f
Migrate OpenGL loader to glad2 (#217)
* Migrate to glad2

* basic OpenGL 2.1+ fallback support
2020-04-26 04:10:00 +03:00
Andrei Alexeyev
a9775c065b
Store sprite texture coords in normalized form 2020-04-25 05:36:48 +03:00
Andrei Alexeyev
fb353f24a9
Update portraits and regen atlases 2020-04-25 03:52:26 +03:00
Andrei Alexeyev
3fc75a4bbd
Add stage_add_static_framebuffer
Register a stagedraw-managed framebuffer with static size
2020-04-25 03:04:33 +03:00
Andrei Alexeyev
f12fc3db0f
fix global postprocessing framebuffers not reacting to resizes 2020-04-24 00:11:54 +03:00
Andrei Alexeyev
a842ba7b7d
cli: add --version option 2020-04-23 17:47:42 +03:00