Commit Graph

6 Commits

Author SHA1 Message Date
CHOMPStation2StaffMirrorBot
e501986575 [MIRROR] only tab indentation (#10517)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
2025-03-24 01:30:43 +01:00
Zulker Nayeen Nahiyan
6e550d7308 Cleanup helper files maths.dm, time.dm, type2type.dm, add macros for bit-manipulation
`maths.dm`:
	Rewrite `Gcd(x)` to remove recursive behaviour.
	Remove `RaiseToPower(x)` and its usage from `event_manager.dm`.
	Rename `Lerp()` to `Interpolate()`.
	Add `Square(x)`, which squares a number.
	Rearrange most of the functions in the file. (trigonometric functions together, etc.)

`type2type.dm`:
	Rewrite `num2hex()` and optimise `hex2num()` for superior clarity and a 100% speed improvement.
	Correct indenting, spaces, make switches more concise.

`time.dm`:
	Remove old, slanderous commented-out function `/proc/time_stamp()`

`lists.dm`:
	Add the macros, `BITTEST(bitfield,index)`, `BITSET(...)`, `BITRESET(...)`
	  and `BITFLIP(...)` for bit-manipulation and use them where 20+ files
	  do it manually, for arguments of reader clarity and standardness.
2015-01-09 21:55:11 +06:00
Uristqwerty
29f1095a25 Non-animated runes aren't being cached, probably a bug. 2013-02-19 23:40:06 -05:00
Chinsky
4f173c52a8 Good God, cult code is atrocious....
For now made all words into one list, instead of separate vars for each.
Brought back awesome Urist runes. Down with crayon doodles!

Need to look into making rune NOT check what rune it is EVERY TIME it is activated... making subclasses or some shit like that.
The more I stare in that code the louder screams in my head, maybe that's intended?
2013-01-11 02:01:23 +04:00
Uristqwerty
fb51e184f2 Yep, thee was a bug. 2012-05-24 02:29:54 -04:00
Uristqwerty
01b038ff27 Introducing Uristrunes!
Built crom components, each cult word gets it's own unique appearance,
that it adds to the final rune. Correct combinations will glow ever so
slightly, the others remain a single colour.

The system behind them is a bit more powerful, supporting a full 1023
combinations, although far fewer can be reached in-game (as the system
doesn't care about word order, and you can't use enough words to have
more than three of the components as part of any rune).


With this commit, it compiles, but I haven't quite tested anything
in-game, so there might be a followup bugfix. Or there may not.
2012-05-24 01:34:35 -04:00