Commit graph

21 commits

Author SHA1 Message Date
Andrei Alexeyev
be7905d6a3
src: run upkeep 2024-05-17 04:58:47 +02:00
Andrei Alexeyev
c2810e228d
all: use re()/im() macros 2023-09-28 17:43:14 +02:00
Andrei Alexeyev
83708429af
util/geometry: remove bogus attr_pure from rect_join 2023-05-26 02:27:14 +02:00
Andrei Alexeyev
84e44fba12
util/geometry: remove bogus attr_pure from rect_rect_intersection
Causes gcc to miscompile calls to this function, assuming it doesn't
actually write to *out. Breaks ReimuB.
2023-05-26 02:25:00 +02:00
Andrei Alexeyev
bbe6bb33bc
util/geometry: add as_array accessors to FloatOffset, FloatExtent, and FloatRect 2023-01-14 15:00:54 +01:00
Andrei Alexeyev
8d2ee76710
replace include guards with #pragma once 2021-08-31 23:34:46 +03:00
Andrei Alexeyev
1ae8811bc4
lasers: improve collision; move to lasers/
Moved quantization out of the draw code. The laser is now quantized once
per frame, and the segment data is used for both collisions and
rendering. Player motion is now accounted for as well, preventing
phasing through thin lasers. The overall result is more precise *and*
faster collision detection.
2021-08-25 11:58:08 +03:00
Andrei Alexeyev
20b360fbd9
geometry: rework lineseg_circle_intersect; add a few useful functions
Fixed a false negative in lineseg_circle_intersect that could occur when
the closest point lies outside the line segment, yet the segment is
still within the circle's radius. Optimized to avoid square roots. Added
functions for querying the closest point on a line segment without
distance restrictions.
2021-08-23 03:46:52 +03:00
Andrei Alexeyev
54ca97587c
Rename cmplx32 into cmplxf for better consistency 2020-05-09 09:31:20 +03:00
Andrei Alexeyev
90b8fa0ef0
spice up cirno's first boss non 2020-03-04 22:26:51 +02:00
Andrei Alexeyev
fb19028ed5
New dialogue system powered by coroutines 2020-03-04 22:26:50 +02:00
Andrei Alexeyev
80b1026d08
Don't redefine standard complex macro; use a new cmplx typedef
This also introduces `float32`, `float64`, and `real` typedefs to be
used in place of `float` and `double` later. `real` is for game code and
other places where we don't particularly care about the precision and
format of the underlying type, and is currently defined to `double`.
`float32` and `float64` should replace `float` and `double` respectively
2019-11-22 05:38:48 +02:00
Andrei Alexeyev
5a23fb95fc
make upkeep script preserve existing copyrights 2019-08-03 20:44:22 +03:00
Andrei Alexeyev
583f0dbf26
add INLINE macro for less mouthful static-inline declarations 2019-08-03 19:47:21 +03:00
Andrei Alexeyev
3055901998
update my email 2019-07-03 21:00:56 +03:00
Andrei Alexeyev
874da52127
define {Int,Float}Rect in terms of offset and extent 2019-04-11 12:30:20 +03:00
Andrei Alexeyev
dc88572167
YoumuB bomb tweaks, some laser fixups 2019-03-26 17:58:38 +02:00
Andrei Alexeyev
4159ea1249
'upkeep' target for maintenance tasks; back to include guards; happy new year! 2019-01-23 22:10:43 +02:00
Andrei Alexeyev
9844f5dd9b
fix broken laser collision after merging #151
also add a parameter to rect_rect_intersect{,ion} to specify whether to
register shader corners/vertices as intersections. previously these
would be unconditionally discarded.
2019-01-06 02:02:44 +02:00
Andrei Alexeyev
322edd0dce
Text rendering rewrite and optimizations; some refactoring (#129)
* wip font rendering stuff; hashtable monstrosity is temporary

* various text rendering fixes/improvements

* HashTables™ 3.0

* Add some comments to aid navigating the hashtable macro maze

* overhaul text rendering API; add default and example shaders

* text: implement text_render for spellcard effect; misc fixes

* README: update dependencies

Bye SDL_ttf, hello freetype2.

* text_draw: fix resolution/scale-dependent bugs

* make text_draw fallback to the current shader, fix hud and stagetext

* repair the bgm loading

* fix spell practice mode

* fix walloftext

forgot one site of text_draw earlier

* fix wrapped text rendering

* fix and simplify the hud text shader

* dynamic glyph cache

* implement font size change on window resize/quality setting change/etc.

* rename text shaders for consistency

* preloads for fonts and text shaders

* make the stagetext shader look somewhat better

* text_render: attempt to normalize height

* small improvement for stagetext
2018-06-30 00:36:51 +03:00
Andrei Alexeyev
2932247249
attempt to refactor the util disaster into several smaller disasters 2018-05-15 03:27:25 +03:00