1
0
Fork 0
mirror of https://github.com/k4zmu2a/SpaceCadetPinball.git synced 2024-11-17 15:20:17 +01:00
Commit graph

234 commits

Author SHA1 Message Date
Muzychenko Andrey
545af17b3b Merge from classic: better frame time tool, negative sleep remainder. 2021-11-18 12:11:25 +03:00
Muzychenko Andrey
200a7dbf79 Enabled ImGui navigation with keyboard and game controller.
Ref issue #92.
2021-11-15 17:32:18 +03:00
Muzychenko Andrey
8ab50ea7b7 ColorRgba: replaced union with bit shifts.
Fixed bad clamping in frame time tool.
2021-11-13 09:00:58 +03:00
Muzychenko Andrey
f3e4211226 Improved frame time diagnostic tool.
Split overdraw palette from frame time tool.
2021-11-11 14:30:56 +03:00
Muzychenko Andrey
683204519c Added UTF-8 path support on Windows.
Ref issue #82.
2021-11-06 19:22:56 +03:00
Muzychenko Andrey
ecdf802d68 Added game data loading from user folder (SDL_GetPrefPath).
Ref issue #80.
2021-11-05 10:16:27 +03:00
Muzychenko Andrey
dc00dbde0d Fixed bug with mission accept scores.
Ref issue #81.
2021-11-04 18:46:04 +03:00
Muzychenko Andrey
862fe13dcd Added game controller exit shortcut: back/select when paused.
Ref issue #79.
2021-11-01 09:09:19 +03:00
Muzychenko Andrey
fc1975a607 Fixed bug: dialogs not shown when main menu is hidden.
Ref issue #76.
2021-10-30 12:34:17 +03:00
Muzychenko Andrey
e61bbd634c Added fallback to SW SDL renderer. 2021-10-30 10:12:30 +03:00
Muzychenko Andrey
917b68d630 Added NN scaling for PINBALL2.MID.
It does not scale well.
Wii port should rather use non-compressed PB_MSGFT_bin.
2021-10-28 13:03:05 +03:00
Iscle
d27740bd38
Fix compiler warnings (#73) 2021-10-26 17:15:45 +03:00
Muzychenko Andrey
cfd30419c2 Added Windows XP build configuration.
Removed unused SDL inits.
2021-10-26 17:11:53 +03:00
Muzychenko Andrey
3ec96b84ad PresentVScreen: fixed sub pixel offset.
SDL<2.0.10 uses crude approximation.
2021-10-25 08:03:30 +03:00
MaikelChan
34cb964ea5
Change texture filtering without restarting. (#67) 2021-10-25 06:42:36 +03:00
MaikelChan
5789492021
Adjusted screen coordinates so menu doesn't overlap (#66)
* Optimized final blit to the screen render target.

When bumping the table, instead of offseting the table pixels by CPU, just memcpy all the pixels to vScreenTex once, and then render two separate quads from that texture: one for the board and the other for the sidebar. Then change the coordinates of the board quad when bumping.

* Main menu bar doesn't cover game area

* Forgot to also take into account changing UI scale.
2021-10-24 18:38:23 +03:00
MaikelChan
38cf08e298
Optimized final blit to the screen render target. (#65)
When bumping the table, instead of offseting the table pixels by CPU, just memcpy all the pixels to vScreenTex once, and then render two separate quads from that texture: one for the board and the other for the sidebar. Then change the coordinates of the board quad when bumping.
2021-10-24 07:13:51 +03:00
Muzychenko Andrey
5cd01807b2 winmain: converted int to bool.
Cleaned up some of the PR changes.
2021-10-23 09:02:51 +03:00
toxie
57af3af800
Increase precision of mode_countdown_ handling (#52)
* fix harmless warnings and properly try/catch allocations via new

otherwise the error handling will never be triggered

* increase precision of mode_countdown_ handling

potentially there could be modes running a bit too long, depending on passed in ms (which were implicitly truncated before when passing in)

also fix some harmless warnings

* document warnings that i cannot handle on my own

* revert changes to have a new cleaner PR after review/cherry picks

* increase precision of mode_countdown_ handling

potentially there could be modes running a bit too long, depending on passed in ms (which were implicitly truncated before when passing in)

also fix some harmless warnings and add comments where original code is 'correct' but weird
2021-10-23 07:33:04 +03:00
Desgging
8e07b7fc3f
Full Tilt hack - ball doesn't delay at ramp hole (#63) 2021-10-23 07:31:25 +03:00
Muzychenko Andrey
685dfe78c2 TPlunger: removed duplicated code.
Ref PR#52.
2021-10-18 10:52:13 +03:00
Muzychenko Andrey
348d79ef38 Bugs and suggestions from PR# 48. 2021-10-18 09:31:47 +03:00
Muzychenko Andrey
06b760e8dd Player controls: added mouse and game controller remapping.
Fixed duplicate button id.
2021-10-17 18:18:29 +03:00
Muzychenko Andrey
d06aa1c736 Changed SDL_mixer version guard.
SDL_MIXER_COMPILEDVERSION is not in Windows release of mixer v2.0.1, so it is back to basics with SDL_MIXER_PATCHLEVEL.
MIX_INIT_FLUIDSYNTH was renamed in 2.0.2, according to headers from Windows releases.
Ref PR #42, #46
2021-10-17 12:00:30 +03:00
Mariotaku
787c623cfe
Backward compatibility for mixer version check (#46)
SDL_MIXER_VERSION_ATLEAST isn't available in SDL Mixer 2.0.1, which will cause build errors.
2021-10-17 09:00:49 +03:00
Mariotaku
f56abf0596
Compatibility and game controller patches (#42)
* Compatibility for old CMake versions (3.0)
Compatibility for SDL Mixer 2.0.1
Basic controller support: LB, RB for flippers, A for plunger, DPAD for table bump

* Update SpaceCadetPinball/Sound.cpp

Co-authored-by: Muzychenko Andrey <33288308+k4zmu2a@users.noreply.github.com>
2021-10-17 07:52:05 +03:00
Muzychenko Andrey
f302687c7f high_score: fixed new score not shifting older scores.
Issue #33.
2021-10-15 13:30:55 +03:00
Muzychenko Andrey
5947727f80 Tweaked ball mouse control cheat. 2021-10-10 17:13:43 +03:00
Muzychenko Andrey
69ecce88df Score: inject 3DPB msg font into dat struct.
Fixed double free in sound.
2021-10-10 12:22:21 +03:00
Muzychenko Andrey
43593b168d Sound: added channel recycling.
Added sound channel count (aka voices) user option.
Added 3DPB font to sprite viewer.
Added version number to about dialog.
2021-10-09 17:28:30 +03:00
Muzychenko Andrey
d80074b9b6 Added Windows subsystem entry point for release builds. 2021-10-09 12:33:33 +03:00
Muzychenko Andrey
ac289c7f48 Fixed TLightGroup message 45 and 46, used by TLightBargraph.
Issue #25.
2021-10-07 14:17:43 +03:00
Nixola
87e44b700b
Mingw cross compilation (#24)
* Fixed icon filename capitalization

* Created mingw cmake toolchain

* Adjusted CMakeLists.txt for compatibility

* Small mingwcc.cmake cleanup

* Added cross-compilation instructions to readme

* Update README.md

Fixed typo

Co-authored-by: Nicola Orlando <nicolaorlando24@gmail.com>
Co-authored-by: Muzychenko Andrey <33288308+k4zmu2a@users.noreply.github.com>
2021-10-07 12:53:56 +03:00
Muzychenko Andrey
48721e5811 Fixed flipper animation frame skip bug.
It is from original 3DPB, not present in FT.
2021-10-07 08:01:34 +03:00
Muzychenko Andrey
7ee508118c Fixed TKickout temporary Z in FT mode. 2021-10-06 12:42:22 +03:00
Muzychenko Andrey
8c4f38c0af Cheats: flipped literals, made some toggle, added GUI. 2021-10-05 16:48:13 +03:00
Muzychenko Andrey
167a2c2bd1 Demangled and simplified pbctrl_bdoor_controller. 2021-10-04 17:04:09 +03:00
Muzychenko Andrey
f1c6c48b36 Enabled icon in Windows build. 2021-10-03 18:57:19 +03:00
Muzychenko Andrey
8d2745fc33 Added support for sub-millisecond frame times. 2021-10-03 18:06:19 +03:00
Muzychenko Andrey
261457a959 TPinballComponent: replaced calloc operator new with member initialization. 2021-10-02 18:58:54 +03:00
oz
93de90b680 Replaced memory with new.
Cleaned up gdrv, zdrv, render.
2021-10-02 17:45:31 +03:00
Muzychenko Andrey
c3b6daefc9 Added uncapped UPS option.
Issue #18.
2021-10-02 07:42:08 +03:00
Muzychenko Andrey
81c2034a16 Replaced objlist_class with std::vector.
Fixed minor bug in TLightGroup.
Cleaned up some warnings.
2021-10-01 18:55:44 +03:00
Muzychenko Andrey
8a421a2623 Implemented player controls dialog.
This last missing major feature brings v2 into feature parity with the original and closer to release.
Ref issues #16, #17.
2021-10-01 09:05:38 +03:00
Muzychenko Andrey
a281000308 midi: added support for FULLTILT16 music. 2021-09-30 08:51:48 +03:00
Muzychenko Andrey
03deda2f9d Added event wait timeout when idle.
Added show menu button to prevent lockout; this somewhat ruins no menu aesthetic.
Cleaned up 3DPB vs. FT methods in midi.
2021-09-29 17:53:49 +03:00
Muzychenko Andrey
ba5a0f3044 Compressed and encoded embedded 3DPB font.
Exposed ImGui function for decompressing embedded data.
2021-09-29 10:08:45 +03:00
Muzychenko Andrey
b37f5d6d76 Fixed ShowMenu option interrupting ImGui::NewFrame. 2021-09-29 07:46:13 +03:00
Muzychenko Andrey
593b4d161c
Merge pull request #14 from prototux/option_nogui
Add an option to show or hide the menu
2021-09-29 07:32:01 +03:00
prototux
7c29c05d64 Fixed the keyboard shortcut for show menu 2021-09-29 06:09:24 +02:00
prototux
89f4b6d535 Fixed the keyboard shortcut for show menu 2021-09-29 06:06:08 +02:00
Muzychenko Andrey
65037e0e69 Bug-fix: storage for non-inline static constexpr.
Somehow none of the compilers I test with cought this.
2021-09-29 06:07:00 +03:00
prototux
b843e9a6cb Added an option to show or hide the menu. 2021-09-29 02:21:21 +02:00
Muzychenko Andrey
b4cb827d73 winmain: reworked main loop for smoother frame times.
imgui_sdl: added handling for device lost.
midi: load PINBALL.MID in uppercase and using absolute path.
Added UPS/FPS options, by default 120/60.
2021-09-28 08:14:18 +03:00
Muzychenko Andrey
22ce8ac538 gdrv: blit no more, present render:vScreen directly.
Improved split bitmap handling.
2021-09-25 16:52:19 +03:00
Muzychenko Andrey
fd9de493e6 Added linear filter option for vScreen texture.
Rollback blit to backing storage – its persistence is not guaranteed.
Added project URL to About dialog.
Added source ports table to readme.
2021-09-23 12:16:58 +03:00
Muzychenko Andrey
4c196a9290 Added table resolution and UI scale options.
gdrv: blit directly to backing store of vScreen texture.
Added missing cheat_bump_rank sub, oops.
Fixed some warnings.
2021-09-22 15:50:07 +03:00
Muzychenko Andrey
c63c6701ac gdrv: RGBA buffers, pre-applied palettes, SDL bitmap origin.
Refactored partman.
Added sprite viewer.
2021-09-21 13:14:39 +03:00
Muzychenko Andrey
8bae7a5b05 Added user settings persistence.
Using ImGui .ini writer.
2021-09-16 10:57:46 +03:00
Muzychenko Andrey
af5a70785e Enabled pch in CMake.
No need to remove old pch includes.
2021-09-15 12:20:57 +03:00
Muzychenko Andrey
c5b7c0ad16 Fixed some of the memory leaks and Clang warnings.
DrMemory and Valgrind work with regular debug builds.
2021-09-14 15:33:18 +03:00
Muzychenko Andrey
28e2417ef9 Made it compile with GCC on Linux.
Fixed GCC warnings and Windows specifics.
Restored C++11, switch to 14 was not supposed to happen.
Not 100% sure about my Find* module section.
2021-09-09 11:40:54 +03:00
Muzychenko Andrey
2fe6d6d33a Removed windows.h dependency.
Added support for music in MDS format.
2021-09-06 16:27:58 +03:00
Muzychenko Andrey
e0638c598d Added GUI, some menus dont work yet.
Fixed uniform scaling.
Removed splash screen.
2021-09-05 10:47:05 +03:00
Muzychenko Andrey
9a10d72e1f gdrv: simplified bitmap, fixed blit, improved SDL present.
Removed some Windows dependencies.
2021-09-01 11:02:57 +03:00
Muzychenko Andrey
a09ea75d80 SDL port v1, Windows only for now.
Working: graphics, sound, music (3dpb only).
Not working: GUI, user settings.
2021-08-27 13:29:41 +03:00
Muzychenko Andrey
10c83e8bf5 Fixed sound pops introduced by WaveMix upsampler.
This does not fix WINE issues, but at least you don’t have to up sample manually.
2021-08-19 09:29:32 +03:00
Muzychenko Andrey
d5b44e44e1 Improved wav duration calculation - now supports sample rates other than 11025.
Bumped build tool version to VS2019.
2021-08-18 12:44:26 +03:00
George McMullen
db08631ab9
Fix to the routine that opens the MIDI file.
In the original source code for Space Cadet and its related games, the MIDI sound track is opened with MCI_OPEN_TYPE. According to Microsoft's documentation (https://docs.microsoft.com/en-us/windows/win32/multimedia/mci-open), this is for opening devices and not files. Windows' libraries were obviously robust enough to accommodate the error, but other platforms (i.e. WINE) expects things to be called the right way. The simple fix is to switch out MCI_OPEN_TYPE with MCI_OPEN_ELEMENT and move the info for the filename to the lpstrElementName variable.
2021-08-16 05:39:18 -07:00
Muzychenko Andrey
98f234fce3 Replaced GlobalAlloc with malloc.
WaveMix keeps GlobalAlloc for authenticity.
Fixed float to double casts.
Some cleanup.
2021-02-18 12:53:25 +03:00
Muzychenko Andrey
55984fbb08 Fixed x64 build warnings.
Replaced __intN with intN_t.
Some cleanup.
2021-02-16 19:03:45 +03:00
Muzychenko Andrey
5c3e9fea4c Added FT music loader.
Fixed mouse lock.
Some cleanup.
2021-02-15 18:55:54 +03:00
Muzychenko Andrey
debe52c1e0 Added scalable window, mouse controls. 2021-02-09 18:09:44 +03:00
Muzychenko Andrey
1c5256a4c6 Added table resolution support.
Only works with FT .dat file.
FT music does not work - different format.
2021-02-06 16:53:47 +03:00
Muzychenko Andrey
d594f5fdb7 Converted memory to direct pointers.
Fixed memory leaks in uninit.
Fixed some of the code analysis warnings.
Enabled /MP build.
Cleaned up the code.
2021-02-02 18:29:54 +03:00
Muzychenko Andrey
49f6132d23 Added loader for Full Tilt .dat files, v1.
Works with some data hacks in lowest resolution.
Seems to work ok, even though BL is still 3DPB.
2021-01-31 17:29:53 +03:00
Muzychenko Andrey
6ff457eb68 Cleaned up objlist_class. 2021-01-30 14:19:25 +03:00
oz
efc56e82d9 Compile releases with Windows subsystem. 2021-01-29 17:49:00 +03:00
oz
cd4679194c x64 build - no collision bug found(
Either lost in decompilation or introduced in x64 port.
2021-01-29 16:42:05 +03:00
oz
6756c54d3b splash ready.
All subs ready, phase 1 complete.
2021-01-29 14:24:49 +03:00
oz
262b098610 Some renames, cleanup partman, loader. 2021-01-28 18:01:26 +03:00
oz
74306179a7 WaveMix ready. Fixed ball Z reset in TKickout. 2021-01-28 12:46:48 +03:00
oz
77f3f52e0d WaveMix v4. 2021-01-27 18:50:24 +03:00
oz
2945069de0 WaveMix v3. 2021-01-26 17:54:54 +03:00
oz
10af864767 WaveMix v2. 2021-01-25 17:46:50 +03:00
oz
e824307b27 WaveMix v1. 2021-01-24 17:30:37 +03:00
oz
b0080fd80a Sound ready. 2021-01-23 19:28:29 +03:00
oz
7d15427dd9 midi ready, TCollision cleanup. 2021-01-23 13:33:30 +03:00
oz
683e823193 control ready. 2021-01-23 09:57:16 +03:00
oz
847eb15d02 control: removed tag casts. 2021-01-22 12:53:16 +03:00
oz
bdf2d930fd control v3. 2021-01-21 17:58:05 +03:00
oz
d4febb4082 control v2. 2021-01-20 17:28:48 +03:00
oz
5252fb1b7e TRamp, TPinballTable ready. 2021-01-19 18:28:48 +03:00
oz
f22077d8c8 TSink, TDemo ready. 2021-01-18 18:30:19 +03:00
oz
7e8f52c156 TDrain, TKickout, TLightBargraph, TPopupTarget, TSoloTarget ready. 2021-01-17 18:26:03 +03:00
oz
ffd626fbc1 TBlocker, TBumper, TFlagSpinner, TGate, THole, TKickback, TWall ready. 2021-01-16 17:45:29 +03:00
oz
61fe0410b0 TFlipper, TFlipperEdge ready. 2021-01-10 15:22:06 +03:00
oz
87b4aa27e7 TFlipperEdge v1. 2021-01-09 19:11:03 +03:00
oz
d19fb0476a TRollover, TOneway, TLightRollover, TTripwire, TEdgeManager ready. 2021-01-08 18:50:12 +03:00
oz
9bd064bf15 TPlunger ready. TEdgeManager v1. 2021-01-07 19:00:38 +03:00
oz
1ea247e185 pb, cheats ready.
Collison v1, mouse fixed.
2021-01-06 17:06:50 +03:00
oz
d267fd5c98 Fixed uninitialized memory. 2021-01-05 15:12:54 +03:00
oz
8b1f6f4cfa TLightGroup ready. 2021-01-05 12:02:43 +03:00
oz
230c981144 TLight, TTimer, TSound, TComponentGroup ready. 2021-01-01 16:14:11 +03:00
oz
a143b820af TBall, nudge v1, ready.
render occlude list.
2020-12-27 18:19:36 +03:00
oz
99fba56a34 TPinballTable v2. 2020-12-25 16:46:06 +03:00
oz
3097edf526 TTableLayer v1. 2020-12-20 14:13:12 +03:00
oz
a6425b54f3 control v1. 2020-12-19 17:49:31 +03:00
oz
12066963f0 key mapper dialog, ready. 2020-12-13 16:05:19 +03:00
oz
2da95a2e8a score, high_score ready.
Added dialog rc.
2020-12-12 16:36:20 +03:00
oz
fe254ef03c Added icon, textbox font.
TTextBox ready.
2020-12-11 19:03:13 +03:00
oz
b412563ee3 Fixed timer. 2020-12-06 16:21:56 +03:00
oz
090beefd07 timer v1, ready.
winmain uninit.
message_handler tweaks.
2020-12-04 18:35:47 +03:00
oz
fe66d33768 TTextBoxMessage v1, ready.
TTextBox v1.
2020-12-03 17:47:36 +03:00
oz
9ffab95d8e winmain message_handler v1. 2020-12-02 20:12:34 +03:00
oz
d83c4e2b26 Proj v1, ready.
port_draw in multiple T classes.
pb v1.
proj v1, ready.
WinMain v3.
2020-11-29 18:50:49 +03:00
oz
62a63bbf2e Correct inheritance for TPinballComponent, TCollisionComponent. 2020-11-28 15:59:42 +03:00
oz
a1678120f8 vector_type is 3 x float, TCollisionComponent v1. 2020-11-28 14:39:12 +03:00
oz
0258363287 TEdgeSegment v1. 2020-11-21 18:14:40 +03:00
oz
dbb69d8976 fullscrn v2, ready. 2020-11-16 17:12:31 +03:00
oz
a4c64cc4c8 render v2, ready 2020-11-15 17:39:00 +03:00
oz
79bb0adab8 zdrv v1, ready. 2020-11-14 18:13:00 +03:00
oz
2376ffcbc1 gdrv v2, ready. 2020-11-13 19:04:58 +03:00
oz
989ba6cdb2 gdrv, render v1. 2020-11-08 18:37:59 +03:00
oz
a925b6137f winmain v2.
FuncStats doc.
2020-11-07 18:41:14 +03:00
oz
7db64ae1c6 winmain v2.
fullscrn, pb v1.
2020-11-06 16:56:32 +03:00
oz
473ed6b9d9 winmain, memory, options v1. 2020-11-05 18:44:34 +03:00
oz
4157e79c83 Table, Component v2. Strings RC. 2020-11-04 16:22:52 +03:00
oz
5e94b5b513 Score, PinbalTable, PinballComponent v1
Placeholders for T piball component classes.
2020-11-01 18:45:29 +03:00
oz
c55f6e5b98 Loader v2, ready. 2020-10-30 15:26:00 +03:00
oz
b3b4fb39ef Loader v1. 2020-10-25 17:17:26 +03:00
oz
7d141d2931 Partman v2, ready. 2020-10-24 18:30:45 +03:00
oz
375db278c4 Partman v1.
DAT file format doc.
2020-10-18 18:08:41 +03:00
oz
2d96ba2dd0 Add project files. 2020-10-04 09:28:38 +03:00