3883 Commits

Author SHA1 Message Date
adam 990db1d15a Ifdef maze in comm.h causes problems with extern "C".
This straightens that out.  (`COMM_INTERNAL` needs to be
respected.)
2024-04-25 01:47:07 -04:00
adam b8e02b9c83 This is the baseline for allowing for C++ generation.
Now to hook it all up...
2024-04-25 01:03:13 -04:00
adam bbecfcfd47 Start the long road to exception readiness. 2024-04-24 21:58:14 -04:00
adam 5380bef097 Why the project I'm doing is now called COBM. 2024-04-24 21:23:33 -04:00
adam 93cd0f7324 Iota for less loops. 2024-04-24 21:22:25 -04:00
adam 17c8c9aed4 Replace qsort with std::sort 2024-04-24 21:02:34 -04:00
adam 20c0a8e258 Move the sorting into the C++ so I can make qsort disappear. 2024-04-24 20:37:46 -04:00
adam d813c3ae37 More modern memory management in the modern pstarmap file. 2024-04-24 20:05:26 -04:00
adam 34199636ed Starting hook for custom C++ or Lua gen definitions. 2024-04-24 19:42:04 -04:00
adam a40f4e0801 Start doing some C++ memory management. 2024-04-24 19:40:01 -04:00
adam 3918c56a15 To use full C++ we have to have its compiler as the linker. 2024-04-24 19:39:37 -04:00
adam d2c22dc648 A toe in the water for the first bits of pure (modern) C++ in the code.
I'll expand it from here.
2024-04-24 18:46:56 -04:00
adam 67fb344596 A simple makefile to let me use :mak in vim.
The build system here is a bit odd...
2024-04-24 15:55:15 -04:00
adam 2a4d7f40e2 Some hyperspace physics hacks...
You can go faster in hyperspace, but because of the inertial
calculations, it gets a bit janky in hyperspace slow-down...
2024-04-24 15:53:49 -04:00
adam 703bc6114e Some of my hacky system generation playing.
I'll probably roll all this back, but now I can hack around with
putting new starbases in systems, playing with the map, etc.

Then I might be able to look into auto-gen stuff!
2024-04-24 15:52:53 -04:00
adam 048e97450e Some C++ compat. 2024-04-24 15:52:31 -04:00
adam 96fb179e4b Make slave-shields be blue... just a bit of a tweak.
A bit hacky for now...
2024-04-24 15:51:54 -04:00
adam af26d16562 Permit up to 5 moons. 2024-04-24 10:14:41 -04:00
adam 104cc02ed1 Starbase menu is now accessible by a function.
The original game did a bunch of one-off specifics to enter the
starbase menu.  Since I want to make this available in multiple
places (even via script... and maybe by *building* new starbases),
I'll need a simple function to call.

I've tested it by making the Chmmr and Syreen starbase both call
this function -- it works.  (It's kinda neat to have starbases
all over the galaxy!  It totally makes for a different kind of
game.)

Of course, since I intend to make all planet stuff customizable
via Lua -- one can make their own game have whatever they want.
A main starbase, which might get conquered and then have to be
relocated could be interesting.  I aim to make "nearly anything"
possible.
2024-04-24 10:09:49 -04:00
adam bdbd7158b9 Dynamically compute the number of stars in the array. 2024-04-24 10:05:20 -04:00
adam 32a1344643 Since I intend to move to C++... let's get that started right now. 2024-04-24 09:58:35 -04:00
adam 41d31a4870 Turn off all slave shields.
Unfortunately...  Earth has no texture/resource/asset for the
zoomed-in landing.  Just the mini-map and the globe.  What's
interesting here is that this indicates that those two assets
are distinct!  I always thought they were the same.

I'll have to dig into how they're related.
2024-04-23 23:41:45 -04:00
adam 7b8f588467 Turn off the death-march.
Why?  To permit exploration for fun.

(I intend to have per-game random seeds to permit planets and star
systems to be uniquely generated, if so desired.  I'm also
considering making it so that whole constellations that aren't
associated with races can just spawn in random places, etc.)
2024-04-23 23:40:14 -04:00
adam b5759766ba What I plan to do. 2024-04-23 23:38:21 -04:00
adam 3343f6391c Add speed to the precursor ship.
This permits a lot of racing about hyperspace...  For fun and profit.

(Mostly just to explore the game world.)
2024-04-23 23:31:10 -04:00
Michael Martin d6583f2250 Fix credit 2024-04-04 21:59:55 -07:00
Michael Martin e04c4cf2d6 Fix input of trans-ASCII Unicode characters under SDL2 2022-08-17 19:08:54 -07:00
Michael Martin 5cc99564a7 Updated fix for Bug #934.
SDL1 and SDL2 have slightly different behavior regarding detection
of the NUM LOCK key. Both branches should now interpret keypad input
when in text-input mode as only text when NUM LOCK is on.
2021-11-01 20:42:29 -07:00
Michael Martin 102099e8f0 Fix typo in installsome() 2021-11-01 20:07:13 -07:00
Michael Martin 4f5cbef324 Upgrade internal libmikmod to 3.3.11.1.
This should fix music playback corruption issues reported on
64-bit ARM architectures.
2021-07-25 14:47:32 -07:00
Michael Martin 199e3748cc Update Win32 installer generation instructions 2020-12-26 20:34:23 -08:00
Michael Martin c194cd2ad9 Correctly handle Unicode Replacement Characters 2020-12-26 19:06:47 -08:00
Michael Martin 57b887c8d8 Put the Text Input code in the correct SDL version branch 2020-12-26 19:06:37 -08:00
Michael Martin 8d3698f4b7 Don't leave behind the updated Remix Pack 4 on uninstall 2020-12-25 20:43:52 -08:00
Michael Martin 83b215fd25 Fix misplaced FlashRect when renaming Captain/Ship 2020-12-25 17:55:02 -08:00
Michael Martin d15087102f Restrict SDL_Start/StopTextInput calls to the UI thread 2020-12-23 16:18:44 -08:00
Michael Martin 487ad9014d Don't try to relink frameworks through symlinks 2020-11-27 20:17:13 -08:00
Michael Martin c8eba312f4 Remove beta marker from version strings 2020-11-27 16:12:18 -08:00
Michael Martin 4b5e2974ce Remove outdated specific trademark acknowledgement 2020-11-27 15:57:02 -08:00
Michael Martin 8e95a6036f Update Win32 installer metadata for updated Remix Pack 4 2020-10-31 13:41:47 -07:00
Michael Martin c7bdd74ee6 Fix two bugs regarding stale SIS messages, from Kruzen
When entering Hyperspace on Auto-Pilot, or are intercepted by
neutral or hostile alien ships during Auto-Pilot, the text at the
top of the screen doesn't update properly until the status
would need to change. This corrects the times when DrawSisMessage
is called to keep that up-to-date as needed.

This patch was backported from the Mega-Mod.
2020-10-05 21:22:51 -07:00
Michael Martin 8da99fc5d1 Fix the ZFP dialog desync bug introduced post 0.7.
The core issue is that the sound-advancement callbacks (used only
for altering the ZFP dialog locations) were altered to be launched
asynchronously from the main thread. This meant that new dialog
could be detected before the waiting callbacks had run.

This patch moves audio callbacks back into the audio decoding thread
and protects them with the speech-channel mutex. This should
guarantee that cur_sub_chunk only appears as a value when consulting
the current subtitles after the callback has run completely.

Logic has also been added to CheckSubtitles to raise a warning in
the logs if the values get out of sync.
2020-09-27 18:01:14 -07:00
Michael Martin 5f268d85d1 Fix a render crash on Intel GPUs in 32-bit DX9 2020-08-02 17:34:37 -07:00
Michael Martin 49a6612fea Rework SDL2 render driver selection.
The "direct3d" DX9 driver is no longer skipped by default.
There is a new --renderer=VALUE option to attempt to use the named
SDL2 render driver if present and compatible.
2020-07-11 15:34:21 -07:00
Michael Martin 36050dc2fa Deeper automation of the Win32 installer 2020-06-18 21:34:24 -07:00
Michael Martin 17c64af0d3 Updated Win32 and packaging documentation 2020-06-17 22:03:26 -07:00
Michael Martin 7dd753bd55 Update the build instructions for all platforms.
Also includes packaging notes for Linux and macOS, with a placeholder
for Windows.
2020-06-12 21:08:50 -07:00
Michael Martin 1faf6c87c3 Reimplement log_displayBox on macOS.
NSRunCriticalAlertPanel was replaced with the NSAlert class in 10.3
and deprecated in 10.10. This rewrite uses that class instead.

Furthermore, original comments to the contrary, we are not compiling
with ARC and need to actually release the classes we create and allow
for an autorelease pool.
2020-06-09 18:54:32 -07:00
Michael Martin 6093fb467c Fix another pointer signedness warning 2020-06-09 18:36:39 -07:00
Michael Martin 6bcaa2a1f3 Fix SaveSummary return type 2020-06-09 18:18:36 -07:00