Commit graph

151 commits

Author SHA1 Message Date
Charlie Malmqvist
f36e2b73a7 Woopsie cleanup 2024-07-23 17:34:03 +02:00
Charlie Malmqvist
4aa832a822 Refactor more to be able to build as dll and link a single global oogabooga instance, and made an example for a hot loaded game 2024-07-23 17:33:11 +02:00
Charlie Malmqvist
fe3fea0c29 Stable Z sort 2024-07-23 12:11:52 +02:00
Charlie Malmqvist
9338ec248b Improve shader example for outlined rect + outlined circle 2024-07-22 21:12:08 +02:00
Charlie Malmqvist
e61a294960 Conditionally compile oogabooga global state instance with OOGABOOGA_LINK_EXTERNAL_INSTANCE 2024-07-22 19:19:57 +02:00
Charlie Malmqvist
9f5d20d3de Cleanup 2024-07-22 16:49:10 +02:00
Charlie
b25b67f645
Merge pull request #4 from rciliberto/master
Add `noreturn` attribute to crash()
2024-07-22 10:19:30 +02:00
Charlie
01694b939c
Merge pull request #5 from cozis/headless
Added OOGABOOGA_HEADLESS build for Windows
2024-07-22 10:11:13 +02:00
Francesco Cozzuto
6f7f5cb1e6 Fix outdated comment 2024-07-22 01:13:26 +02:00
Francesco Cozzuto
5509c7166e Add OOGABOOGA_HEADLESS option 2024-07-22 01:06:21 +02:00
Robby Ciliberto
8700f483e5
Add noreturn attribute to crash()
Since crash() stops the program, adding the `noreturn` attribute allows the compiler to optimize in certain cases. CLion and ReSharper also use this in its static analysis engine to warn about unreachable code. Additionally, since `assert()` uses `crash()` if the checked pointer is null, this lets the analysis engine correctly discern that the pointer will in fact not be null and stop erroneous null pointer warnings.
2024-07-21 18:42:46 -04:00
Charlie Malmqvist
28898b026e Fix mandatory woopsie 2024-07-20 16:14:26 +02:00
Charlie Malmqvist
dd2c9e3a09 Merge dev into master (0.01.001) 2024-07-20 16:11:20 +02:00
Charlie Malmqvist
88053ab14a v0.01.001 - Spacial audio, custom shading, scissor boxing 2024-07-20 16:10:55 +02:00
Charlie Malmqvist
6cffc65e3e Fixy smixy readme 2024-07-19 17:00:20 +02:00
Charlie Malmqvist
2aba15b429 Custom shaders 2024-07-19 16:45:58 +02:00
Charlie Malmqvist
05c9811f38 Improve text measuring & better explanation on how to use 2024-07-18 11:16:55 +02:00
Charlie Malmqvist
e4649e564d #Cleanup 2024-07-17 16:36:13 +02:00
Charlie Malmqvist
ef87d9416e Simplify vertex data 2024-07-17 14:16:23 +02:00
Charlie Malmqvist
9def6cb22b Readme updates, d3d11 impl #Cleanup's 2024-07-17 13:34:52 +02:00
randy
bfaa86f438
Update README.md 2024-07-17 13:24:19 +07:00
Charlie Malmqvist
507fa87de1 test 2024-07-16 14:11:00 +02:00
Charlie
fa36beaef3 Volume control 2024-07-16 13:31:33 +02:00
Charlie
c6bf5bc8bb Spacial audio, draw_line, vector procs 2024-07-16 10:00:04 +02:00
Charlie
c34319796f Update TODO 2024-07-15 22:27:08 +02:00
Charlie
518a255885 Fix sync woopsie 2024-07-15 21:53:00 +02:00
Charlie
c39902d6b1 v0.01.000 - AUDIO! 2024-07-15 21:40:27 +02:00
Charlie
2b335aee35 Sold my soul to play monlight sonata
Audio sources & decoding are pretty much done and working well.

Playback is not really implemented yet, I'm just hacking in a way to output an audio source.

- Seriously microsoft wtf
2024-07-12 21:11:47 +02:00
Charlie
e1aafd8220 0.00.005 2024-07-11 20:38:26 +02:00
Charlie
2a843fe7aa - Fixed crashing when D3D11 DEBUG flag fails in ID3D11CreateDevice, and instead log a descriptive error then continue as usual
- Stuff
2024-07-11 20:35:35 +02:00
Charlie
c92b6fd4b7 - Z Layers
- Sorting
- Contiguous quad buffer
2024-07-10 17:10:38 +02:00
Charlie
a9cbf7ee68 Hotfixes & try to fix window sizing but fail miserably 2024-07-09 19:53:26 +02:00
Charlie
52f68d5fe2 Shader hotfix 2024-07-09 19:17:31 +02:00
Charlie
380d52c9fc Shader hotfix 2024-07-09 19:16:54 +02:00
Charlie
cc74dc68e4 ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? 2024-07-09 18:51:15 +02:00
Charlie
b37652e1ce v0.00.004 - Custom logging, more concurrency & bugfixing
Concurrency:
	- Refactored spinlock out of OS api (deprecated old procs)
	- Concurrency utilites:
		void spinlock_init(Spinlock *l);
		void spinlock_acquire_or_wait(Spinlock* l);
		bool spinlock_acquire_or_wait_timeout(Spinlock* l, f64 timeout_seconds);
		void spinlock_release(Spinlock* l);
		void mutex_init(Mutex *m);
		void mutex_destroy(Mutex *m);
		void mutex_acquire_or_wait(Mutex *m);
		void mutex_release(Mutex *m);
		void binary_semaphore_init(Binary_Semaphore *sem, bool initial_state);
		void binary_semaphore_destroy(Binary_Semaphore *sem);
		void binary_semaphore_wait(Binary_Semaphore *sem);
		void binary_semaphore_signal(Binary_Semaphore *sem);
		Macro MEMORY_BARRIER
	- Concurrency tests

Docs:
	- custom_logger.c example to show how one can make a custom logger and have logs displayed in-game

Utility:
	- draw_text_and_measure() which is just an overload of draw_text but it also does a measure and returns it

Misc:
	- Added u64 thread_id to global context. This is set in main() for main thread and in thread startup when you dispatch a Thread
	- Fixed a bug where plain rects would be drawn with the incorrect color
	- Fixed a bug where quads from earlier frames would be drawn
2024-07-09 18:38:06 +02:00
Charlie
720b545d41 Hotfix build.c 2024-07-09 14:54:06 +02:00
randy
36c6ff5589 added range.c 2024-07-09 18:40:48 +07:00
Charlie
9842834065 - Portable DEPRECATED macro
- Deprecate os_compare_and_swap and replace with more portable compare_and_swap
- Fixed a bug where the wrong image would be drawn
2024-07-09 09:16:09 +02:00
Charlie
e54897432b Fixed memory bug & window placement
- Improved assert messages to be more clear about what might be happening if they fail
- Added more checks in debug to detect heap corruption and what not
- Fixed a bug where the program would crash because a heap block was perfectly full
- Fixed Y placement of window when changing the window rect
- Fixed window sizing when setting scaled_width or scaled_height
- Updated readme
2024-07-09 09:15:35 +02:00
Charlie
05fd88472b Fix merge conflicts 2024-07-09 09:13:44 +02:00
Charlie
2955642477 Dev mode 2024-07-09 09:12:10 +02:00
Charlie
cc8d186dc3 - Portable DEPRECATED macro
- Deprecate os_compare_and_swap and replace with more portable compare_and_swap
- Fixed a bug where the wrong image would be drawn
2024-07-09 09:07:30 +02:00
Charlie
a805557a76 Fixed memory bug & window placement
- Improved assert messages to be more clear about what might be happening if they fail
- Added more checks in debug to detect heap corruption and what not
- Fixed a bug where the program would crash because a heap block was perfectly full
- Fixed Y placement of window when changing the window rect
- Fixed window sizing when setting scaled_width or scaled_height
- Updated readme
2024-07-08 17:57:23 +02:00
Charlie
aee3f78bd5 Add minimal libraries for decoding audio 2024-07-08 15:33:01 +02:00
randy
81133fe9c3 removed randygame from build 2024-07-08 18:40:17 +07:00
randy
f87943a6de moved randygame stuff into fork
I'm no longer using this repo, so it can be less cluttered. I'm working in my own fork now.
2024-07-08 18:20:46 +07:00
randy
339d690627 day 3
- entity structure
- SpriteID
- generic sprite entity rendering
2024-07-08 15:33:42 +07:00
randy
9ebd7fa7eb random in range func 2024-07-08 15:32:03 +07:00
Charlie
21482f2df2 Dev mode 2024-07-07 20:46:57 +02:00