Commit graph

60 commits

Author SHA1 Message Date
PeachyPeach
4c3ee14f55
Mod file system (#850)
Some checks are pending
Build coop / build-linux (push) Waiting to run
Build coop / build-steamos (push) Waiting to run
Build coop / build-windows-opengl (push) Waiting to run
Build coop / build-windows-directx (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
* modfs; optional function parameters in autogen

* errors and stuff

* script to turn a directory into a modfs file and vice versa

* bug fixes

* read: raise error on eof

* properly check eof on read_string

* fill; reload; check pointer validity; skip private files when loading non-active modfs

* added bytestrings

* move ByteString to smlua_utils.h
2025-07-01 01:53:47 +02:00
djoslin0
82ca45eeb6
Lighting engine improvements (#870)
* Lighting engine improvements

Now objects will be affected by the lighting engine. This is
accomplished by passing the renderer the object's model matrix
(uncombined with the view or projection). You can now setup the
lighting engine mode to affect all shaded surfaces, lighting can
be affected by surface normals, and you can control what type of
tone mapping is applied.

added le_set_mode(mode)
    By default we retain the previous behavior.

    When set to LE_MODE_AFFECT_ALL_SHADED the lighting engine will
    affect every shaded material.

    This way we don't have to recompile every object and level that
    we want shaded with special coop-specific commands

added le_get_mode()

added le_set_tone_mapping(toneMapping)
    Tone mapping is what happens when a color value exceeds its 0-255
    range.

    By default we retain the current tone mapping (called
    LE_TONE_MAPPING_TOTAL_WEIGHTED).

    LE_TONE_MAPPING_WEIGHTED is now accessible, it was the tone
    mapping that was previously left out of the compile through ifdefs.

    LE_TONE_MAPPING_CLAMP is just simple additive with a clamp at a
    color value of 255.

    LE_TONE_MAPPING_REINHARD is reinhard tone mapping
    (vout = (vin + 1) / vin).

added le_set_light_use_surface_normals(id, useSurfaceNormals)
    By default lights retain their previous behavior (of ignoring
    surface normals).

    When enabled lights cast on one side of the object will not
    appear on the other side of the object.

    It is kind of like backface culling, but for lights.

added le_calculate_lighting_color_with_normal(pos, normal, outColor, lightIntensityScalar)
    It's just like le_calculate_lighting_color(), but you can pass
    in normals now.

* Removed normal calculation from vertex colored surfaces - they don't have normals

* Use packed normals correctly

* made LE_MODE_AFFECT_ALL_SHADED the default

* made useSurfaceNormals the default for lights

* Set ambient color, performed le_is_enabled() checks

The ambient color was black, which is why everything was dark by default.
If we set ambient to white then people will never see the effects of their
lights unless they set ambient to a lower value. So I added checks for
if a light has ever been added. The alternative would be to have something
like le_set_enabled()

* Rewrite how we obtain the model matrix - invert the camera

* run autogen

* Change default tonemapper to weighted, make setting ambient enable LE, fix null deref

* Address Peachy's comments

---------

Co-authored-by: MysterD <myster@d>
2025-06-29 17:46:35 +02:00
Agent X
15377ada33
Delete developer/recompile-and-restart.sh 2024-04-22 19:33:03 -04:00
iZePlayzYT
12e8312eda
Streamlined Development and Enhanced Customization: Updates to .gitignore, and Keyboard Controls in Chat (#17)
* Ignore Visual Studio Stuff

* Added a few scripts for development

* Improved the development scripts

* Added option to choose between 2 different keyboard control variants in the chat

* Improved and added new batch scripts for development purposes

* Hotfix

* Converted the .BAT-Scripts to .SH-Scripts and moved them to the "development" folder and fixed a bug in the already existing "compile.sh" file

* Fixed some stuff

* Removed 7 .sh-scripts
2024-04-22 19:32:28 -04:00
Agent X
e5b017f115 Remove dev scripts nobody uses, will likely make new ones 2024-03-30 23:57:18 -04:00
Agent X
a4cb43bbb9 Tear out External Data and make Free Cam always compile 2023-11-01 20:17:55 -04:00
MysterD
75d4afa3c8 Reset dev scripts 2023-05-16 22:14:25 -07:00
MysterD
688cd3b399 Rewrite how models are loaded and retrieved... yet again 2023-05-16 00:01:10 -07:00
MysterD
2083242b66 Fixed several crashes and errors found in static analysis 2023-05-15 01:15:20 -07:00
MysterD
27cb975929 Enable asan on dev scripts 2023-05-14 12:11:53 -07:00
MysterD
cc1ec3e81f Prevented hundreds of additional crashes from the Mod API 2023-05-11 20:33:21 -07:00
MysterD
607590fcaf Add 2cycle/lightmap support to dx12 2023-05-03 21:41:39 -07:00
Isaac0-dev
6cb1b2faec
Beta 32.0.1 (#325)
* patch for beta 32

* require the development flag for Lua profiler

* autogen
2023-03-26 01:15:28 -04:00
MysterD
b2bdf8859c Cleanup ; recursive descent fixes ; fixed behavior override comparisons
Moved dynos parsing for bhvs and models to a common file
Fixed recursive descent to correctly parse the entire expression
Adjusted bhv generation to use recursive descent
Switched all known behavior comparisons to the overridden versions
Fixed issue with Chain Chomp in star road
2022-06-02 19:07:43 -07:00
MysterD
38b2c81189 Attempt to fix crash that mentions get_mario_spawn_type() 2022-05-28 00:14:57 -07:00
MysterD
85ad7ed201 Clear network players on disconnect 2022-05-11 01:27:14 -07:00
MysterD
e7cd7ccd6d Fixed finding of renamed custom actors 2022-04-22 18:54:11 -07:00
MysterD
cdb7701905 Add profiling compile option 2022-04-19 18:18:15 -07:00
MysterD
c5c11a5a40 More work on mod hashing/caching 2022-04-12 19:25:06 -07:00
MysterD
f2f911e5b0 Clang/mac fixes 2022-04-11 21:43:55 -07:00
MysterD
f8ffc23422 Made downloads significantly faster 2022-04-10 21:53:58 -07:00
MysterD
ef4a83dc88 Quick fixes for test 2022-04-10 10:11:13 -07:00
MysterD
07cbeb119c Fixed more possible bugs pointed out by cppcheck 2022-03-01 21:13:00 -08:00
MysterD
d51c82e235 Fixed many bugs pointed out by cppcheck 2022-03-01 20:32:33 -08:00
MysterD
69fb69dfce Fix bugs/warnings from static analysis 2022-02-20 20:04:25 -08:00
MysterD
bb12aebb9e Fix crash screen on DirectX 2022-02-17 18:40:47 -08:00
MysterD
da5f9263fd Fix compile error that emerged in the merge 2022-02-15 22:29:22 -08:00
MysterD
ded74e7fb5 Added image drawing to Lua API 2022-02-15 22:12:20 -08:00
MysterD
12f66994e6 Added on_player_connected/disconnected hooks 2022-02-02 19:33:36 -08:00
MysterD
9a3796f0b8 Added ability for sync tables to contain tables 2022-02-01 18:15:10 -08:00
MysterD
20599aa6f3 Made globalIndex able to be determined by just localIndex
refactored the ugly spaghetti mess that was network_player_connected()
2022-01-31 00:29:44 -08:00
MysterD
e9d3bf49da Initial foundation for lua networking 2022-01-30 23:11:33 -08:00
MysterD
addd16721f Added headless server compile mode 2022-01-21 19:13:41 -08:00
MysterD
05999a9ae8 Added key/bind names to controls menu 2022-01-20 21:46:22 -08:00
MysterD
511e7c5028 Prevent bubble softlock by halting bubble popping for half a second after being bubbled 2022-01-15 21:50:35 -08:00
MysterD
839575efe1 Fixed home radius on many enemies, fixed draw distance bug 2022-01-14 16:33:22 -08:00
MysterD
3721877b6a Removed player offset when changing areas 2021-09-05 14:34:17 -07:00
MysterD
4cebce4864 Added Waluigi - model provided by Super Keeberghrh 2021-09-05 14:23:47 -07:00
MysterD
5b0d4c60b3 LOGFILE_ calls now print to the terminal in DEBUG mode again 2021-08-09 00:09:44 -07:00
MysterD
a5b8483100 Removed SDL2 API calls from SDL1 backend 2021-08-08 16:50:44 -07:00
MysterD
9699d79dd7 Fix Discord connections on unstable 2021-07-31 17:24:13 -07:00
MysterD
0b3f363130 DJUI: Ignore garbage text inputs if there are no valid characters 2021-07-31 03:02:30 -07:00
MysterD
98b7dba74b DJUI: Added mouse support to DX11/DX12 2021-07-31 02:30:10 -07:00
MysterD
3ee3f3e5bd Added simple rate limiting of packets 2021-07-30 19:33:09 -07:00
MysterD
4e0a3e3e57 Merge branch 'dev/djui' into dev/unstable 2021-07-22 20:38:21 -07:00
MysterD
13d504a953 Replaced old host/join menu with new DJUI menu system 2021-07-04 22:40:04 -07:00
MysterD
58eec0e19f Removed old chat system 2021-07-01 21:14:11 -07:00
MysterD
b4418bbd4f DJUI: Made inputbox usable
Added keyboard support to inputbox
Fixed how inputbox text is clipped
Added on_enter_press callback for inputbox
Added ability to set clipboard text
Adjusted how components can be focused, and when they lose focus
Erased most of the text input stuff in controller_keyboard
Disabled major parts of old chat system
Disabled major parts of old menu system
2021-07-01 20:03:54 -07:00
MysterD
05c32ea73e DJUI: Wrote active panel system 2021-06-24 18:15:59 -07:00
MysterD
5131665be2 DJUI: Added 'Three Panel' component 2021-06-23 19:17:46 -07:00