1
0
mirror of https://github.com/k4zmu2a/SpaceCadetPinball.git synced 2024-07-19 15:49:59 +02:00
Commit Graph

249 Commits

Author SHA1 Message Date
Muzychenko Andrey
4192b12c29
Removed dead sourceport link (Web by stech11845)
Ref issue #169
2023-01-26 08:16:18 +03:00
Muzychenko Andrey
10ff1143cc Refactored options: symmetric save/load. 2023-01-03 16:42:34 +03:00
Muzychenko Andrey
2d6f2c14e5 FT collision part1: AABB. 2022-12-28 08:47:44 +03:00
Muzychenko Andrey
17f11bd428 Improved frame timing display. 2022-12-13 15:06:27 +03:00
Muzychenko Andrey
6aa6472667 Added hardware ImGui renderer. 2022-12-11 09:32:40 +03:00
Muzychenko Andrey
ab3f3bd12b Updated ImGui to v1.89.2 WIP.
Fixed IdxOffset support in imgui_sdl.
2022-12-11 07:57:49 +03:00
Muzychenko Andrey
3109a8ea75 Improved player name entry in high score dialog.
Issue #165.
2022-12-09 13:01:33 +03:00
Muzychenko Andrey
2162cac977 Moved SDL mixer initialization out of partial restart loop.
This might help with issue #167.
2022-12-02 14:46:22 +03:00
Muzychenko Andrey
8e43d06e84 Improved console output: added version constants and message box texts. 2022-12-02 08:21:08 +03:00
Muzychenko Andrey
31530bef18 Added WSL build configuration for VS. 2022-11-30 08:19:20 +03:00
Muzychenko Andrey
3be26282b3 Fixed lower case .dat file loading.
Ref #164.
2022-11-22 16:31:38 +03:00
Low-power
f561cadf63
Allow loading data files with lowercase name (#164)
* Allow loading data files with lowercase name

* Added lower case support for all game data files.

Co-authored-by: Muzychenko Andrey <33288308+k4zmu2a@users.noreply.github.com>
2022-11-22 12:40:50 +03:00
Muzychenko Andrey
1391eeba81 Reordered pch includes in Sound.
This might help with #162.
Fixed switch warning.
2022-11-21 10:02:56 +03:00
Muzychenko Andrey
ea32c08c4f Added “easy mode” cheat, aka frustration-free mode.
It involves always on center post and never closing kicker gates.
Issue #161.
2022-11-21 09:49:15 +03:00
Muzychenko Andrey
80947888a0 Optimized table restart, external font loading.
Fixed memory leak related to restart.
Added window to table size adjustment on init, imperfect.
2022-11-17 15:43:59 +03:00
Low-power
6486589c4a
Fix null pointer dereferencing in SDL_GetPrefPath(3) (#163) 2022-11-17 10:10:24 +03:00
Muzychenko Andrey
3c6e1c9d47 Added rate limiter for SDL error messages.
Workaround for issue #158.
2022-10-11 13:39:33 +03:00
Muzychenko Andrey
cfaab257ed Added debug overlay for ball sprite size cutoff points. 2022-10-11 12:45:03 +03:00
Muzychenko Andrey
4ec30cf472 Render tweaks part 3: bitmap/zMap pairs. 2022-09-29 14:45:14 +03:00
Natty
e7ddebd16c
Add FullTilt lane light behavior (#157)
* Add FullTilt lane light behavior

* Replaced spaces with tabs
2022-09-23 07:42:19 +03:00
Muzychenko Andrey
7003b01e5d Render tweaks part 2: sprite set by index. 2022-09-22 17:46:00 +03:00
Muzychenko Andrey
9f0ae0434e Render tweaks part 1: refactored sprite struct.
Optimized sprite handling in render.
Fixed switch warning in control.
2022-09-21 16:43:45 +03:00
Harmann Gabrielian
1e43bdd5fa
Minor typo fixes in Russian translation (#156)
Self-explanatory.
2022-09-16 07:51:46 +03:00
Muzychenko Andrey
40672845e4 Message code enum part 6: final touches + control light cleanup.
MessageField is often used as int, so it stays unchanged.
2022-09-08 10:51:33 +03:00
Muzychenko Andrey
22603aa126 Message code enum part 5: control codes. 2022-09-07 16:01:38 +03:00
Muzychenko Andrey
dfe1665ba1 Message code enum part 4: finalized transition of Message to enum class. 2022-09-06 16:57:56 +03:00
Muzychenko Andrey
e80010e3c6 Message code enum part 3: light and light group. 2022-09-06 16:48:09 +03:00
Muzychenko Andrey
803ca14ef2 Message code enum part 2: all components except for lights. 2022-09-06 11:58:35 +03:00
Muzychenko Andrey
44d5fd5097 Message code enum part 1: global messages and some hacks. 2022-09-05 10:17:37 +03:00
Harmann Gabrielian
69fd91f003
Russian translation overhaul (#154)
* Russian translation overhaul

Most of strings were renamed according to the official localisation (bundled with russian WinXP distros, manual only), some of them I had to adapt myself.

* Rollback wormhole translation.

Co-authored-by: Muzychenko Andrey <33288308+k4zmu2a@users.noreply.github.com>
2022-09-02 07:34:54 +03:00
Muzychenko Andrey
42226a14c9 Simplified get_rc_string, merged pinball and pb. 2022-08-31 15:18:22 +03:00
Muzychenko Andrey
88f835d068 Removed unused translated texts.
Fixed translation.h include leak.
Added TTextBox font color support.
2022-08-31 11:11:21 +03:00
Alexis Murzeau
66a868083a
Add translations (#153)
* Add translations from v1

* Add font configuration (to be able to use non-latin languages)

* translations: remove includes that are already in pch.h

* translations: rename enums and avoid macros

* Fix crash when the font file doesn't exist

* translations: avoid u8 to avoid reencoding by MSVC

MSVC will read the file as ASCII and reconvert characters as UTF-8, this will corrupt characters as the file is in fact already in UTF-8.

* translations: remove NUMBER in enums

* translations: handle non existing translations gracefuly (don't crash)

Fallback to english if available, else return empty string

* Testing pull collaboration.

* Rollback: remove NUMBER in enums.

* Get rid of namespace, use header instead.

* Collapsed translated text struct and array.

* Fixed build errors and warnings.

* Simplified language list.

* All new types, locals and globals should use CamelCase.

* Removed unnecessary ImGui patch.

* Rearranged TTextBox immediate mode draw.

* Final touches: removed unused declaration in gdrv.
Removed unused Msg entries and added new check.

* Remove placeholder english texts from missing translations

Co-authored-by: Muzychenko Andrey <33288308+k4zmu2a@users.noreply.github.com>
2022-08-31 07:58:03 +03:00
Muzychenko Andrey
c1c74878df Multiball part 1: control and component changes from FT.
The result is 3DPB/FT hybrid, with control closer to 3DPB and components closer to FT.
2022-08-25 17:09:17 +03:00
Muzychenko Andrey
14a8d64b67 TLight: cleanup, code from FT, new test commands. 2022-08-24 13:32:35 +03:00
Muzychenko Andrey
acd1ad34b2 Code from FT: simplified TFlipper sprite update.
TFlipperEdge moving geometry stored in object.
2022-08-23 08:14:28 +03:00
Muzychenko Andrey
7feba1e947 Code from FT: simplified score access in TPinballComponent. 2022-08-18 16:23:29 +03:00
stech11 (SoftOrange Tech)
e9a4791322
Update README.md (#147) 2022-08-09 10:21:01 +03:00
Alexis Murzeau
a2567c1fea
Fix flipper animation and angle calculation (#150)
Checked with a slowed down flipper (reduced retractTime and extendTime)
to ensure the flipper position is correct even when not finished while
pressing the flipper control.
2022-08-09 10:04:51 +03:00
Alexis Murzeau
367f4538a3
fix gui not responding when the game is paused (#151) 2022-08-09 08:26:15 +03:00
Muzychenko Andrey
54a217c27b Fixed build with new SDL_mixer versions.
Issue #145.
2022-07-18 09:45:46 +03:00
sasodoma
6f00b57eb9
Change strings from Commation to Commendation, as it is in the original game (#144) 2022-07-11 10:09:57 +03:00
Federico Matteoni
1a610ba831
Added fexed's Android port (#143)
Forked from iscle's port
2022-07-06 09:47:47 +03:00
Muzychenko Andrey
eed3662592 Fixed HardHit detection in DefaultCollision.
Issue #141.
2022-06-15 09:10:24 +03:00
Muzychenko Andrey
5e42f37fba Fixed sound duration for missing sounds.
Issue #140.
2022-06-14 11:46:11 +03:00
Muzychenko Andrey
8017734de4 Switched positional audio to collision coordinate system.
Refactored positional audio.
2022-06-01 16:19:27 +03:00
Muzychenko Andrey
c93e11ee6b Added sprite positions to debug overlay. 2022-05-31 11:34:04 +03:00
Muzychenko Andrey
5d7d7c0822 Cleaned up positional sound. 2022-05-30 11:23:47 +03:00
Patrice Levesque
a4c6165094
Implement stereo sound. (#138)
* Implement stereo sound.

Original Space Cadet has mono sound.  To achieve stereo, the following
steps were accomplished:

- Add a game option to turn on/off stereo sound.  Default is on.

- TPinballComponent objects were extended with a method called
  get_coordinates() that returns a single 2D point, approximating the
  on-screen position of the object, re-mapped between 0 and 1 vertically
  and horizontally, {0, 0} being at the top-left.

    - For static objects like bumpers and lights, the coordinate refers
      to the geometric center of the corresponding graphic sprite, and
      is precalculated at initialization.

    - For ball objects, the coordinate refers to the geometric center of
      the ball, calculated during play when requested.

- Extend all calls to sound-playing methods so that they include a
  TPinballComponent* argument that refers to the sound source, e.g.
  where the sound comes from.  For instance, when a flipper is
  activated, its method call to emit a sound now includes a reference to
  the flipper object; when a ball goes under a SkillShotGate, its method
  call to emit a sound now includes a reference to the corresponding
  light; and so on.

  For some cases, like light rollovers, the sound source is taken from
  the ball that triggered the light rollover.

  For other cases, like holes, flags and targets, the sound source is
  taken from the object itself.

  For some special cases like ramp activation, sound source is
  taken from the nearest light position that makes sense.

  For all game-progress sounds, like mission completion sounds or ball
  drain sounds, the sound source is undefined (set to nullptr), and the
  Sound::PlaySound() method takes care of positioning them at a default
  location, where speakers on a pinball machine normally are.

- Make the Sound::PlaySound() method accept a new argument, a
  TPinballComponent reference, as described above.

  If the stereo option is turned on, the Sound::PlaySound() method calls
  the get_coordinates() method of the TPinballComponent reference to get
  the sound position.

  This project uses SDL_mixer and there is a function called
  Mix_SetPosition() that allows placing a sound in the stereo field, by
  giving it a distance and an angle.

  We arbitrarily place the player's ears at the bottom of the table; we
  set the ears' height to half a table's length.  Intensity of the
  stereo effect is directly related to this value; the farther the
  player's ears from the table, the narrowest the stereo picture gets,
  and vice-versa.

  From there we have all we need to calculate distance and angle; we do
  just that and position all the sounds.

* Copy-paste typo fix.
2022-05-30 10:35:29 +03:00
Muzychenko Andrey
cfe2691892 Optimized SDL_RenderDrawCircle.
Change mouse warping strategy in hidden test cheat.
2022-05-27 13:54:36 +03:00