Skip to content

Releases: BithreenGirlen/DxLibSpineViewer

v0.3.4

25 Mar 08:46
6e600dd
Compare
Choose a tag to compare

Runtime changes

  • Use DxLib's matrix for scaling and translation in order to adjust view for Spine older than 3.6 where there is no built-in scaler.
  • Allow adding drawables later to render multiple files which are not in the same directory.
  • Rename a few functions.

Viewer changes

  • Add a menu item Image-> Add effect to add Spine as an effect.
    • Of course, the effect is required to have the same animation name and appropriate timelines.
Effect demonstration
Add.effect.mp4

v0.3.3

14 Mar 06:17
04ea8a9
Compare
Choose a tag to compare

Runtime changes

  • Split default size and scale calculation in C++ player as C does.

Viewer changes

Main window

  • Prevent the view-point from moving if animation speed had been changed.
  • Fix letting window have resizable style unintentionally.
    • Remove resizable style once video recording has been started.
    • Avoid applying resizable style to borlderless window when moving folder.
  • Add options related to window.
    • Make manual window sizing optional.
    • Revive option to toggle view-point behaviour to prioritise animation speed change.

v0.3.2

12 Mar 05:27
df194db
Compare
Choose a tag to compare

Runtime change

  • Fix access violation which happens when the slot about to be replaced has no attachment.

Viewer change

Spine setting dialogue

  • Be able to leave format specification to the application.
    • Those skeleton files which contain .skel, .bin, and .bytes in extension are regarded as binary.
    • To manually specify the format, select from drop-down list.

Main window

  • Always move view while dragging
    • Option to move view between discrete points is deleted.

v0.3.1

05 Mar 23:21
33aaa4a
Compare
Choose a tag to compare

Viewer changes

Main window

  • Allow manual resizing of window when spine is loaded.
    • Mouse wheel without combinating Ctrl would again fit the window to skeleton size.
  • Add missing view adjustment after successful loading.

Spine setting dialogue

  • Be able to move focus with tab key.
  • Specify the dialogue position when to create it.

v0.3

04 Mar 04:01
Compare
Choose a tag to compare

Runtime changes

  • Separate resizing window or back-buffer process from spine player.
    • These are now proccessed in main window.
  • Remove Win32API usage in spine player.
    • The size of screen or rendering target are now obtained through DxLib's functions.
  • Enhance efficiency of manipulation in the spine player.
    • Avoid copy where possible.
    • Remove range check inside loop.
  • Acceess skeletonData through drawable instead of directly accessing those which the spine player owns once skeleton is created.

Now dxlib_spine_player can be used with DxLib's built-in window.
Below is simpler (compared to the viewer) code using Spine runtime for DxLib.

Example code
#include "dxlib_init.h"
#include "dxlib_spine_player_c.h"

int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
	_In_opt_ HINSTANCE hPrevInstance,
	_In_ LPWSTR    lpCmdLine,
	_In_ int       nCmdShow)
{
	SDxLibInit sDxLibInit;
	if (sDxLibInit.iDxLibInitialised == -1)return 0;

	const char* szAtlasPath = R"(data\spineboy\export\spineboy.atlas)";
	const char* szSkelPath = R"(data\spineboy\export\spineboy-ess.json)";

	CDxLibSpinePlayerC sSpinePlayer;

	std::vector<std::string> atlasPaths(1, szAtlasPath);
	std::vector<std::string> skelPaths(1, szSkelPath);
	bool bRet = sSpinePlayer.SetSpineFromFile(atlasPaths, skelPaths, false);
	if (!bRet)return 0;

	std::pair<int, int> iDisplaySize;
	DxLib::GetDisplayMaxResolution(&iDisplaySize.first, &iDisplaySize.second);
	DxLib::SetGraphMode(iDisplaySize.first * 10 / 16, iDisplaySize.second * 10 / 16, 32);
	float fDelta = 1 / static_cast<float>(DxLib::GetRefreshRate());

	int keyboardState[256]{};
	std::pair<int, int> iMouseStartPos;
	int iForeMouseState = 0;

	while (DxLib::ProcessMessage() != -1)
	{
		DxLib::GetHitKeyStateAllEx(keyboardState);
		if (keyboardState[KEY_INPUT_ESCAPE] == -1)
		{
			break;
		}
		else if (keyboardState[KEY_INPUT_A] == -1)
		{
			sSpinePlayer.SwitchPma();
		}

		int iCurrentMouseState = DxLib::GetMouseInput();
		if ((iCurrentMouseState & MOUSE_INPUT_LEFT) && !(iForeMouseState & MOUSE_INPUT_LEFT))
		{
			DxLib::GetMousePoint(&iMouseStartPos.first, &iMouseStartPos.second);
		}
		else if (!(iCurrentMouseState & MOUSE_INPUT_LEFT) && (iForeMouseState & MOUSE_INPUT_LEFT))
		{
			std::pair<int, int> iMouseEndPos;
			DxLib::GetMousePoint(&iMouseEndPos.first, &iMouseEndPos.second);

			int iX = iMouseStartPos.first - iMouseEndPos.first;
			int iY = iMouseStartPos.second - iMouseEndPos.second;
			if (iX == 0 && iY == 0)
			{
				sSpinePlayer.ShiftAnimation();
			}
			else
			{
				sSpinePlayer.MoveViewPoint(iX, iY);
			}
		}
		else if (!(iCurrentMouseState & MOUSE_INPUT_MIDDLE) && (iForeMouseState & MOUSE_INPUT_MIDDLE))
		{
			sSpinePlayer.ResetScale();
		}
		iForeMouseState = iCurrentMouseState;

		DxLib::ClearDrawScreen();

		sSpinePlayer.Redraw(fDelta);

		DxLib::ScreenFlip();
	}

	return 0;
}

Viewer changes

  • Prevent window resizing when spine is not yet loaded.
  • Enlarge manipulation dialogue for all the list-views to be equal size.
    • This dialogue can be manually resized once client area is double-clicked.

v0.2.6

29 Jan 04:52
Compare
Choose a tag to compare
  • Fix access violation in searching slot to re-attach.
  • Simplify the way to find file with specific extensions.
  • Prevent opening file-select-dialogue under recording.

v0.2.5

08 Jan 01:42
684d086
Compare
Choose a tag to compare
  • Subdivide menu to separate functions related to window behaviour.
  • Add a feature to change attachment.
    • The feature is available only when there are slots associated with multiple attachments.
      • Even if it is possible to change attachment, it depends on timelines whether it is appropriate or not.
    • One of the purpose of this feature is to make appear the attachment which is associated with atlas region, but is used nowhere.
      • Below is an example skeleton file containing slots associated with multiple attachments.
        Interchangeable attachments
        • 3_4 is assocaited with single attachment while GG is with multiple ones. The latter has replaceable candidates, the former does not.
    • As said, it is allowed to change the attachment with that which is used in another animation. But in this case, it is not guaranteed to work well because of the difference of timelines.
      • Below is an example to replace attachment with those of another animation.
example
Re-attachment.mp4

v0.2.4

24 Dec 05:24
1b66eee
Compare
Choose a tag to compare
  • Add context menu items to snap screen as JPG, and to record screen into H264.
    • The video recording is available only for Intel CPU for the time being because Ryzen 5800U failed to encode video with Microsoft Media Foundation.

v0.2.3

13 Dec 05:47
14ada3e
Compare
Choose a tag to compare
  • Write GIF metadata properly.
    • Previously, frame metadata were written along with global metadata that the header had been duplicated.
  • Allow manipulation dialogue to be resized if necessary.
    • Left-double-click on client area enables resizing through dragging the window edges.
    • The calculation for listview width is also corrected.
  • Tidy up DxLib setup.
    • Put Windows specific functions properly into macro block.
    • Disable device reset regardless of window mode.

v0.2.2

15 Nov 06:58
a1e8199
Compare
Choose a tag to compare
  • Set locale to UTF8 and get rid of conversion to ANSI code-page.
    • Previously, filepath was converted to ANSI code-page because Spine's default extension uses fopen(). But this causes loading failure if the filepath contains characters which cannot be represented by system's ANSI code-page.
    • UTF8 in Universal C Runtime has been supported since Windows 10 build-version 17134.
  • Be able to zoom without resizing window.
    • Ctrl + mouse wheel scales skeleton only.
    • When window is about to be resized, its size will be fitted to the largest slot again.