Tamás Bálint Misius
ca6c67c16c
Factor functions shared between elements into headers
...
The signature duplication was getting out of hand; too easy to get wrong.
2023-12-09 16:37:49 +01:00
Tamás Bálint Misius
dd875987b9
Enable basic rendering of custom elements in secondary Renderers
...
By factoring element and other static-ish data out of Simulation and protecting basic graphical element properties (i.e. everything that contributes to graphics other than the Graphics callback) with an std::shared_mutex. This is taken exclusively (std::unique_lock) by the main thread when it changes these properties, and inclusively (std::shared_lock) by non-main-thread code that uses Renderer.
2023-12-08 22:40:44 +01:00
Tamás Bálint Misius
52a4917624
Remove BOUNDS_CHECK
...
It didn't do anything anyway, see 10e104f3f5
.
Also fix some C89-isms.
2023-09-02 12:11:24 +02:00
catsoften
a715f5d71a
Use RGB for constants and gradients, other misc changes
2023-04-16 22:13:39 +02:00
catsoften
bc085705a8
Remove deprecated PIXPACK/RGB/R/G/B functions
2023-04-16 22:13:39 +02:00
Tamás Bálint Misius
eee42b2ea3
Fix RNG usage
...
Mostly boils down to having graphics functions use Renderer's RNG, update and similar functions Simulation's.
2023-04-15 18:22:03 +02:00
Tamás Bálint Misius
4d52531889
Ditch element and tool classes
2020-01-09 19:22:11 +01:00
jacob1
0078fb4c6f
Add DefaultProperties, replaces some of the case statements in create_part
...
The rest will will in a commit soon that adds the Create event and some other stuff
Lua events will come after that
PLSM default temp lowered to MAX_TEMP
2019-11-25 22:08:18 -05:00
Tamás Bálint Misius
0179cefc78
Flatten include trees
2019-04-20 15:36:11 +02:00
jacob1
92244f78bb
initialize some variables to fix -Werror=maybe-uninitialized warnings
...
most aren't actually bugs, but gcc isn't able to determine that the paths it can follow guarantee they are initialized
2018-07-08 00:49:35 -04:00
jacob1
44a8665f6f
update rng functions in a lot of element files to use .between/.chance
...
conversion is still very incomplete
2018-05-02 23:53:15 -04:00
Saveliy Skresanov
cda029ff42
Use xoroshiro128+ random generator (everywhere besides BSON code).
2018-04-23 22:47:44 +07:00
jacob1
208cf14ce8
convert r&0xFF in src/simulation/elements
2017-12-28 13:00:23 -05:00
jacob1
ac24810da5
add some defines to reduce usages of hardcoded r>>8
2017-12-28 12:03:26 -05:00
jacob1
32d834c351
fix VIBR asymmetric heat releasing, fixes #424
2017-06-11 22:47:05 -04:00
jacob1
0b1ffbcfd6
probably fix uninitialized thing in VIBR, might spend longer later messing with d4zk1tty's fuzzer script
2016-04-02 01:04:13 -04:00
jacob1
07be209094
remove extra spacing in all the element files
2015-12-18 02:27:19 -05:00
jacob1
95ab91e91d
Remove .State property from all element files
2015-12-18 01:51:22 -05:00
jacob1
0ad225d1fc
update VIBR randoms, fix any VINE in old saves also
2015-01-07 19:32:49 -05:00
jacob1
be6551ceea
fixes to rndstore in VIBR/VIRS, remove goto in PROT
2015-01-07 19:04:11 -05:00
cracker64
a115e78952
More element optimizations!
...
ACEL, changed a range check
DRAY, Fixed repetitive checking
GOLD, less rand()
PLNT, removed range checks, less rand()
PROT, used a switch()
VIBR, less rand()
VINE, less rand(), fixed growing along WOOD
VIRS, less rand()
2014-12-06 15:43:11 -05:00
jacob1
16ce3a68c0
more jacksonmj suggestions: save edgeMode in saves, BVBR absorption fix, life saving fix, DEUT graphics change, PROT fix, SOAP graphics fix
2014-11-21 15:41:22 -05:00
jacob1
cbd402d8cb
fix CFLM making VIBR unable to explode
2013-05-17 12:44:18 -04:00
jacob1
c50e12df28
CFLM defusses VIBR, a few speed improvements to VIBR
2013-03-23 10:53:49 -04:00
jacob1
d357fcdc36
add back bounds check to DTEC/TSNS where needed, change VIBR back to 5x5 loop checks
...
a better way to change it to 3x3 may have to be found that has the same ratios, other elements like WATRs have their rates changed too
2013-03-17 12:21:45 -04:00
Saveliy Skresanov
43974d8537
Narrowed loops for all elements in the first list.
...
Probabilities might be messed up a bit, I'm not sure.
2013-03-16 23:03:02 +07:00
jacob1
e493cf8a47
fix all tab spacing issues in all the element files
2013-03-13 15:54:34 -04:00
cracker64
c65081d3ed
Finished first pass-through for all elements.
...
Will get a few more places later.
2013-02-28 00:40:36 -05:00
jacob1
6a4040f2b7
Update src/simulation/elements/VIBR.cpp
...
fix EXOT destroying exploding VIBR
2012-11-23 21:28:10 -05:00
jacksonmj
fbbe9d81bf
Transfer energy between VIBR and BVBR
2012-11-05 21:45:22 +00:00
jacksonmj
956fb39124
Oops, didn't see that parts[i].temp at the bottom, ignore the second half of that last commit message
2012-11-05 14:42:06 +00:00
jacksonmj
3cae63c733
VIBR: don't dump heat into elements that don't conduct heat, and put any remaining heat into EXOT at the end of the explosion
2012-11-05 14:18:28 +00:00
jacob1
ca42162e5e
fix heat release during explosion
2012-11-04 21:35:35 +00:00
jacksonmj
12eb085d20
VIBR changes from jacob1
...
Including:
Molten TTAN + EXOT = VIBR.
VIBR + ANAR = BVBR. (BOYL reaction removed)
All absorbed heat/particles/pressure are stored in one property, tmp.
Graphics changes
2012-11-04 20:35:43 +00:00
Bryan Hoyle
32bdcb89e8
VIBR fixes
2012-10-28 21:11:18 -04:00
Simon Robertshaw
9b4f710e28
Menu icon for sensors menu and fix for VIBR std::max args
2012-10-26 15:58:39 +01:00
jacob1
6d6b0dfa9f
some VIBR changes, also allow it to be compiled with Scons
2012-10-26 15:18:52 +01:00
jacob1
3f093c8072
VIBR explosion/graphical changes, it now has a while before it explodes after getting to the limit
2012-10-26 15:11:22 +01:00
jacob1
cd7ca6d417
some VIBR changes/fixes
2012-10-26 15:10:50 +01:00
jacob1
04b76a4b48
VIBR/BVBR - vibranium. Initial commit, doesn't seem to work yet
2012-10-26 15:10:44 +01:00