It's sometimes useful to be able to load a rocket-file by dragging
it onto the editor executable, or even registering the editor as
an open-handler for the rocket-filetype
Support this by accepting an optional argument that specifies the
file to load.
Shift+PgUp/PgDn was a poor choice for bookmark-browsing keys, as
it's also useful for selecting sync-data for copy/paste.
Fix this by changing the hotkeys to Alt+PgUp/PgDn instead.
A typo made the finding of the previous bookmark when the current
row is located after the last bookmark to fail. Fix this by
replacing a call to std::set<int>::rend() with a call to
std::set<int>::rbegin().
A new, unmodified document does not contain any interresting data,
let's not bother the user about saving before quitting in that
case.
fixup some code style while at it.
Some demos use datafiles; let's allow these to easily work by
adding a callback-interface for loading tracks.
The callbacks are only present in player-mode, because tracks
aren't loaded from disk in client-mode.
Create a rudimentary C# example using DX11 for rendering and XAudio2
for sound (through SlimDX). The player is hacky due to what seems to
be issues with either the implementation or documentation of XAudio2
and/or SlimDX' intergration of it.
return the status from EndDialog instead of a constant TRUE. This
is mostly about keeping the code "honest", it doesn't change
anything in reality.
Also fix up some code-style.
We previously rolled our own text <-> int conversion code for
the dialogs. Use winapi's built-in one instead.
While we're at it, fix some indentation and a return-code.
If an error happens while loading, the old document should be left
intact. Ensure this by not modifying the document until all loading
code has been run.
Proper Amiga-suport is supplied by using the AmiTCP stack when
USE_AMITCP is enabled. Add explicit OpenLibrary/CloseLibrary
calls, for those people who don't link against auto-opening
libs ala VBCC's auto.s.
Add a typedef for uint32_t (needed for network communication)
for Motorola 68k platforms.
Also add a SAS/C support for the 'inline' keyword.
Thanks to Aske Simon Christensen for help with the SAS/C support.
The current layout of the compatibility checks makes is a bit
tricky to reuse parts of a platforms quirk-arounds when adding
compiler-support.
Reorganize into three sections:
- inline support
- CRT features
- socket-stack
While we're at it, make sure we always delete all the data before
trying to re-request. This we won't get out of sync on socket-error
at that particular location.
Previously some functions returned 1 and some returned -1 on
error. There were also two internal functions that returned 0
on error and 1 on 0 on success. Fix this, and make sure we
always return -1 on error and 0 on success.
There were a couple of places where malloc-failures (out-of-memory,
really) weren't caught. This isn't a big deal on modern operating
systems, but is worth dealing with on low-end platforms.
Failures to add/delete keys should count as socket-errors, because
they cause the editor and client to become out of sync.
When seeking in MP3s, BASS needs the BASS_STREAM_PRESCAN-flag to enable
accurate seeking.
While our example uses OGG Vorbis instead of MP3, it doesn't hurt to set
the flag, and leaves one less bug-source for people who base their code
of the example.
Previously, sync_track_path could either overflow it's 'temp'
buffer by one byte, or (even worse) end up not zero-terminating
it.
Correct the code by explicitly zero-terminating the result of
strncpy, and reducing the lenght-parameter to strncat.
Unify the interface for load_track_data() and request_track_data(),
as they essentially perform the same task, but for different
compile-time configurations.
sync_update is the only code-path that can end up calling any of the
callbacks, so there's no need to store it in the device.
This is a breaking change, so all users needs to update their code
accordingly.