Commit graph

23555 commits

Author SHA1 Message Date
toaster
631336db39 "New" Chat (2018 onwards) has completely been moved to string drawer system
Has some minor kinks but Jartha wanted to take it over once I laid the groundwork so I'm not losing sleep over this
2023-07-12 09:00:30 +01:00
toaster
eacd99a815 FOCUS LOST: Force uppercase 2023-07-12 09:00:30 +01:00
toaster
e3ee8f9afa V_LevelNameHeight: Don't use strlen for possibly every iteration depending on optimisation level 2023-07-12 09:00:30 +01:00
toaster
9e4e996a5e V_ScaledWordWrap API changes
- The function is back to producing zone-allocated memory copies, like its precursor V_WordWrap
    - The author of this commit got rid of that dependency originally because it seemed like a fair part of the API, and meant static buffers could be used in certain circumstances, but it was necessary to revert for the following change.
- Newlines can now be inserted mid-word, treating the width provided as ironclad except in the case of single characters wider than the region.
    - This will be necessary for future work with the in-game chat.
    - Reserves 8 characters at first, then Z_Reallocs double that every time it runs out.
2023-07-12 09:00:30 +01:00
toaster
4675a9b059 Fix an issue where newlines could potentially double-up when faced with whitespace 2023-07-12 09:00:30 +01:00
toaster
c5dc430b50 V_6WIDTHSPACE no longer a pitfall for using V_DrawThinString
The bunched text behaviour is now the primary mode of operation for TINY_FONT.
2023-07-12 09:00:29 +01:00
toaster
445929fac9 Whitespace at the end of a line should NOT be counted when getting V_StringScaledWidth
Second guessed this change over lunch
2023-07-12 09:00:29 +01:00
toaster
277f7c51a3 V_ScaledWordWrap
Moves WordWrap to the font/V_GetFontSpecification system.

Much healthier long-term for our purposes, including the possibility of changing fonts for various contexts freely.
2023-07-12 09:00:29 +01:00
toaster
fb0fa9ac53 V_StringScaledWidth fixes
- Don't calculate a cy that's not actually needed
- Ignore colorcodes
- Update `right` when space characters are printed, too
2023-07-12 09:00:29 +01:00
toaster
fd4c1aeec3 fontspec_t, V_GetFontSpecification
Reduces quantity of copypasted code between V_StringWidthScaled and V_DrawStringScaled to far more manageable "this is an inner loop and cannot be abstracted" levels.

Guarantees consistency in handling across existing and future functions.
2023-07-12 09:00:29 +01:00
toaster
b69a255fe9 readlevelheader: Support lowercase for ZoneTitle
Exposed by increased lowercase prevalence, fix before boarding that up.
2023-07-12 09:00:29 +01:00
toaster
86784ae91a Add Menu Font (without using it anywhere)
Content of commit was originally written by Sal, but as a monolithic commit. The author of this commit is chunking it up for easier review.

Adds the additional font. This requires a little cleanup before we can use it as the primary menu font, but worth at least putting this in the relevant places for later.
2023-07-12 09:00:29 +01:00
toaster
a536f884ce V_ALLOWLOWERCASE --> V_FORCEUPPERCASE
Content of commit was originally written by Sal, but as a monolithic commit. The author of this commit is chunking it up for easier review.

Simple inversion on the face of things, but with a long tail of consequences, including 19 changed files.

Forced uppercase has been applied in a handful of locations where it was aesthetically imperative. Most menus will follow in another commit, so that that may be reverted if we change the default menu font.
2023-07-12 09:00:29 +01:00
toaster
4b97c171b5 Character-handling cleanup
Content of commit was originally written by Sal, but as a monolithic commit. The author of this commit is chunking it up for easier review.

- V_CharacterValid
    - Makes checks for valid character drawing consistent and cleaner
    - If a case isn't being forced, characters that can have case applied but don't exist will attempt to draw their other case.
- V_DrawCharacterScaled
    - Saner core function that doesn't overload the character provided
    - Previous terrible is supported for now via backwards-compatible shim function
2023-07-12 09:00:28 +01:00
Oni
992840dd0f Merge branch 'faraway-colony-signs' into 'master'
MF_DRAWFROMFARAWAY Lost Colony signs

See merge request KartKrew/Kart!1331
2023-07-12 03:20:06 +00:00
AJ Martinez
df940de4b0 MF_DRAWFROMFARAWAY Lost Colony signs 2023-07-11 20:17:17 -07:00
Oni
5f5ef5f550 Merge branch 'symbol-signs' into 'master'
Lost Colony symbol signs

See merge request KartKrew/Kart!1298
2023-07-12 02:42:42 +00:00
Lach
77750438ef Change symbol thing type to 4094 2023-07-11 21:51:29 +10:00
Lach
4ad383721d Add thing type number & binary conversion to symbol signs 2023-07-11 21:04:06 +10:00
Lach
64511e82c2 Merge remote-tracking branch 'origin/master' into symbol-signs 2023-07-11 20:55:44 +10:00
Oni
6c9ed3a388 Merge branch 'hold-my-input' into 'master'
Improve netplay instability and network timing drift (resolves #573)

Closes #573

See merge request KartKrew/Kart!1326
2023-07-10 21:51:34 +00:00
Eidolon
e78add3a2a Merge branch 'wtf-gcc' into 'master'
Give StaticVec a special iterator type

See merge request KartKrew/Kart!1329
2023-07-09 17:34:02 +00:00
Eidolon
9a149ed35b Give StaticVec a special iterator type
Avoids a bogus warning in std::sort in GCC's STL.
2023-07-09 12:27:00 -05:00
James R
c824654130 Merge branch 'convert-rainbow-rings' into 'master'
P_ConvertBinaryThingTypes: convert Rainbow Dash Rings too

See merge request KartKrew/Kart!1327
2023-07-07 04:36:54 +00:00
James R
b17ae80c15 P_ConvertBinaryThingTypes: convert Rainbow Dash Rings too 2023-07-06 21:15:53 -07:00
AJ Martinez
9ebfc12167 Only use ticmiss input-steering if we didn't use it last tic 2023-07-06 16:04:28 -07:00
AJ Martinez
fe122291bc Buffer double-submitted ticcmds 2023-07-06 01:37:05 -07:00
AJ Martinez
edfd43ce81 Use input steering (not camera steering) on skipped tics 2023-07-03 16:35:52 -07:00
Oni
acfd7ffc55 Merge branch 'hit-stop-efx' into 'master'
Hitlag EFX

See merge request KartKrew/Kart!1218
2023-07-03 12:39:11 +00:00
AJ Martinez
a594e386b6 ReduceVFX MT_HITLAG 2023-07-03 05:33:20 -07:00
VelocitOni
30d21e960a Merge branch 'master' into hit-stop-efx
# Conflicts:
#	src/objects/ufo.c
2023-07-03 06:24:27 -04:00
James R
e94ae5bfef K_BattleAwardHit: evaluate win condition before adding points 2023-07-03 06:20:21 -04:00
James R
7fdfa56451 Show point count next to rank icons HUD in Battle
If the player has reached the point limit, the numbers
dance and flash tangerine (indicating that they are about
to win, after they kill someone).
2023-07-03 06:20:21 -04:00
VelocitOni
89623e3fc9 Battle odds re-do
Cleared out all battle odds and started fresh, now mostly projectiles.
2023-07-03 06:20:21 -04:00
James R
321fa518bd K_RunPaperItemSpawners: always give monitors 3 item types 2023-07-03 06:20:20 -04:00
James R
e65b1531ae Draw MMAPDOT in front of players' facing angles on the minimap 2023-07-03 06:20:20 -04:00
James R
e514b5023f During Overtime: point Servant Hand to Battle Kiosk, stop pointing to UFOs 2023-07-03 06:20:20 -04:00
AJ Martinez
1c633dd9ee Direct players to battle UFOs via Obj_PointPlayersToXY 2023-07-03 06:20:19 -04:00
James R
a98db957e6 WANTED player or Lightning Shield attracts emeralds 2023-07-03 06:20:19 -04:00
James R
4874c90f8d Don't pickup emeralds if in pain state 2023-07-03 06:20:19 -04:00
James R
82cf995e35 Kill Battle UFOs outside of the Overtime Barrier 2023-07-03 06:20:18 -04:00
James R
4d24eb71b6 Battle: scale Overtime Barrier to minimap size 2023-07-03 06:20:18 -04:00
James R
8931c7f570 Always shrink Overtime Barrier in 30 seconds 2023-07-03 06:20:18 -04:00
James R
2eaf17f9d7 K_SpawnOvertimeLaser: only move laser height with player if player goes above the top of the lasers 2023-07-03 06:20:17 -04:00
James R
c1d54f50f5 Give Overtime Lasers infinite draw distance 2023-07-03 06:20:17 -04:00
James R
9c8ce17c1e Don't steal bumpers unless below 3 bumpers or dealing STEAL damage (sneakers) 2023-07-03 06:20:17 -04:00
James R
d34760b7bf Battle: power-up time 20 -> 30 seconds, UFO respawn 25 -> 20 seconds 2023-07-03 06:20:16 -04:00
James R
2f021344d9 Battle: time limit 2 -> 3 minutes 2023-07-03 06:20:16 -04:00
James R
655b5decb5 writetextmap: save waypoints correctly, account for risers and anchors 2023-07-03 06:20:16 -04:00
James R
7def36aaeb Split apart some of P_WriteTextmap 2023-07-03 06:20:16 -04:00