Compare commits

...
Sign in to create a new pull request.

135 commits

Author SHA1 Message Date
Scott Duensing
f62bd1ed30 Singe 2.10 Released! 2024-03-26 20:24:48 -05:00
Scott Duensing
767c1290cb Windows, Mac, Linux, and Pi building again. 2024-03-18 20:40:43 -05:00
Scott Duensing
519ae04cc3 Updated threaded model to not be dependent on framerate. 2023-12-22 19:45:08 -06:00
Scott Duensing
6c6a635484 Beta 6 is out. Pi 5 working. On to 7! 2023-12-21 18:47:15 -06:00
Scott Duensing
0914c760a1 64 bit Raspberry Pi builds working. 2023-12-19 21:52:26 -06:00
Scott Duensing
3021501a6e Start of Singe manual. 2023-12-18 21:48:23 -06:00
Scott Duensing
ac028730c5 Added version information to Singe API. 2023-12-18 17:58:34 -06:00
Scott Duensing
4b68c49ce6 New keyboard code tested. New non-event-driven framework started. 2023-12-17 01:10:53 -06:00
Scott Duensing
b81eeb3324 Added json.lua. Added more keyboard API methods. 2023-12-15 18:00:11 -06:00
Scott Duensing
b1bc8aa063 Added Lua modules: Copas, binaryheap, and timerwheel. 2023-12-12 20:31:05 -06:00
Scott Duensing
4ea35bed7d Updating licensing. 2023-12-05 19:06:55 -06:00
Scott Duensing
b3f8fe1984 Language code to name support. Segfault fixed in multilanguage video loader. 2023-12-05 17:42:07 -06:00
Scott Duensing
277252d040 That was quick. Headed to Beta 5. 2023-12-04 21:41:21 -06:00
Scott Duensing
9fa732126d Moving to Beta 4. 2023-12-04 21:10:41 -06:00
Scott Duensing
8d5de6db89 Language codes are now available for audio tracks to determine which is which. 2023-12-04 19:57:04 -06:00
Scott Duensing
e1a11f49d4 Animated sprites! 2023-12-03 20:04:31 -06:00
Scott Duensing
89b8bb427d Changed the 1/0 for the "center" drawing parameter to be true/false. 2023-12-01 20:21:32 -06:00
Scott Duensing
5173a88dc8 Video can now be scaled, rotated, and anti-aliased. 2023-12-01 20:08:31 -06:00
Scott Duensing
edbad04ca6 Multiple audio track support added to command line and games.dat. 2023-12-01 19:01:03 -06:00
Scott Duensing
b0a66bf4a4 Multiple audio tracks now supported. 2023-11-30 20:48:13 -06:00
Scott Duensing
191001e3a6 libpng warnings commented out. 2023-11-27 22:31:09 -06:00
Scott Duensing
c614cb55df Beta 2. No longer using STB_Image. 2023-11-27 20:46:37 -06:00
Scott Duensing
6d29632daf Singe 2.10 Beta 1 released. Headed into Beta 2. 2023-11-27 17:41:21 -06:00
Scott Duensing
ca8c4c04ce Added spriteRotateAndScale() 2023-11-26 21:53:02 -06:00
Scott Duensing
e9eade1d2f Windows x86_64 building. 2023-11-26 21:22:23 -06:00
Scott Duensing
72357a6dbd Windows fixes. 2023-11-26 21:20:28 -06:00
Scott Duensing
ddb280ad26 Windows fixes. 2023-11-26 21:18:16 -06:00
Scott Duensing
4d325c447e Windows fixes. 2023-11-26 21:13:33 -06:00
Scott Duensing
d0c4f1da8b Adjusting what files are allowed in game archives. 2023-11-26 20:03:47 -06:00
Scott Duensing
2c581919b8 Linux x86_64 builds from clean Mint install. 2023-11-26 20:01:24 -06:00
Scott Duensing
b9b6236981 Singe Toolbar for ZB is working! 2023-11-24 22:13:53 -06:00
Scott Duensing
48564570b3 More work on ZB integration. 2023-11-23 17:57:47 -06:00
Scott Duensing
71fda963ae Start of ZeroBrane Studio integration. 2023-11-22 20:58:07 -06:00
Scott Duensing
9c08013026 Some minor framework tweaks. 2023-11-20 20:33:42 -06:00
Scott Duensing
448c58e20e CHANGELOG added. Menu now naturally sorts names. Tool and Patch package types added to auto-installer. 2023-11-19 21:49:09 -06:00
Scott Duensing
881fb4de3f Scaling and rotation working. 2023-11-19 18:44:24 -06:00
Scott Duensing
a7f96f25b4 Added sprite rotation and scaling. 2023-11-18 20:20:47 -06:00
Scott Duensing
206d537c3e Replaced module injection with proper module searcher for Lua. 2023-11-18 18:38:51 -06:00
Scott Duensing
095835ec8c Starting to embed Lua based modules. 2023-11-17 21:29:11 -06:00
Scott Duensing
fd1a2951ff Singe now checks the validity of games before unpacking them. 2023-11-17 20:12:33 -06:00
Scott Duensing
de6d5f1fe5 SSL and HTTPS now supported for scripts. 2023-11-16 22:15:24 -06:00
Scott Duensing
ea544996f1 Starting to patch games that leak memory. 2023-11-16 22:14:46 -06:00
Scott Duensing
36ea0b4d7e Fixed controllers being lost when using the menu. 2023-11-16 19:10:57 -06:00
Scott Duensing
5272605211 Fixed asset transparency when embedding. 2023-11-15 21:26:16 -06:00
Scott Duensing
cbff5c1418 Singe now automatically unpacks ".game" files. 2023-11-14 22:16:48 -06:00
Scott Duensing
ea0fc55ac8 Added Singe program tracing for tech support. 2023-11-13 22:25:46 -06:00
Scott Duensing
1dc71c6e57 Fixed libxmp preventing mod.h from being committed. 2023-11-08 21:12:26 -06:00
Scott Duensing
17e2ff9c6b Linux and Windows building. 2023-11-08 21:07:51 -06:00
Scott Duensing
799ba82cee Intel Linux building again. 2023-11-08 20:09:39 -06:00
Scott Duensing
42f2b7003c Fixing missing files from repo. 2023-11-08 17:57:52 -06:00
Scott Duensing
6802761e49 Migrating to using Toolchains compilers. 2023-11-07 21:25:51 -06:00
Scott Duensing
642742a1c8 32 Bit Builds Working. 2023-10-26 21:20:44 -05:00
Scott Duensing
59c7ef3ec8 Windows is building again. 2023-10-25 17:44:15 -05:00
Scott Duensing
62d2a5344f Working on Win32 build. 2023-10-23 21:07:30 -05:00
Scott Duensing
94f83e7608 Major reorganization to start work on Singe 2.10. 2023-10-23 19:38:18 -05:00
Scott Duensing
996925ce4c Added packaging script. 2020-10-25 14:09:31 -05:00
Scott Duensing
6711bee321 Added documentation. 2020-10-25 13:19:27 -05:00
Scott Duensing
55df0fc332 Singe 2.00 FINAL! Whoo hoo! 2020-10-25 13:12:07 -05:00
Scott Duensing
8c0840af12 Mouse detection was bassackwards. Thanks pjft! 2020-10-17 18:47:02 -05:00
Scott Duensing
ea7d9d97cf Removed options that break mouse input. Allow Singe to run with no mouse connected. 2020-10-17 15:35:01 -05:00
Scott Duensing
ed24346bf8 Fixed Windows build for new gcc. Daphne API calls now in framework, not compiled code. Analog control sends keypresses more like keyboard code. Menu starts fullscreen. Spelling error in menu code fixed. onSoundCompleted() failure will no longer terminate Singe. 2020-10-01 21:33:43 -05:00
Scott Duensing
511e6d4c28 Window resizing now checks if it's really a window. 2020-05-04 18:52:25 -05:00
Scott Duensing
98a9014f3f Forgot a file. 2020-05-01 20:19:50 -05:00
Scott Duensing
c49fe5afe4 Crazy memory bugs fixed. Menu improved. 2020-05-01 20:18:56 -05:00
Scott Duensing
aff5341801 Singe now properly pre-loads embedded Lua C libraries. 2020-04-09 21:06:05 -05:00
Scott Duensing
405881f2d7 LuaSocket now working on Windows. 2020-04-09 19:45:00 -05:00
Scott Duensing
4cc9e1b6d8 LuaSocket added to Singe runtime environment. 2020-04-09 19:01:23 -05:00
Scott Duensing
e8779a528e Two sound API bugs slipped into b14. Fixed. 2020-04-02 20:56:22 -05:00
Scott Duensing
127ac9891b Menu fixed, path problems on Windows fixed. b14 released. 2020-04-02 20:29:17 -05:00
Scott Duensing
70da276a58 Far stricter error checking in scripts. 2020-04-01 20:16:38 -05:00
Scott Duensing
885b1cea4a Pausing implemented. 2020-04-01 19:36:40 -05:00
Scott Duensing
39748f28fb Build changes. 32 bit Linux/Windows/macOS now supported. 2020-04-01 18:49:42 -05:00
Scott Duensing
9535e202b9 First working menu script. 2020-03-30 20:20:40 -05:00
Scott Duensing
98ff928553 Menu script working. 2020-03-29 22:13:50 -05:00
Scott Duensing
b14335a736 Minor change for compatability with Singe 1.x. Three-number background colors default to being transparent now. 2020-03-25 14:14:19 -05:00
Scott Duensing
fe607e6682 Overlay now using blending instead of color key for transparency. Data folder automatically generates subdirectory names for individual games. Beta 12 released. 2020-03-23 18:20:45 -05:00
Scott Duensing
c885b533dd New script* API methods. Untested. 2020-03-22 19:38:23 -05:00
Scott Duensing
a1a54548d5 Start of menu embeds. 2020-03-22 16:36:07 -05:00
Scott Duensing
9fef1c8a3f Added LuaFileSystem to Singe runtime. 2020-03-22 15:24:59 -05:00
Scott Duensing
ffd8a7abd3 Start of the video* API methods. 2020-03-21 20:31:06 -05:00
Scott Duensing
cc14222fcd Overlay resolution option, basic drawing primitives for debugging. 2020-03-18 20:45:00 -05:00
Scott Duensing
598b5eff5e First successful macOS compile. Untested binary. 2020-03-18 18:30:37 -05:00
Scott Duensing
9d31928789 macOS prereqs building. Ugly, bit it worked. 2020-03-17 20:20:38 -05:00
Scott Duensing
8ecb918ea3 Added sample game metadata file. 2020-03-15 18:23:30 -05:00
Scott Duensing
a6b6a11846 Reorganized internals to allow executing multiple Singe scripts. 2020-03-15 17:47:47 -05:00
Scott Duensing
9e943584aa Fixed waiting on extra keypress to exit on Windows and onOverlayUpdated() not being called for every video frame. 2020-03-15 16:28:33 -05:00
Scott Duensing
4f7c0c38b3 overlayPrint() fixed. Console and Logo suppression separated. Unwanted console window on Windows fixed. Mouse mapping matches Singe 1.xx. 2020-03-14 17:31:10 -05:00
Scott Duensing
bd35674b21 Added getMousePosition() and getControllerAxis() 2020-03-11 20:54:48 -05:00
Scott Duensing
f9b2be5a2e Starting b10 2020-03-11 19:36:43 -05:00
Scott Duensing
ed1ed67292 New input mapping complete! 2020-03-11 19:07:33 -05:00
Scott Duensing
5984352744 First (mostly) working gamepad support. 2020-03-10 21:28:23 -05:00
Scott Duensing
d9480da470 Fixed a couple Windows errors. 2020-03-08 19:14:52 -05:00
Scott Duensing
f7a10cc921 First pass at keyboard/control mapping. More to do. Screenshot function fixed. 2020-03-08 19:06:58 -05:00
Scott Duensing
24cf564401 New Framework.singe and controller configuration mapping. 2020-03-06 18:57:56 -06:00
Scott Duensing
1127e608c2 Start of re-configurable controls. 2020-03-04 20:01:20 -06:00
Scott Duensing
1a176f2270 Lots of path and file name issues resolved. 2020-02-27 18:53:46 -06:00
Scott Duensing
fc859dc05c Another audio sync fix, Pi build, initial Sinden lightgun support, indexing display, and more. 2020-02-16 17:33:08 -06:00
Scott Duensing
57bb9c7703 Framefiles can now contain videos without matching audio tracks. 2020-02-04 19:59:57 -06:00
Scott Duensing
c54101b14b All new argument parser. 2020-02-04 19:44:15 -06:00
Scott Duensing
7cba775e18 Full-screen Pi 4 is working. 2020-02-03 21:32:02 -06:00
Scott Duensing
15bf492127 Start of allowing for dynamic builds. 2020-02-02 20:03:21 -06:00
Scott Duensing
f365a11b2f Still working on Pi build. 2020-02-02 18:46:45 -06:00
Scott Duensing
ff45c64b7f Sinden border and overscan options added. Pi video working. 2020-01-29 21:13:44 -06:00
Scott Duensing
23b4b8f13a Pi built! 2020-01-27 21:10:45 -06:00
Scott Duensing
5a52724c19 New mostly-not-horrible splash graphics. 2020-01-18 18:05:41 -06:00
Scott Duensing
dc5f3e6716 Audio desync fixed (I hope). Start of Pi build. 2020-01-17 18:02:17 -06:00
Scott Duensing
675e54462b Ability to disable console and logos. Logos added. Audio buffer reduced. 2020-01-08 19:42:55 -06:00
Scott Duensing
21596d97ec Font issues fixed. Several framefile issues fixed. Trace file now in data directory. Framefile debugging added. 2020-01-07 19:11:54 -06:00
Scott Duensing
a8d8fc8556 Added stopped disc blue display. Fixed single file video loading. Oops. 2020-01-06 18:18:31 -06:00
Scott Duensing
b03a96f3b6 Fixed framefile reading bug, sound stopping when out of channels, added Windows icon and resources. 2020-01-06 18:04:17 -06:00
Scott Duensing
bd0ab45792 Initial framefile and split m2v/ogg support. 2020-01-05 18:29:52 -06:00
Scott Duensing
ece26e81ff overlayPrint() implemented. 2019-12-31 18:39:10 -06:00
Scott Duensing
aa16512939 Fixed right-channel missing bug in disc audio mixer. Fixed discAudio() command. 2019-12-31 17:51:57 -06:00
Scott Duensing
94071d5ec1 Fixed disc search/skip/step behavior to match Singe 1.18. 2019-12-30 18:21:01 -06:00
Scott Duensing
27c897e8e1 Changed how disc pausing and playing works with search, skip, and step operations. 2019-12-29 20:50:54 -06:00
Scott Duensing
9b1505c5f1 Windows build! 2019-12-29 17:47:16 -06:00
Scott Duensing
0a2ad6e09e Windows dependencies now building, except for mp3 support. 2019-12-27 18:12:41 -06:00
Scott Duensing
11c80af82f Still working on getting all the dependencies to cross-compile properly. 2019-12-26 20:38:46 -06:00
Scott Duensing
be5e72fc6b We can play Blue Thunder! 2019-12-11 20:58:36 -06:00
Scott Duensing
70dd504b7b Overlay is now using Surfaces instead of Textures. 2019-12-11 20:41:10 -06:00
Scott Duensing
794177b078 Before converting overlay to a Surface. 2019-12-11 19:01:07 -06:00
Scott Duensing
1ccc25d337 Added --trace 2019-12-10 20:29:29 -06:00
Scott Duensing
93481c1f66 Compiles and starts to run scripts. 2019-12-06 20:18:47 -06:00
Scott Duensing
9f44dc055c Keyboard and mouse mostly implemented. 2019-12-05 21:30:23 -06:00
Scott Duensing
fa91f8e281 Massive amount of untested Singe code added. 2019-12-04 21:32:31 -06:00
Scott Duensing
90a24f67d4 Command line option parsing complete. 2019-12-01 19:12:12 -06:00
Scott Duensing
a68e114c1e Libraries mostly correct on Linux now. 2019-11-29 19:05:27 -06:00
Scott Duensing
1de2f4a4e9 Working on building all dependencies. 2019-11-27 18:09:56 -06:00
Scott Duensing
913d0599af Working video player! 2019-11-26 19:29:54 -06:00
Scott Duensing
06632fbcd7 SDL_mixer now playing video stream audio! 2019-11-24 19:25:48 -06:00
Scott Duensing
1f43bfc742 First pass at using SDL_mixer. It's bad. 2019-11-23 21:45:10 -06:00
Scott Duensing
e7fd48a432 Changed license to GPL2 so we can statically link everything into one glorious binary. 2019-11-20 21:31:36 -06:00
Scott Duensing
24a6543232 Adding needed SDL libraries. 2019-11-19 21:59:26 -06:00
Scott Duensing
a3c83bb0c6 FFMS2 and Lua now statically building with Singe. 2019-11-19 20:03:11 -06:00
Scott Duensing
04a89a6a79 Added license. 2019-11-18 21:26:02 -06:00
64841 changed files with 13854439 additions and 48840 deletions

73
.gitattributes vendored Normal file
View file

@ -0,0 +1,73 @@
#
# Image
#
*.xcf filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.gif filter=lfs diff=lfs merge=lfs -text
*.bmp filter=lfs diff=lfs merge=lfs -text
*.avif filter=lfs diff=lfs merge=lfs -text
*.tiff filter=lfs diff=lfs merge=lfs -text
*.ico filter=lfs diff=lfs merge=lfs -text
*.jxl filter=lfs diff=lfs merge=lfs -text
*.pcx filter=lfs diff=lfs merge=lfs -text
*.pnm filter=lfs diff=lfs merge=lfs -text
*.pgm filter=lfs diff=lfs merge=lfs -text
*.qoi filter=lfs diff=lfs merge=lfs -text
*.tga filter=lfs diff=lfs merge=lfs -text
*.webp filter=lfs diff=lfs merge=lfs -text
*.tif filter=lfs diff=lfs merge=lfs -text
*.jbg filter=lfs diff=lfs merge=lfs -text
#
# Other Binary
#
*.exe filter=lfs diff=lfs merge=lfs -text
*.dll filter=lfs diff=lfs merge=lfs -text
*.dat filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
#
# Audio
#
*.wav filter=lfs diff=lfs merge=lfs -text
*.flac filter=lfs diff=lfs merge=lfs -text
*.vgz filter=lfs diff=lfs merge=lfs -text
*.nsf filter=lfs diff=lfs merge=lfs -text
*.mp3 filter=lfs diff=lfs merge=lfs -text
*.mod filter=lfs diff=lfs merge=lfs -text
*.it filter=lfs diff=lfs merge=lfs -text
*.itz filter=lfs diff=lfs merge=lfs -text
*.MOD filter=lfs diff=lfs merge=lfs -text
*.med filter=lfs diff=lfs merge=lfs -text
*.xm filter=lfs diff=lfs merge=lfs -text
*.oxm filter=lfs diff=lfs merge=lfs -text
*.raw filter=lfs diff=lfs merge=lfs -text
*.ogg filter=lfs diff=lfs merge=lfs -text
*.opus filter=lfs diff=lfs merge=lfs -text
#
# Document
#
*.odt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.docx filter=lfs diff=lfs merge=lfs -text
#
# Video
#
*.mkv filter=lfs diff=lfs merge=lfs -text
*.avi filter=lfs diff=lfs merge=lfs -text
*.mov filter=lfs diff=lfs merge=lfs -text
*.mp4 filter=lfs diff=lfs merge=lfs -text
*.mpg filter=lfs diff=lfs merge=lfs -text
#
# Archive
#
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text

13
.gitignore vendored
View file

@ -1,8 +1,9 @@
*~
**/.builddir/
**/.git-hidden/
**/.github/
cmake-build-debug/
*.log
*.user
*.ISO
*.iso
*.m4v
*.index
*.avi
*.vob
temp/
*#

245
CHANGELOG Normal file
View file

@ -0,0 +1,245 @@
SINGE 2.10
==========
Released March 26th, 2024
New Features
------------
- spriteDraw() now has two more forms. In addition to being able to draw
regular sprites and streteched sprites it can now draw both using the
sprite's center as the anchor instead of the upper right. This is highly
useful when dealing with rotated sprites.
- Animated sprites! Both animated GIF and WEBP images are supported.
- Sprite anti-aliasing, scaling and rotation! Optional separate X & Y scaling.
- Video anti-aliasing, scaling and rotation! Optional separate X & Y scaling.
- Multiple audio track support for videos. New command line options to select
which default audio track you want (-o or --audio). For games with multiple
languages, you can specify AUDIO_TRACK in the games.dat as well.
- New keyboard methods to make handling input easier, especially multiple
keypresses for diagonal movement.
- controllerGetButton() added.
- SINGE_DEAD_ZONE global variable now available based on the DEAD_ZONE
controller configuration option.
- SINGE_FRAMEWORK_VERSION variable added.
- DIR variable added providing directory to the running script.
- All new Lua library handling. Previously Singe "injected" libraries
directly into the script context. Now there is a proper Lua module search
handler. Scripts can properly require() modules from the following:
- Lua Standard Library
- Lua Auxillary Library
- LuaFileSystem
- LuaSocket
- LuaSec
- LuaRS232
- timerwheel
- binaryheap
- Copas
- json
- New command line option: -p (or --program). This is similar to the
existing -t (or --trace) option. Where "trace" displays and logs script
execution, "program" displays and logs Singe internals. This should make
troubleshooting difficult setups and odd script crashes easier.
- Auto-installer for the new GAME, TOOL, and PATCH archive formats to make
managing games easier.
- ZeroBrane Studio (https://studio.zerobrane.com) integration for live
debugging of running Singe scripts! A full IDE for developing games!
Fixes
-----
- USB controllers now work in games launched from the included menu.
- Default controller DEAD_ZONE increased.
- Framework.singe was missing keyboard mode constants. MODE_NORMAL and
MODE_FULL are now included.
- SINGE 2.00 added two new input events but never had them in the framework.
SWITCH_BUTTON4 and SWITCH_TILT are now available.
- Taking screenshots could sometimes crash Singe.
- PNG files no longer generate warnings on the console.
- Non-VLDP videos now honor command line volume settings.
- Menu system now performs "natural sorting" of game titles instead of brain
dead "computer sorting". It should make a lot more sense paging through
games now.
- Building Singe depended on a lot of undocumented software cobbled together
from other projects. This has been vastly improved and should be usable by
actual humans now. Humans running Linux anyway.
------------------------------------------------------------------------------
SINGE 2.00
==========
Released October 25th, 2020
New Features
------------
- Complete rewrite! No more dependency on Daphne.
- Support for almost every (non-patent encumbered) video and audio format
that can be played by FFMPEG.
- High definition video.
- 32 bit color.
- Additional videos can be played on top the laserdisc video.
- Scaled sprites.
- Graphics overlay resolution no longer dependent on video resolution.
- Analog controllers.
- LuaSocket and LuaFileSystem added to runtime.
- Ability to chain scripts together for menus or launchers.
- Specify if you want gun games to display on-screen crosshairs or not.
- Menu for launching games included.
- Many updates to Framework.singe to support the new APIs.
- New APIs:
- controllerGetAxis
- discGetHeight
- discGetWidth
- fontUnload
- mouseGetPosition
- mouseSetCaptured
- overlayBox
- overlayCircle
- overlayEllipse
- overlayLine
- overlayPlot
- overlaySetResolution
- scriptExecute
- scriptPush
- singeWantsCrosshairs
- soundUnload
- spriteGetHeight
- spriteGetWidth
- spriteUnload
- videoDraw
- videoGetFrame
- videoGetFrameCount
- videoGetHeight
- videoGetVolume
- videoGetWidth
- videoIsPlaying
- videoLoad
- videoPause
- videoPlay
- videoSeek
- videoSetVolume
- videoUnload
------------------------------------------------------------------------------
SINGE 1.14 - 1.19
=================
Released ?
Notes
-----
- Unofficial fan builds.
- Stand-alone releases.
New Features
------------
- New API functions:
- discPauseAtFrame
- mouseEnable
- mouseDisable
- mouseHowMany
- mouseSetMode
- singeDisablePauseKey
- singeEnablePauseKey
- singeGetScriptPath
- singeSetGameName
- soundFullStop
- soundGetVolume
- soundIsPlaying
- soundPause
- soundResume
------------------------------------------------------------------------------
SINGE 1.10 - 1.14
=================
Released ?
Notes
-----
- Unofficial fan builds.
- DLL releases for Daphne.
New Features
------------
- New API functions:
- discGetState
- keyboardGetMode
- keyboardSetMode
- singeGetPauseFlag
- singeSetPauseFlag
- singeQuit
- singeVersion
- soundStop
------------------------------------------------------------------------------
SINGE 1.00
==========
Released 2006
Notes
-----
- Original add-on for Daphne.
- Shipped with the ActionMax "emulator" and games.

419
CMakeLists.txt Normal file
View file

@ -0,0 +1,419 @@
#
# Singe 2
# Copyright (C) 2006-2024 Scott Duensing <scott@kangaroopunch.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public Licens
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
#
cmake_minimum_required(VERSION 3.22)
set(CMAKE_CXX_STANDARD 17)
project(singe2)
if(NOT DEFINED KANGAROO_OS)
set(KANGAROO_OS linux)
endif()
if(NOT DEFINED KANGAROO_ARCH)
set(KANGAROO_ARCH x86_64)
endif()
set(BUILD_DIR ${CMAKE_SOURCE_DIR}/.builddir/${KANGAROO_OS}/${KANGAROO_ARCH})
set(SINGE_SOURCE
src/main.h
src/singe.c
src/singe.h
src/util.h
src/embedded.h
src/frameFile.h
src/main.c
src/common.h
src/videoPlayer.c
src/stddclmr.h
src/frameFile.c
src/videoPlayer.h
src/util.c
)
set(ARG_PARSER_SOURCE
thirdparty/arg_parser/carg_parser.c
thirdparty/arg_parser/carg_parser.h
)
set(JBIG_SOURCE
thirdparty/jbigkit/libjbig/jbig.c
thirdparty/jbigkit/libjbig/jbig.h
thirdparty/jbigkit/libjbig/jbig_ar.c
thirdparty/jbigkit/libjbig/jbig_ar.h
)
set(LUA_SOURCE
thirdparty/lua/src/lmem.h
thirdparty/lua/src/ltm.h
thirdparty/lua/src/lutf8lib.c
thirdparty/lua/src/ldo.h
thirdparty/lua/src/ldump.c
thirdparty/lua/src/lstring.h
thirdparty/lua/src/lparser.h
thirdparty/lua/src/lcorolib.c
thirdparty/lua/src/loslib.c
thirdparty/lua/src/lparser.c
thirdparty/lua/src/ltablib.c
thirdparty/lua/src/ltable.c
thirdparty/lua/src/ljumptab.h
thirdparty/lua/src/luaconf.h
thirdparty/lua/src/lstate.c
thirdparty/lua/src/lobject.h
thirdparty/lua/src/lstate.h
thirdparty/lua/src/ldo.c
thirdparty/lua/src/lfunc.c
thirdparty/lua/src/lmathlib.c
thirdparty/lua/src/lua.h
thirdparty/lua/src/lauxlib.h
thirdparty/lua/src/ltm.c
thirdparty/lua/src/lstrlib.c
thirdparty/lua/src/lapi.h
thirdparty/lua/src/lopcodes.c
thirdparty/lua/src/lvm.h
thirdparty/lua/src/linit.c
thirdparty/lua/src/lobject.c
thirdparty/lua/src/ldebug.c
thirdparty/lua/src/lctype.c
thirdparty/lua/src/lgc.c
thirdparty/lua/src/lzio.h
thirdparty/lua/src/lgc.h
thirdparty/lua/src/lctype.h
thirdparty/lua/src/lopcodes.h
thirdparty/lua/src/llimits.h
thirdparty/lua/src/lprefix.h
thirdparty/lua/src/llex.h
thirdparty/lua/src/lundump.c
thirdparty/lua/src/lbaselib.c
thirdparty/lua/src/loadlib.c
thirdparty/lua/src/ldblib.c
thirdparty/lua/src/ldebug.h
thirdparty/lua/src/lundump.h
thirdparty/lua/src/lopnames.h
thirdparty/lua/src/ltable.h
thirdparty/lua/src/lmem.c
thirdparty/lua/src/lcode.h
thirdparty/lua/src/lua.hpp
thirdparty/lua/src/lauxlib.c
thirdparty/lua/src/liolib.c
thirdparty/lua/src/lapi.c
thirdparty/lua/src/lcode.c
thirdparty/lua/src/llex.c
thirdparty/lua/src/lstring.c
thirdparty/lua/src/lvm.c
thirdparty/lua/src/lualib.h
thirdparty/lua/src/lfunc.h
thirdparty/lua/src/lzio.c
)
set(LUA_FILESYSTEM_SOURCE
thirdparty/luafilesystem/src/lfs.c
thirdparty/luafilesystem/src/lfs.h
)
set(LUA_SOCKET_SOURCE
thirdparty/luasocket/src/luasocket.h
thirdparty/luasocket/src/luasocket.c
thirdparty/luasocket/src/timeout.h
thirdparty/luasocket/src/timeout.c
thirdparty/luasocket/src/buffer.h
thirdparty/luasocket/src/buffer.c
thirdparty/luasocket/src/io.h
thirdparty/luasocket/src/io.c
thirdparty/luasocket/src/auxiliar.h
thirdparty/luasocket/src/auxiliar.c
thirdparty/luasocket/src/compat.h
thirdparty/luasocket/src/compat.c
thirdparty/luasocket/src/options.h
thirdparty/luasocket/src/options.c
thirdparty/luasocket/src/inet.h
thirdparty/luasocket/src/inet.c
thirdparty/luasocket/src/except.h
thirdparty/luasocket/src/except.c
thirdparty/luasocket/src/select.h
thirdparty/luasocket/src/select.c
thirdparty/luasocket/src/tcp.h
thirdparty/luasocket/src/tcp.c
thirdparty/luasocket/src/udp.h
thirdparty/luasocket/src/udp.c
thirdparty/luasocket/src/mime.h
thirdparty/luasocket/src/mime.c
thirdparty/luasocket/src/socket.h
thirdparty/luasocket/src/pierror.h
)
if(WIN32)
set(LUA_SOCKET_SOURCE
${LUA_SOCKET_SOURCE}
thirdparty/luasocket/src/wsocket.h
thirdparty/luasocket/src/wsocket.c
)
ELSE()
set(LUA_SOCKET_SOURCE
${LUA_SOCKET_SOURCE}
thirdparty/luasocket/src/usocket.h
thirdparty/luasocket/src/usocket.c
thirdparty/luasocket/src/unix.h
thirdparty/luasocket/src/unix.c
thirdparty/luasocket/src/unixstream.h
thirdparty/luasocket/src/unixstream.c
thirdparty/luasocket/src/unixdgram.c
thirdparty/luasocket/src/unixdgram.h
thirdparty/luasocket/src/serial.c
)
ENDIF()
set(LUASEC_SOURCE
thirdparty/luasec/src/compat.h
thirdparty/luasec/src/config.c
${BUILD_DIR}/generated/luasec_options.c
thirdparty/luasec/src/context.c
thirdparty/luasec/src/context.h
thirdparty/luasec/src/ec.c
thirdparty/luasec/src/ec.h
thirdparty/luasec/src/options.h
thirdparty/luasec/src/ssl.c
thirdparty/luasec/src/ssl.h
thirdparty/luasec/src/x509.c
thirdparty/luasec/src/x509.h
)
set(LUA_RS232_SOURCE
thirdparty/librs232/bindings/lua/luars232.c
thirdparty/librs232/src/rs232.c
)
if(WIN32)
set(LUA_RS232_SOURCE
${LUA_RS232_SOURCE}
thirdparty/librs232/src/rs232_windows.c
)
ELSE()
set(LUA_RS232_SOURCE
${LUA_RS232_SOURCE}
thirdparty/librs232/src/rs232_posix.c
)
ENDIF()
set(UTHASH_SOURCE
thirdparty/uthash/src/uthash.h
thirdparty/uthash/src/utlist.h
)
set(MANYMOUSE_SOURCE
thirdparty/manymouse/linux_evdev.c
thirdparty/manymouse/macosx_hidmanager.c
thirdparty/manymouse/macosx_hidutilities.c
thirdparty/manymouse/manymouse.c
thirdparty/manymouse/manymouse.h
thirdparty/manymouse/windows_wminput.c
thirdparty/manymouse/x11_xinput2.c
)
set(SDL2_GFX_SOURCE
thirdparty/SDL2_gfx/SDL2_rotozoom.h
thirdparty/SDL2_gfx/SDL2_rotozoom.c
)
add_executable(${CMAKE_PROJECT_NAME}
${SINGE_SOURCE}
${ARG_PARSER_SOURCE}
${JBIG_SOURCE}
${LUA_SOURCE}
${LUA_FILESYSTEM_SOURCE}
${LUA_SOCKET_SOURCE}
${LUASEC_SOURCE}
${LUA_RS232_SOURCE}
${UTHASH_SOURCE}
${MANYMOUSE_SOURCE}
${SDL2_GFX_SOURCE}
)
# Perform pre-build operations.
#add_custom_target(BUILD_PREREQS
# COMMAND ${BUILD_DIR}-deps.sh "${CMAKE_SOURCE_DIR}"
# BYPRODUCTS
# ${CMAKE_SOURCE_DIR}/thirdparty-installed/lib/libarchive.a
#)
#add_dependencies(${CMAKE_PROJECT_NAME} BUILD_PREREQS)
if(WIN32)
# Note: _WIN32_WINNT=0x0600 sets the minimum compatible version of
# Windows to Vista. The function inet_pton() does not exist before then.
set(DEFINE_LIST
-Dmain=SDL_main
-D_WIN32_WINNT=0x0600
)
else()
set(DEFINE_LIST)
endif()
target_compile_options(${CMAKE_PROJECT_NAME} PUBLIC
${DEFINE_LIST}
-DRS232_STATIC
-DFFMS_STATIC
-Wno-deprecated-declarations
)
target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC
${BUILD_DIR}
${BUILD_DIR}/include
${BUILD_DIR}/include/SDL2
thirdparty/lua/src
thirdparty/luasec/src
thirdparty/librs232/include
)
target_link_directories(${CMAKE_PROJECT_NAME} PUBLIC
${BUILD_DIR}/lib
)
if(${KANGAROO_OS} STREQUAL "linux")
set(LIB_LIST
-lX11
-lvdpau
${BUILD_DIR}/lib/libjpeg.a
${BUILD_DIR}/lib/libpng.a
-lstdc++
)
endif()
if(${KANGAROO_OS} STREQUAL "pi")
set(LIB_LIST
${BUILD_DIR}/lib/libjpeg.a
${BUILD_DIR}/lib/libpng.a
-lstdc++
)
endif()
if(${KANGAROO_OS} STREQUAL "macos")
set(LIB_LIST
-Wl,-framework,CoreVideo
-Wl,-framework,Cocoa
-Wl,-framework,IOKit
-Wl,-framework,ForceFeedback
-Wl,-framework,Carbon
-Wl,-framework,CoreAudio
-Wl,-framework,AudioToolbox
-Wl,-framework,AVFoundation
-Wl,-framework,Foundation
-Wl,-weak_framework,GameController
-Wl,-weak_framework,Metal
-Wl,-weak_framework,QuartzCore
-Wl,-weak_framework,CoreHaptics
-liconv
-lc++
${OSXCROSS_TARGET_DIR}/darwin/libclang_rt.osx.a
)
endif()
if(${KANGAROO_OS} STREQUAL "windows")
set(LIB_LIST
-mwindows
-static
-lmingw32
-latomic
-lole32
-luser32
-lkernel32
-lgdi32
-lwinmm
-limm32
-loleaut32
-lversion
-luuid
-ladvapi32
-lsetupapi
-lshell32
-ldinput8
-lws2_32
-lbcrypt
-lssp
-lcrypt32
${BUILD_DIR}/lib/libjpeg.a
${BUILD_DIR}/lib/libpng.a
-lstdc++
)
endif()
set(LIB_LIST
${LIB_LIST}
${BUILD_DIR}/lib/libarchive.a
${BUILD_DIR}/lib/libavcodec.a
${BUILD_DIR}/lib/libavdevice.a
${BUILD_DIR}/lib/libavfilter.a
${BUILD_DIR}/lib/libavformat.a
# ${BUILD_DIR}/lib/libavif.a
${BUILD_DIR}/lib/libavutil.a
# ${BUILD_DIR}/lib/libbrotlicommon-static.a
# ${BUILD_DIR}/lib/libbrotlidec-static.a
${BUILD_DIR}/lib/libbz2_static.a
# ${BUILD_DIR}/lib/libdav1d.a
${BUILD_DIR}/lib/libffms2.a
${BUILD_DIR}/lib/libfreetype.a
# ${BUILD_DIR}/lib/libharfbuzz.a
# ${BUILD_DIR}/lib/libhwy.a
# ${BUILD_DIR}/lib/libjxl_dec.a
${BUILD_DIR}/lib/liblzma.a
${BUILD_DIR}/lib/libopus.a
${BUILD_DIR}/lib/libopusfile.a
${BUILD_DIR}/lib/libogg.a
${BUILD_DIR}/lib/libpostproc.a
${BUILD_DIR}/lib/libSDL2.a
${BUILD_DIR}/lib/libSDL2_image.a
${BUILD_DIR}/lib/libSDL2main.a
${BUILD_DIR}/lib/libSDL2_mixer.a
${BUILD_DIR}/lib/libSDL2_test.a
${BUILD_DIR}/lib/libSDL2_ttf.a
${BUILD_DIR}/lib/libswresample.a
${BUILD_DIR}/lib/libswscale.a
# ${BUILD_DIR}/lib/libtiff.a
${BUILD_DIR}/lib/libwavpack.a
${BUILD_DIR}/lib/libwebp.a
${BUILD_DIR}/lib/libwebpdemux.a
${BUILD_DIR}/lib/libxmp.a
${BUILD_DIR}/lib/libz.a
${BUILD_DIR}/lib/libzstd.a
${BUILD_DIR}/lib/libcrypto.a
${BUILD_DIR}/lib/libssl.a
)
target_link_libraries(${CMAKE_PROJECT_NAME}
# -Wl,--start-group
${LIB_LIST}
${LIB_LIST}
${LIB_LIST}
# -Wl,--end-group
-pthread
-lm
)
install(TARGETS ${CMAKE_PROJECT_NAME})

674
COPYING Normal file
View file

@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

67
INSTALL Normal file
View file

@ -0,0 +1,67 @@
SINGE 2.10
==========
(For the latest version of this document, visit https://kangaroopunch.com!)
Welcome to Singe! The Somewhat Interactive Nostalgic Game Engine!
INSTALLATION & UPGRADE
======================
For the initial installation, create an empty directory and place the Singe
binary inside it. Run the binary with no command line options to cause it
to generate all the files needed to make Singe work properly. For example:
C:\Singe2\
C:\Singe2\Singe.exe
Once you run Singe.exe you'll see additional files and directories:
C:\Singe2\Singe\ (Several files created in this folder.)
C:\Singe2\Menu.bat (Or .sh on UNIX-ish OSs.)
To install games, simply unpack them and place their directory inside the
directory you created. For example, ActionMax.7z contains a folder named
"ActionMax". Place it here:
C:\Singe2\ActionMax\
For all Singe 2 and later games, it will automatically appear in the menu.
To upgrade, back up any changes you may have made to files inside the Singe
subdirectory that was generated during installation. (You really shouldn't
be changing things in there!) Delete the Singe subdirectory, Menu.bat (or
.sh) and run the new Singe binary with no command line arguments to generate
the new files.
COMMAND LINE
============
___ ___ _ _ ___ ___
/ __|_ _| \| |/ __| __| Somewhat Interactive Nostalgic Game Engine v2.10
\__ \| || .` | (_ | _| Copyright (c) 2006-2024 Scott C. Duensing
|___/___|_|\_|\___|___| https://KangarooPunch.com https://SingeEngine.com
Usage: Singe-v2.10-Windows-x86_64.exe [OPTIONS] scriptName{.singe}
-a, --aspect=N:D force aspect ratio
-c, --showcalculated show calculated framefile values for debugging
-d, --datadir=PATHNAME alternate location for written files
-e, --volume_nonvldp=PERCENT specify sound effects volume in percent
-f, --fullscreen run in full screen mode
-h, --help this display
-k, --nologos kill the splash screens
-l, --volume_vldp=PERCENT specify laserdisc volume in percent
-m, --nomouse disable mouse
-n, --nocrosshair request game not display gun crosshairs
-o, --audio=TRACK select default track for audio output
-p, --program trace Singe execution to screen and file
-s, --nosound, --mutesound mutes all sound
-t, --trace trace script execution to screen and file
-u, --stretch use ugly stretched video
-v, --framefile=FILENAME use an alternate video file
-w, --fullscreen_window run in windowed full screen mode
-x, --xresolution=VALUE specify horizontal resolution
-y, --yresolution=VALUE specify vertical resolution
-z, --noconsole zero console output

33
LICENSES Normal file
View file

@ -0,0 +1,33 @@
Singe was made possible by a number of third-party software libraries
generously provided as open source by their respective authors. Without
these tools, Singe would not exist.
arg_parser BSD-2-Clause http://savannah.nongnu.org/projects/arg-parser
binaryheap.lua MIT http://tieske.github.io/binaryheap.lua
bzip2 bzip2-1.0.6 https://sourceware.org/bzip2
copas MIT https://lunarmodules.github.io/copas
ffmpeg LGPL-2.1 https://ffmpeg.org
ffms2 GPL-3.0-only https://github.com/FFMS/ffms2
jbigkit GPL-2.0 https://www.cl.cam.ac.uk/~mgk25/jbigkit
json.lua MIT https://github.com/rxi/json.lua
libarchive BSD-2-Clause https://libarchive.org
librs232 MIT https://github.com/srdgame/librs232
lua MIT https://www.lua.org
luafilesystem MIT https://lunarmodules.github.io/luafilesystem
luasec MIT https://github.com/lunarmodules/luasec
luasocket MIT https://lunarmodules.github.io/luasocket
manymouse Zlib https://icculus.org/manymouse
openssl Apache-2.0 https://www.openssl.org
SDL2 Zlib https://www.libsdl.org
SDL2_gfx LGPL-2.1 https://github.com/ferzkopp/SDL_gfx
SDL2_image Zlib https://www.libsdl.org
SDL2_mixer Zlib https://www.libsdl.org
SDL2_ttf Zlib https://www.libsdl.org
timerwheel.lua MIT https://tieske.github.io/timerwheel.lua
uthash BSD-1-Clause https://troydhanson.github.io/uthash
vlc GPL-2.0 https://www.videolan.org/vlc
xz Public-Domain https://github.com/tukaani-project/xz
zlib Zlib https://zlib.net
zstd BSD-3-Clause https://facebook.github.io/zstd

BIN
assets/180503_01_PurpleGrid.mp4 (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/BreatheFire-65pg.ttf (Stored with Git LFS) Normal file

Binary file not shown.

535
assets/Framework.singe Normal file
View file

@ -0,0 +1,535 @@
--[[
*
* Singe 2
* Copyright (C) 2006-2024 Scott Duensing <scott@kangaroopunch.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
*
--]]
-- Singe 2.xx Features -------------------------------------------------------
SINGE_FRAMEWORK_VERSION = 2.10
if singeGetScriptPath ~= nil then
DIR = singeGetScriptPath():match("(.*[/\\])") or "./"
end
function utilDeepCopy(orig)
local orig_type = type(orig)
local copy
if orig_type == 'table' then
copy = {}
for orig_key, orig_value in next, orig, nil do
copy[utilDeepCopy(orig_key)] = utilDeepCopy(orig_value)
end
setmetatable(copy, utilDeepCopy(getmetatable(orig)))
else -- number, string, boolean, etc
copy = orig
end
return copy
end
function utilDump(o)
if type(o) == 'table' then
local s = '{ '
for k,v in pairs(o) do
if type(k) ~= 'number' then
k = '"'..k..'"'
end
s = s .. '['..k..'] = ' .. utilDump(v) .. ','
end
return s .. '} '
else
return tostring(o)
end
end
function utilGetTableSize(t)
local count = 0
for _, __ in pairs(t) do
count = count + 1
end
return count
end
function utilTrim(s)
return (s:gsub("^%s*(.-)%s*$", "%1"))
end
SCANCODE = {
A = { name = "A", value = 4 },
B = { name = "B", value = 5 },
C = { name = "C", value = 6 },
D = { name = "D", value = 7 },
E = { name = "E", value = 8 },
F = { name = "F", value = 9 },
G = { name = "G", value = 10 },
H = { name = "H", value = 11 },
I = { name = "I", value = 12 },
J = { name = "J", value = 13 },
K = { name = "K", value = 14 },
L = { name = "L", value = 15 },
M = { name = "M", value = 16 },
N = { name = "N", value = 17 },
O = { name = "O", value = 18 },
P = { name = "P", value = 19 },
Q = { name = "Q", value = 20 },
R = { name = "R", value = 21 },
S = { name = "S", value = 22 },
T = { name = "T", value = 23 },
U = { name = "U", value = 24 },
V = { name = "V", value = 25 },
W = { name = "W", value = 26 },
X = { name = "X", value = 27 },
Y = { name = "Y", value = 28 },
Z = { name = "Z", value = 29 },
MAIN_1 = { name = "MAIN_1", value = 30 },
MAIN_2 = { name = "MAIN_2", value = 31 },
MAIN_3 = { name = "MAIN_3", value = 32 },
MAIN_4 = { name = "MAIN_4", value = 33 },
MAIN_5 = { name = "MAIN_5", value = 34 },
MAIN_6 = { name = "MAIN_6", value = 35 },
MAIN_7 = { name = "MAIN_7", value = 36 },
MAIN_8 = { name = "MAIN_8", value = 37 },
MAIN_9 = { name = "MAIN_9", value = 38 },
MAIN_0 = { name = "MAIN_0", value = 39 },
RETURN = { name = "RETURN", value = 40 },
ESCAPE = { name = "ESCAPE", value = 41 },
BACKSPACE = { name = "BACKSPACE", value = 42 },
TAB = { name = "TAB", value = 43 },
SPACE = { name = "SPACE", value = 44 },
MINUS = { name = "MINUS", value = 45 },
EQUALS = { name = "EQUALS", value = 46 },
LEFTBRACKET = { name = "LEFTBRACKET", value = 47 },
RIGHTBRACKET = { name = "RIGHTBRACKET", value = 48 },
BACKSLASH = { name = "BACKSLASH", value = 49 },
NONUSHASH = { name = "NONUSHASH", value = 50 },
SEMICOLON = { name = "SEMICOLON", value = 51 },
APOSTROPHE = { name = "APOSTROPHE", value = 52 },
GRAVE = { name = "GRAVE", value = 53 },
COMMA = { name = "COMMA", value = 54 },
PERIOD = { name = "PERIOD", value = 55 },
SLASH = { name = "SLASH", value = 56 },
CAPSLOCK = { name = "CAPSLOCK", value = 57 },
F1 = { name = "F1", value = 58 },
F2 = { name = "F2", value = 59 },
F3 = { name = "F3", value = 60 },
F4 = { name = "F4", value = 61 },
F5 = { name = "F5", value = 62 },
F6 = { name = "F6", value = 63 },
F7 = { name = "F7", value = 64 },
F8 = { name = "F8", value = 65 },
F9 = { name = "F9", value = 66 },
F10 = { name = "F10", value = 67 },
F11 = { name = "F11", value = 68 },
F12 = { name = "F12", value = 69 },
PRINTSCREEN = { name = "PRINTSCREEN", value = 70 },
SCROLLLOCK = { name = "SCROLLLOCK", value = 71 },
PAUSE = { name = "PAUSE", value = 72 },
INSERT = { name = "INSERT", value = 73 },
HOME = { name = "HOME", value = 74 },
PAGEUP = { name = "PAGEUP", value = 75 },
DELETE = { name = "DELETE", value = 76 },
END = { name = "END", value = 77 },
PAGEDOWN = { name = "PAGEDOWN", value = 78 },
RIGHT = { name = "RIGHT", value = 79 },
LEFT = { name = "LEFT", value = 80 },
DOWN = { name = "DOWN", value = 81 },
UP = { name = "UP", value = 82 },
NUMLOCKCLEAR = { name = "NUMLOCKCLEAR", value = 83 },
KP_DIVIDE = { name = "KP_DIVIDE", value = 84 },
KP_MULTIPLY = { name = "KP_MULTIPLY", value = 85 },
KP_MINUS = { name = "KP_MINUS", value = 86 },
KP_PLUS = { name = "KP_PLUS", value = 87 },
KP_ENTER = { name = "KP_ENTER", value = 88 },
KP_1 = { name = "KP_1", value = 89 },
KP_2 = { name = "KP_2", value = 90 },
KP_3 = { name = "KP_3", value = 91 },
KP_4 = { name = "KP_4", value = 92 },
KP_5 = { name = "KP_5", value = 93 },
KP_6 = { name = "KP_6", value = 94 },
KP_7 = { name = "KP_7", value = 95 },
KP_8 = { name = "KP_8", value = 96 },
KP_9 = { name = "KP_9", value = 97 },
KP_0 = { name = "KP_0", value = 98 },
KP_PERIOD = { name = "KP_PERIOD", value = 99 },
NONUSBACKSLASH = { name = "NONUSBACKSLASH", value = 100 },
APPLICATION = { name = "APPLICATION", value = 101 },
POWER = { name = "POWER", value = 102 },
KP_EQUALS = { name = "KP_EQUALS", value = 103 },
F13 = { name = "F13", value = 104 },
F14 = { name = "F14", value = 105 },
F15 = { name = "F15", value = 106 },
F16 = { name = "F16", value = 107 },
F17 = { name = "F17", value = 108 },
F18 = { name = "F18", value = 109 },
F19 = { name = "F19", value = 110 },
F20 = { name = "F20", value = 111 },
F21 = { name = "F21", value = 112 },
F22 = { name = "F22", value = 113 },
F23 = { name = "F23", value = 114 },
F24 = { name = "F24", value = 115 },
EXECUTE = { name = "EXECUTE", value = 116 },
HELP = { name = "HELP", value = 117 },
MENU = { name = "MENU", value = 118 },
SELECT = { name = "SELECT", value = 119 },
STOP = { name = "STOP", value = 120 },
AGAIN = { name = "AGAIN", value = 121 },
UNDO = { name = "UNDO", value = 122 },
CUT = { name = "CUT", value = 123 },
COPY = { name = "COPY", value = 124 },
PASTE = { name = "PASTE", value = 125 },
FIND = { name = "FIND", value = 126 },
MUTE = { name = "MUTE", value = 127 },
VOLUMEUP = { name = "VOLUMEUP", value = 128 },
VOLUMEDOWN = { name = "VOLUMEDOWN", value = 129 },
KP_COMMA = { name = "KP_COMMA", value = 133 },
KP_EQUALSAS400 = { name = "KP_EQUALSAS400", value = 134 },
INTERNATIONAL1 = { name = "INTERNATIONAL1", value = 135 },
INTERNATIONAL2 = { name = "INTERNATIONAL2", value = 136 },
INTERNATIONAL3 = { name = "INTERNATIONAL3", value = 137 },
INTERNATIONAL4 = { name = "INTERNATIONAL4", value = 138 },
INTERNATIONAL5 = { name = "INTERNATIONAL5", value = 139 },
INTERNATIONAL6 = { name = "INTERNATIONAL6", value = 140 },
INTERNATIONAL7 = { name = "INTERNATIONAL7", value = 141 },
INTERNATIONAL8 = { name = "INTERNATIONAL8", value = 142 },
INTERNATIONAL9 = { name = "INTERNATIONAL9", value = 143 },
LANG1 = { name = "LANG1", value = 144 },
LANG2 = { name = "LANG2", value = 145 },
LANG3 = { name = "LANG3", value = 146 },
LANG4 = { name = "LANG4", value = 147 },
LANG5 = { name = "LANG5", value = 148 },
LANG6 = { name = "LANG6", value = 149 },
LANG7 = { name = "LANG7", value = 150 },
LANG8 = { name = "LANG8", value = 151 },
LANG9 = { name = "LANG9", value = 152 },
ALTERASE = { name = "ALTERASE", value = 153 },
SYSREQ = { name = "SYSREQ", value = 154 },
CANCEL = { name = "CANCEL", value = 155 },
CLEAR = { name = "CLEAR", value = 156 },
PRIOR = { name = "PRIOR", value = 157 },
RETURN2 = { name = "RETURN2", value = 158 },
SEPARATOR = { name = "SEPARATOR", value = 159 },
OUT = { name = "OUT", value = 160 },
OPER = { name = "OPER", value = 161 },
CLEARAGAIN = { name = "CLEARAGAIN", value = 162 },
CRSEL = { name = "CRSEL", value = 163 },
EXSEL = { name = "EXSEL", value = 164 },
KP_00 = { name = "KP_00", value = 176 },
KP_000 = { name = "KP_000", value = 177 },
THOUSANDSSEPARATOR = { name = "THOUSANDSSEPARATOR", value = 178 },
DECIMALSEPARATOR = { name = "DECIMALSEPARATOR", value = 179 },
CURRENCYUNIT = { name = "CURRENCYUNIT", value = 180 },
CURRENCYSUBUNIT = { name = "CURRENCYSUBUNIT", value = 181 },
KP_LEFTPAREN = { name = "KP_LEFTPAREN", value = 182 },
KP_RIGHTPAREN = { name = "KP_RIGHTPAREN", value = 183 },
KP_LEFTBRACE = { name = "KP_LEFTBRACE", value = 184 },
KP_RIGHTBRACE = { name = "KP_RIGHTBRACE", value = 185 },
KP_TAB = { name = "KP_TAB", value = 186 },
KP_BACKSPACE = { name = "KP_BACKSPACE", value = 187 },
KP_A = { name = "KP_A", value = 188 },
KP_B = { name = "KP_B", value = 189 },
KP_C = { name = "KP_C", value = 190 },
KP_D = { name = "KP_D", value = 191 },
KP_E = { name = "KP_E", value = 192 },
KP_F = { name = "KP_F", value = 193 },
KP_XOR = { name = "KP_XOR", value = 194 },
KP_POWER = { name = "KP_POWER", value = 195 },
KP_PERCENT = { name = "KP_PERCENT", value = 196 },
KP_LESS = { name = "KP_LESS", value = 197 },
KP_GREATER = { name = "KP_GREATER", value = 198 },
KP_AMPERSAND = { name = "KP_AMPERSAND", value = 199 },
KP_DBLAMPERSAND = { name = "KP_DBLAMPERSAND", value = 200 },
KP_VERTICALBAR = { name = "KP_VERTICALBAR", value = 201 },
KP_DBLVERTICALBAR = { name = "KP_DBLVERTICALBAR", value = 202 },
KP_COLON = { name = "KP_COLON", value = 203 },
KP_HASH = { name = "KP_HASH", value = 204 },
KP_SPACE = { name = "KP_SPACE", value = 205 },
KP_AT = { name = "KP_AT", value = 206 },
KP_EXCLAM = { name = "KP_EXCLAM", value = 207 },
KP_MEMSTORE = { name = "KP_MEMSTORE", value = 208 },
KP_MEMRECALL = { name = "KP_MEMRECALL", value = 209 },
KP_MEMCLEAR = { name = "KP_MEMCLEAR", value = 210 },
KP_MEMADD = { name = "KP_MEMADD", value = 211 },
KP_MEMSUBTRACT = { name = "KP_MEMSUBTRACT", value = 212 },
KP_MEMMULTIPLY = { name = "KP_MEMMULTIPLY", value = 213 },
KP_MEMDIVIDE = { name = "KP_MEMDIVIDE", value = 214 },
KP_PLUSMINUS = { name = "KP_PLUSMINUS", value = 215 },
KP_CLEAR = { name = "KP_CLEAR", value = 216 },
KP_CLEARENTRY = { name = "KP_CLEARENTRY", value = 217 },
KP_BINARY = { name = "KP_BINARY", value = 218 },
KP_OCTAL = { name = "KP_OCTAL", value = 219 },
KP_DECIMAL = { name = "KP_DECIMAL", value = 220 },
KP_HEXADECIMAL = { name = "KP_HEXADECIMAL", value = 221 },
LCTRL = { name = "LCTRL", value = 224 },
LSHIFT = { name = "LSHIFT", value = 225 },
LALT = { name = "LALT", value = 226 },
LGUI = { name = "LGUI", value = 227 },
RCTRL = { name = "RCTRL", value = 228 },
RSHIFT = { name = "RSHIFT", value = 229 },
RALT = { name = "RALT", value = 230 },
RGUI = { name = "RGUI", value = 231 },
MODE = { name = "MODE", value = 257 },
AUDIONEXT = { name = "AUDIONEXT", value = 258 },
AUDIOPREV = { name = "AUDIOPREV", value = 259 },
AUDIOSTOP = { name = "AUDIOSTOP", value = 260 },
AUDIOPLAY = { name = "AUDIOPLAY", value = 261 },
AUDIOMUTE = { name = "AUDIOMUTE", value = 262 },
MEDIASELECT = { name = "MEDIASELECT", value = 263 },
WWW = { name = "WWW", value = 264 },
MAIL = { name = "MAIL", value = 265 },
CALCULATOR = { name = "CALCULATOR", value = 266 },
COMPUTER = { name = "COMPUTER", value = 267 },
AC_SEARCH = { name = "AC_SEARCH", value = 268 },
AC_HOME = { name = "AC_HOME", value = 269 },
AC_BACK = { name = "AC_BACK", value = 270 },
AC_FORWARD = { name = "AC_FORWARD", value = 271 },
AC_STOP = { name = "AC_STOP", value = 272 },
AC_REFRESH = { name = "AC_REFRESH", value = 273 },
AC_BOOKMARKS = { name = "AC_BOOKMARKS", value = 274 },
BRIGHTNESSDOWN = { name = "BRIGHTNESSDOWN", value = 275 },
BRIGHTNESSUP = { name = "BRIGHTNESSUP", value = 276 },
DISPLAYSWITCH = { name = "DISPLAYSWITCH", value = 277 },
KBDILLUMTOGGLE = { name = "KBDILLUMTOGGLE", value = 278 },
KBDILLUMDOWN = { name = "KBDILLUMDOWN", value = 279 },
KBDILLUMUP = { name = "KBDILLUMUP", value = 280 },
EJECT = { name = "EJECT", value = 281 },
SLEEP = { name = "SLEEP", value = 282 },
APP1 = { name = "APP1", value = 283 },
APP2 = { name = "APP2", value = 284 },
AUDIOREWIND = { name = "AUDIOREWIND", value = 285 },
AUDIOFASTFORWARD = { name = "AUDIOFASTFORWARD", value = 286 }
}
SCANCODE_MIN = 4 -- Lowest value
SCANCODE_MAX = 286 -- Highest value, not the number of items in the table.
MODIFIER = {
NONE = { name = "NONE", value = 0x0000 },
LSHIFT = { name = "LSHIFT", value = 0x0001 },
RSHIFT = { name = "RSHIFT", value = 0x0002 },
LCTRL = { name = "LCTRL", value = 0x0040 },
RCTRL = { name = "RCTRL", value = 0x0080 },
LALT = { name = "LALT", value = 0x0100 },
RALT = { name = "RALT", value = 0x0200 },
LGUI = { name = "LGUI", value = 0x0400 },
RGUI = { name = "RGUI", value = 0x0800 },
NUM = { name = "NUM", value = 0x1000 },
CAPS = { name = "CAPS", value = 0x2000 },
MODE = { name = "MODE", value = 0x4000 },
SCROLL = { name = "SCROLL", value = 0x8000 },
SHIFT = { name = "SHIFT", value = 0x0001 + 0x0002 },
CTRL = { name = "CTRL", value = 0x0040 + 0x0080 },
ALT = { name = "ALT", value = 0x0100 + 0x0200 },
GUI = { name = "GUI", value = 0x0400 + 0x0800 }
}
GAMEPAD_0 = {
AXIS_LEFT_X = { name = "AXIS_LEFT_X", value = 500 },
AXIS_LEFT_X_L = { name = "AXIS_LEFT_X_L", value = 501 },
AXIS_LEFT_X_R = { name = "AXIS_LEFT_X_R", value = 502 },
AXIS_LEFT_Y = { name = "AXIS_LEFT_Y", value = 503 },
AXIS_LEFT_Y_U = { name = "AXIS_LEFT_Y_U", value = 504 },
AXIS_LEFT_Y_D = { name = "AXIS_LEFT_Y_D", value = 505 },
AXIS_RIGHT_X = { name = "AXIS_RIGHT_X", value = 506 },
AXIS_RIGHT_X_L = { name = "AXIS_RIGHT_X_L", value = 507 },
AXIS_RIGHT_X_R = { name = "AXIS_RIGHT_X_R", value = 508 },
AXIS_RIGHT_Y = { name = "AXIS_RIGHT_Y", value = 509 },
AXIS_RIGHT_Y_U = { name = "AXIS_RIGHT_Y_U", value = 510 },
AXIS_RIGHT_Y_D = { name = "AXIS_RIGHT_Y_D", value = 511 },
AXIS_LEFT_TRIGGER = { name = "AXIS_LEFT_TRIGGER", value = 512 },
AXIS_LEFT_TRIGGER_N = { name = "AXIS_LEFT_TRIGGER_N", value = 513 },
AXIS_LEFT_TRIGGER_P = { name = "AXIS_LEFT_TRIGGER_P", value = 514 },
AXIS_RIGHT_TRIGGER = { name = "AXIS_RIGHT_TRIGGER", value = 515 },
AXIS_RIGHT_TRIGGER_N = { name = "AXIS_RIGHT_TRIGGER_N", value = 516 },
AXIS_RIGHT_TRIGGER_P = { name = "AXIS_RIGHT_TRIGGER_P", value = 517 },
BUTTON_A = { name = "BUTTON_A", value = 518 },
BUTTON_B = { name = "BUTTON_B", value = 519 },
BUTTON_X = { name = "BUTTON_X", value = 520 },
BUTTON_Y = { name = "BUTTON_Y", value = 521 },
BUTTON_BACK = { name = "BUTTON_BACK", value = 522 },
BUTTON_GUIDE = { name = "BUTTON_GUIDE", value = 523 },
BUTTON_START = { name = "BUTTON_START", value = 524 },
BUTTON_LEFT_STICK = { name = "BUTTON_LEFT_STICK", value = 525 },
BUTTON_RIGHT_STICK = { name = "BUTTON_RIGHT_STICK", value = 526 },
BUTTON_LEFT_BUMPER = { name = "BUTTON_LEFT_BUMPER", value = 527 },
BUTTON_RIGHT_BUMPER = { name = "BUTTON_RIGHT_BUMPER", value = 528 },
DPAD_UP = { name = "DPAD_UP", value = 529 },
DPAD_DOWN = { name = "DPAD_DOWN", value = 530 },
DPAD_LEFT = { name = "DPAD_LEFT", value = 531 },
DPAD_RIGHT = { name = "DPAD_RIGHT", value = 532 }
}
GAMEPAD_0_MIN = 500 -- Lowest value
GAMEPAD_0_MAX = 532 -- Highest value, not the number of items in the table.
GAMEPAD_1 = utilDeepCopy(GAMEPAD_0)
GAMEPAD_2 = utilDeepCopy(GAMEPAD_0)
GAMEPAD_3 = utilDeepCopy(GAMEPAD_0)
for key, value in pairs(GAMEPAD_0) do
GAMEPAD_1[key].value = GAMEPAD_1[key].value + 100
GAMEPAD_2[key].value = GAMEPAD_2[key].value + 200
GAMEPAD_3[key].value = GAMEPAD_3[key].value + 300
end
GAMEPAD_1_MIN = GAMEPAD_0_MAX + 100
GAMEPAD_1_MAX = GAMEPAD_0_MAX + 100
GAMEPAD_2_MIN = GAMEPAD_0_MAX + 200
GAMEPAD_2_MAX = GAMEPAD_0_MAX + 200
GAMEPAD_3_MIN = GAMEPAD_0_MAX + 300
GAMEPAD_3_MAX = GAMEPAD_0_MAX + 300
GAMEPAD_AXIS_LEFT_X = 0
GAMEPAD_AXIS_LEFT_Y = 1
GAMEPAD_AXIS_RIGHT_X = 2
GAMEPAD_AXIS_RIGHT_Y = 3
GAMEPAD_AXIS_LEFT_TRIGGER = 4
GAMEPAD_AXIS_RIGHT_TRIGGER = 5
MOUSE_0 = {
BUTTON_LEFT = { name = "BUTTON_LEFT", value = 1000 },
BUTTON_RIGHT = { name = "BUTTON_RIGHT", value = 1001 },
BUTTON_MIDDLE = { name = "BUTTON_MIDDLE", value = 1002 },
BUTTON_X1 = { name = "BUTTON_X1", value = 1003 },
BUTTON_X2 = { name = "BUTTON_X2", value = 1004 },
WHEEL_UP = { name = "WHEEL_UP", value = 1005 },
WHEEL_DOWN = { name = "WHEEL_DOWN", value = 1006 }
}
MOUSE_0_MIN = 1000
MOUSE_0_MAX = 1006
MOUSE_1 = utilDeepCopy(MOUSE_0)
MOUSE_2 = utilDeepCopy(MOUSE_0)
MOUSE_3 = utilDeepCopy(MOUSE_0)
for key, value in pairs(MOUSE_0) do
MOUSE_1[key].value = MOUSE_1[key].value + 100
MOUSE_2[key].value = MOUSE_2[key].value + 200
MOUSE_3[key].value = MOUSE_3[key].value + 300
end
MOUSE_1_MIN = MOUSE_0_MAX + 100
MOUSE_1_MAX = MOUSE_0_MAX + 100
MOUSE_2_MIN = MOUSE_0_MAX + 200
MOUSE_2_MAX = MOUSE_0_MAX + 200
MOUSE_3_MIN = MOUSE_0_MAX + 300
MOUSE_3_MAX = MOUSE_0_MAX + 300
SWITCH_BUTTON4 = 21
SWITCH_TILT = 22
SWITCH_GRAB = 23
MOUSE_SINGLE = 100
MOUSE_MANY = 200
RENDER_SMOOTH = 1
RENDER_PIXELATED = 0
if videoGetLanguageDescription ~= nil then
discGetLanguageDescription = videoGetLanguageDescription
end
-- Singe 1.xx Features -------------------------------------------------------
if discSetFPS ~= nil then
discSetFPS(29.97)
discSearch(1)
end
SWITCH_UP = 0
SWITCH_LEFT = 1
SWITCH_DOWN = 2
SWITCH_RIGHT = 3
SWITCH_START1 = 4
SWITCH_START2 = 5
SWITCH_BUTTON1 = 6
SWITCH_BUTTON2 = 7
SWITCH_BUTTON3 = 8
SWITCH_COIN1 = 9
SWITCH_COIN2 = 10
SWITCH_SKILL1 = 11
SWITCH_SKILL2 = 12
SWITCH_SKILL3 = 13
SWITCH_SERVICE = 14
SWITCH_TEST = 15
SWITCH_RESET = 16
SWITCH_SCREENSHOT = 17
SWITCH_QUIT = 18
SWITCH_PAUSE = 19
SWITCH_CONSOLE = 20
SWITCH_BUTTON4 = 21 -- Added in Singe 2.00
SWITCH_TILT = 22 -- Added in Singe 2.00
FONT_QUALITY_SOLID = 1
FONT_QUALITY_SHADED = 2
FONT_QUALITY_BLENDED = 3
SOUND_ERROR_INVALID = -1
SOUND_REMOVE_HANDLE = -1
SOUND_ERROR_FULL = -2
OVERLAY_NOT_UPDATED = 0
OVERLAY_UPDATED = 1
SINGLE_MOUSE = 100
MANY_MOUSE = 200
MODE_NORMAL = 0
MODE_FULL = 1
-- Make old random number calls still work
random = {}
random.new = math.random
-- Map old Daphne calls to Singe calls
if singeGetHeight ~= nil then
daphneGetHeight = singeGetHeight
daphneGetWidth = singeGetWidth
daphneScreenshot = singeScreenshot
end
-- Singe 2.10 Threaded Application Support ------------------------------------
if singeMain ~= nil then
onOverlayUpdate = function()
coroutine.resume(SINGE_SELF)
return(OVERLAY_UPDATED)
end
singeYield = coroutine.yield
SINGE_SELF = coroutine.create(singeMain)
end

BIN
assets/FreeSansBold.ttf (Stored with Git LFS) Normal file

Binary file not shown.

2467
assets/Manual.lyx Normal file

File diff suppressed because it is too large Load diff

380
assets/Menu.singe Normal file
View file

@ -0,0 +1,380 @@
--[[
*
* Singe 2
* Copyright (C) 2006-2024 Scott Duensing <scott@kangaroopunch.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
*
--]]
dofile("Singe/Framework.singe")
lfs = require("lfs")
function cleanTitle(a)
local output = string.lower(a)
output = string.gsub(output, '%p', ' ')
output = string.gsub(output, '^ +', '')
output = string.gsub(output, '^the ', '')
output = string.gsub(output, '^a ', '')
output = string.gsub(output, '^an ', '')
return output
end
function compareTitles(a, b)
return cleanTitle(a.TITLE) < cleanTitle(b.TITLE)
end
function loadGameAssets()
SPRITE_CABINET = spriteLoad(GAME_LIST[GAME_SELECTED].CABINET)
SPRITE_MARQUEE = spriteLoad(GAME_LIST[GAME_SELECTED].MARQUEE)
VIDEO_ATTRACT = videoLoad(GAME_LIST[GAME_SELECTED].ATTRACT)
if GAME_LIST[GAME_SELECTED].AUDIO_TRACK then
videoSetAudioTrack(VIDEO_ATTRACT, GAME_LIST[GAME_SELECTED].AUDIO_TRACK)
end
videoPlay(VIDEO_ATTRACT)
videoSeek(VIDEO_ATTRACT, GAME_LIST[GAME_SELECTED].ATTRACT_START)
-- videoSetVolume(VIDEO_ATTRACT, 0, 0)
-- Build text sprites
local textBox = GAME_LIST[GAME_SELECTED].DESCRIPTION .. WRAP_BREAK .. WRAP_BREAK ..
"Year: " .. GAME_LIST[GAME_SELECTED].YEAR .. WRAP_BREAK ..
"Genre: " .. GAME_LIST[GAME_SELECTED].GENRE .. WRAP_BREAK ..
"Platform: " .. GAME_LIST[GAME_SELECTED].PLATFORM .. WRAP_BREAK ..
"Developer: " .. GAME_LIST[GAME_SELECTED].DEVELOPER .. WRAP_BREAK ..
"Publisher: " .. GAME_LIST[GAME_SELECTED].PUBLISHER .. WRAP_BREAK .. WRAP_BREAK ..
"Singe Port: " .. GAME_LIST[GAME_SELECTED].CREATOR .. WRAP_BREAK ..
"Source: " .. GAME_LIST[GAME_SELECTED].SOURCE
wrapText(textBox, TEXT_W)
TEXT_LINE_COUNT = utilGetTableSize(TEXT_SPRITE_LIST)
TEXT_LINE_TOP = 1
end
function onInputPressed(what)
-- Are we displaying the grid background?
if (discGetFrame() >= DISC_GRID_START) then
if what == SWITCH_UP then
if TEXT_LINE_TOP > 1 then
TEXT_LINE_TOP = TEXT_LINE_TOP - 1
end
end
if what == SWITCH_DOWN then
if TEXT_LINE_TOP < TEXT_LINE_COUNT - TEXT_LINE_LIMIT + 1 then
TEXT_LINE_TOP = TEXT_LINE_TOP + 1
end
end
if what == SWITCH_LEFT then
GAME_SELECTED = GAME_SELECTED - 1
if GAME_SELECTED < 1 then
GAME_SELECTED = GAME_COUNT
end
unloadGameAssets()
loadGameAssets()
end
if what == SWITCH_RIGHT then
GAME_SELECTED = GAME_SELECTED + 1
if GAME_SELECTED > GAME_COUNT then
GAME_SELECTED = 1
end
unloadGameAssets()
loadGameAssets()
end
if what == SWITCH_START1 or what == SWITCH_START2 or what == SWITCH_BUTTON1 or what == SWITCH_BUTTON2 or what == SWITCH_BUTTON3 or what == SWITCH_BUTTON4 then
-- Start next game
SHUTDOWN_FROM_PUSH = true
scriptPush(GAME_LIST[GAME_SELECTED])
end
end
end
function onOverlayUpdate()
local x = 0
local y = 0
local c = 0
local t = 0
overlayClear()
-- Are we displaying the grid background?
if (discGetFrame() >= DISC_GRID_START) then
-- Cabinet image
x = CABINET_X + (CABINET_W - spriteGetWidth(SPRITE_CABINET)) * 0.5
y = CABINET_Y + (CABINET_H - spriteGetHeight(SPRITE_CABINET)) * 0.5
spriteDraw(x, y, SPRITE_CABINET)
-- Marquee Image
x = MARQUEE_X + (MARQUEE_W - spriteGetWidth(SPRITE_MARQUEE)) * 0.5
y = MARQUEE_Y + (MARQUEE_H - spriteGetHeight(SPRITE_MARQUEE)) * 0.5
spriteDraw(x, y, SPRITE_MARQUEE)
-- Attract Mode Video
videoDraw(VIDEO_ATTRACT, VIDEO_X, VIDEO_Y, VIDEO_X + VIDEO_W, VIDEO_Y + VIDEO_H)
if videoGetFrame(VIDEO_ATTRACT) > GAME_LIST[GAME_SELECTED].ATTRACT_END then
videoSeek(VIDEO_ATTRACT, GAME_LIST[GAME_SELECTED].ATTRACT_START)
end
-- Game Description
colorForeground(255, 255, 255, 255)
y = TEXT_Y
c = 0
t = 1
for _, handle in ipairs(TEXT_SPRITE_LIST) do
-- Find height of font and number of lines that fit
if TEXT_LINE_HEIGHT == 0 then
if (handle >= 0) then
TEXT_LINE_HEIGHT = spriteGetHeight(handle)
TEXT_LINE_LIMIT = math.floor(TEXT_H / TEXT_LINE_HEIGHT)
end
end
-- Only display what is visible in the window
if (t >= TEXT_LINE_TOP) then
if (c < TEXT_LINE_LIMIT) then
if (handle >= 0) then
spriteDraw(TEXT_X, y, handle)
end
y = y + TEXT_LINE_HEIGHT + 1
c = c + 1
end
end
t = t + 1
end
end
-- Loop video?
if (discGetFrame() >= DISC_LAST_FRAME) then
discSkipToFrame(DISC_GRID_START)
end
return(OVERLAY_UPDATED)
end
function onShutdown()
unloadGameAssets()
saveConfig(not SHUTDOWN_FROM_PUSH)
end
function saveConfig(showIntro)
if GAME_COUNT > 0 then
-- Save what game we're currently viewing
local cfg = io.open(CONFIG_FILE, "w")
cfg:write("GAME_SELECTED = " .. GAME_SELECTED .. "\n")
cfg:write("SHOW_INTRO = " .. tostring(showIntro) .. "\n")
cfg:close()
end
end
function unloadGameAssets()
spriteUnload(SPRITE_CABINET)
spriteUnload(SPRITE_MARQUEE)
videoUnload(VIDEO_ATTRACT)
for _, handle in ipairs(TEXT_SPRITE_LIST) do
if handle >= 0 then
spriteUnload(handle)
end
end
TEXT_SPRITE_LIST = {}
end
function wrapText(text, maxWidth)
local words = {}
local toWrap = ""
local line = ""
local lastLine = ""
local fragment = ""
local doBreak = false
local spriteTemp = -1
local trimBreak = utilTrim(WRAP_BREAK)
-- Break input into words
toWrap = text .. WRAP_BREAK
for w in toWrap:gmatch("%S+") do
words[#words+1] = w
end
-- Iterate over words and try to fit them in the space given
for _, word in ipairs(words) do
-- Is this an intentional break?
if word == trimBreak then
doBreak = true
else
-- Add this word to the line
line = utilTrim(line .. " " .. word)
-- Do we even have text?
if string.len(line) > 0 then
-- Is the line too long to fit now?
spriteTemp = fontToSprite(line)
if spriteGetWidth(spriteTemp) > maxWidth then
doBreak = true
fragment = word
line = lastLine
else
fragment = ""
end
spriteUnload(spriteTemp)
end
end
lastLine = line
-- Did we find a break?
if doBreak then
-- Did we get anything to print?
if string.len(line) > 0 then
table.insert(TEXT_SPRITE_LIST, fontToSprite(line))
else
-- Blank line
table.insert(TEXT_SPRITE_LIST, -1)
end
-- Reset for next line
line = fragment
fragment = ""
doBreak = false
end
end
end
-- Search for games.dat files in subdirectories
GAME_LIST = {}
GAME_COUNT = 0
for dir in lfs.dir(".") do
if dir ~= "." and dir ~= ".." then
local dirattr = lfs.attributes(dir)
if dirattr.mode == "directory" then
for file in lfs.dir(dir .. "/.") do
if file == "games.dat" then
-- Load games.dat
dofile(dir .. "/games.dat")
for key,value in pairs(GAMES) do
table.insert(GAME_LIST, value)
GAME_COUNT = GAME_COUNT + 1
end
GAMES = {}
end
end
end
end
end
table.sort(GAME_LIST, compareTitles)
if GAME_COUNT == 0 then
debugPrint("No games found! Exiting.")
singeQuit()
else
overlaySetResolution(vldpGetWidth(), vldpGetHeight())
freeSans18 = fontLoad("Singe/FreeSansBold.ttf", 18)
fontQuality(FONT_QUALITY_BLENDED)
fontSelect(freeSans18)
DISC_GRID_START = 180
DISC_LAST_FRAME = 359
MARGIN_X = 25
MARGIN_Y = 25
VIDEO_W = 320
VIDEO_H = 200
MARQUEE_H = 75
MARQUEE_W = VIDEO_W
MARQUEE_X = overlayGetWidth() - MARGIN_X - MARQUEE_W
MARQUEE_Y = MARGIN_Y
VIDEO_X = overlayGetWidth() - MARGIN_X - VIDEO_W
VIDEO_Y = MARGIN_Y + MARQUEE_H + MARGIN_Y
TEXT_W = VIDEO_W
TEXT_X = overlayGetWidth() - MARGIN_X - TEXT_W
TEXT_Y = VIDEO_Y + VIDEO_H + MARGIN_Y
TEXT_H = overlayGetHeight() - MARGIN_Y - TEXT_Y
CABINET_X = MARGIN_X
CABINET_Y = MARGIN_Y
CABINET_W = VIDEO_X - MARGIN_X - CABINET_X
CABINET_H = overlayGetHeight() - MARGIN_Y - CABINET_Y
--[[
Cabinet is 325x430
Marquee is 320x75
Video is 320x200
Text is 320x105
--]]
--[[
debugPrint("Cabinet is " .. CABINET_W .. "x" .. CABINET_H)
debugPrint("Marquee is " .. MARQUEE_W .. "x" .. MARQUEE_H)
debugPrint(" Video is " .. VIDEO_W .. "x" .. VIDEO_H)
debugPrint(" Text is " .. TEXT_W .. "x" .. TEXT_H)
--]]
WRAP_BREAK = " [!wb!] "
TEXT_LINE_TOP = 1
TEXT_LINE_LIMIT = 0
TEXT_LINE_COUNT = 0
TEXT_LINE_HEIGHT = 0
TEXT_SPRITE_LIST = {}
SHUTDOWN_FROM_PUSH = false
-- Load configuration
SHOW_INTRO = true
CONFIG_FILE = singeGetDataPath() .. "menu.dat"
local confattr = lfs.attributes(CONFIG_FILE)
if confattr then
dofile(CONFIG_FILE)
if GAME_SELECTED > GAME_COUNT then
GAME_SELECTED = GAME_COUNT
end
else
GAME_SELECTED = 1
end
discPlay()
if (not SHOW_INTRO) then
discSkipToFrame(DISC_GRID_START)
end
-- Prime the pump
loadGameAssets()
end

117
assets/Service.singe Normal file
View file

@ -0,0 +1,117 @@
--[[
*
* Singe 2
* Copyright (C) 2006-2024 Scott Duensing <scott@kangaroopunch.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
*
--]]
local socket = require("socket")
local copas = require("copas")
local https = require("copas.http").request
dofile("Singe/Framework.singe")
function get(url)
local download = {}
download.url = url
download.finished = false
copas.addthread(function(d)
d.result, d.error = https(d.url)
d.finished = true
end,
download)
return download
end
function onInputPressed(what)
if what == SWITCH_LEFT then
discStepBackward()
end
if what == SWITCH_RIGHT then
discStepForward()
end
end
function onOverlayUpdate()
copas.step()
colorBackground(0, 0, 0, 127) -- this dims the background 50%
overlayClear()
overlayPrint(1, 1, dldGameList.url.." "..(dldGameList.finished and 'true' or 'false'))
if dldGameList.finished then
overlayPrint(1, 2, dldGameList.error)
overlayPrint(1, 3, dldGameList.result)
end
colorForeground(255, 0, 0)
overlayBox(0, 0, overlayGetWidth() - 1, overlayGetHeight() - 1)
spriteDraw((overlayGetWidth() - spriteGetWidth(sprServiceMenu)) / 2, 25, sprServiceMenu)
return(OVERLAY_UPDATED)
end
function onShutdown()
spriteUnload(sprServiceMenu)
fontUnload(fntSans18)
fontUnload(fntSans32)
end
copas.running = true
dldGameList = get("https://kangaroopunch.com/api/singeSoftware")
overlaySetResolution(vldpGetWidth(), vldpGetHeight())
DISC_SINGE_LOGO = 140
discSkipToFrame(DISC_SINGE_LOGO)
discPause()
fontQuality(FONT_QUALITY_BLENDED)
fntSans18 = fontLoad("Singe/FreeSansBold.ttf", 18)
fntSans32 = fontLoad("Singe/FreeSansBold.ttf", 32)
fontSelect(fntSans32)
sprServiceMenu = fontToSprite("Singe Service Menu")
--[[
Game Management
--]]

BIN
assets/Singe Engine Intro.mpg (Stored with Git LFS) Normal file

Binary file not shown.

52
assets/controls.cfg Normal file
View file

@ -0,0 +1,52 @@
--[[
*
* Singe 2
* Copyright (C) 2006-2024 Scott Duensing <scott@kangaroopunch.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
*
--]]
-- Default Mappings
DEAD_ZONE = 15000
INPUT_UP = { SCANCODE.UP, SCANCODE.KP_8, GAMEPAD_0.AXIS_LEFT_Y_U, GAMEPAD_0.AXIS_RIGHT_Y_U, GAMEPAD_0.DPAD_UP }
INPUT_LEFT = { SCANCODE.LEFT, SCANCODE.KP_4, GAMEPAD_0.AXIS_LEFT_X_L, GAMEPAD_0.AXIS_RIGHT_X_L, GAMEPAD_0.DPAD_LEFT }
INPUT_DOWN = { SCANCODE.DOWN, SCANCODE.KP_2, GAMEPAD_0.AXIS_LEFT_Y_D, GAMEPAD_0.AXIS_RIGHT_Y_D, GAMEPAD_0.DPAD_DOWN }
INPUT_RIGHT = { SCANCODE.RIGHT, SCANCODE.KP_6, GAMEPAD_0.AXIS_LEFT_X_R, GAMEPAD_0.AXIS_RIGHT_X_R, GAMEPAD_0.DPAD_RIGHT }
INPUT_1P_COIN = { SCANCODE.MAIN_5, SCANCODE.C, GAMEPAD_0.BUTTON_LEFT_BUMPER }
INPUT_2P_COIN = { SCANCODE.MAIN_6 }
INPUT_1P_START = { SCANCODE.MAIN_1, GAMEPAD_0.BUTTON_RIGHT_BUMPER }
INPUT_2P_START = { SCANCODE.MAIN_2 }
INPUT_ACTION_1 = { SCANCODE.SPACE, SCANCODE.LCTRL, GAMEPAD_0.BUTTON_A, MOUSE_0.BUTTON_RIGHT }
INPUT_ACTION_2 = { SCANCODE.LALT, GAMEPAD_0.BUTTON_B, MOUSE_0.BUTTON_MIDDLE }
INPUT_ACTION_3 = { SCANCODE.LSHIFT, GAMEPAD_0.BUTTON_X, MOUSE_0.BUTTON_LEFT }
INPUT_ACTION_4 = { SCANCODE.RSHIFT, GAMEPAD_0.BUTTON_Y, MOUSE_0.BUTTON_X1 }
INPUT_SKILL_EASY = { SCANCODE.KP_DIVIDE }
INPUT_SKILL_MEDIUM = { SCANCODE.KP_MULTIPLY }
INPUT_SKILL_HARD = { SCANCODE.KP_MINUS }
INPUT_SERVICE = { SCANCODE.MAIN_9 }
INPUT_TEST_MODE = { SCANCODE.F2 }
INPUT_RESET_CPU = { SCANCODE.F3 }
INPUT_SCREENSHOT = { SCANCODE.F12, SCANCODE.F11, GAMEPAD_0.BUTTON_BACK }
INPUT_QUIT = { SCANCODE.ESCAPE, SCANCODE.Q }
INPUT_PAUSE = { SCANCODE.P, GAMEPAD_0.BUTTON_START }
INPUT_CONSOLE = { SCANCODE.GRAVE }
INPUT_TILT = { SCANCODE.T }
INPUT_GRAB = { SCANCODE.G }

BIN
assets/font.xcf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/icon.xcf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/indexing.xcf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/kangarooPunchLogo.xcf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/laserDisc.xcf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/magnifyingGlass.xcf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/singeLogo.xcf (Stored with Git LFS) Normal file

Binary file not shown.

569
build-all.sh Executable file
View file

@ -0,0 +1,569 @@
#!/bin/bash -x
#
# Singe 2
# Copyright (C) 2006-2024 Scott Duensing <scott@kangaroopunch.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public Licens
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
#
G_BUILDROOT=${PWD}
G_BUILDDIR=.builddir
G_TARGET=
G_GENERATED=
function buildAll() {
local OS=$1
local ARCH=$2
local COMMON=
local OPT1=
# Activate toolchain for this platform.
source <(../toolchains/toolchains.sh use ${ARCH} ${OS})
G_TARGET=${G_BUILDROOT}/${G_BUILDDIR}/${OS}/${ARCH}
G_GENERATED=${G_TARGET}/generated
COMMON="-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${G_TARGET} -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE}"
export LDFLAGS="-L${G_TARGET}/lib ${LDFLAGS}"
export CFLAGS="-I${G_TARGET}/include ${CFLAGS}"
export CXXFLAGS="-I${G_TARGET}/include ${CXXFLAGS}"
export LD_LIBRARY_PATH="${G_TARGET}/lib"
export PKG_CONFIG_LIBDIR="${G_TARGET}/lib/pkgconfig"
mkdir -p ${G_GENERATED}
# Needed for Pi sysroot.
if [[ "${OS}" == "pi" ]]; then
export CFLAGS="--sysroot=${SYSROOT} ${CFLAGS}"
export CXXFLAGS="--sysroot=${SYSROOT} ${CXXFLAGS}"
sudo chroot ${SYSROOT} apt-get -y install libasound-dev libxi-dev libvdpau-dev
fi
if [[ 1 == 1 ]]; then
pushd thirdparty/bzip2
clearAndEnterBuild
cmake ${COMMON} \
-DENABLE_SHARED_LIB=off \
-DENABLE_STATIC_LIB=on \
-DENABLE_LIB_ONLY=on \
..
make install
popd
pushd thirdparty/xz
clearAndEnterBuild
cmake ${COMMON} \
-DBUILD_SHARED_LIBS=off \
-DBUILD_TESTING=off \
..
make install
popd
pushd thirdparty/zlib
clearAndEnterBuild
CFLAGS="-I${PWD}" ../configure \
--prefix=${G_TARGET} \
--static
make install
popd
pushd thirdparty/zstd
clearAndEnterBuild
cmake ${COMMON} \
-DZSTD_BUILD_SHARED=off \
-DZSTD_BUILD_STATIC=on \
-DZSTD_BUILD_PROGRAMS=off \
../build/cmake
make install
popd
fi
pushd thirdparty/SDL2
clearAndEnterBuild
cmake ${COMMON} \
-DSDL_SHARED=off \
-DSDL_STATIC=on \
..
make install
popd
pushd thirdparty/SDL2_image
clearAndEnterBuild
CFLAGS="-Iexternal/libpng ${CFLAGS}" \
cmake ${COMMON} \
-DBUILD_SHARED_LIBS=off \
-DSDL2IMAGE_DEPS_SHARED=off \
-DSDL2IMAGE_SAMPLES=off \
-DSDL2IMAGE_TESTS=off \
-DSDL2IMAGE_VENDORED=on \
-DSDL2IMAGE_BACKEND_STB=off \
-DSDL2IMAGE_AVIF=off \
-DSDL2IMAGE_JXL=off \
-DSDL2IMAGE_TIF=off \
-DSDL2IMAGE_WEBP=on \
-DSDL2_LIBRARY="${G_TARGET}/lib/libSDL2.a" \
-DSDL2_INCLUDE_DIR="${G_TARGET}/include/SDL2" \
-DWEBP_BUILD_ANIM_UTILS=off \
-DWEBP_BUILD_CWEBP=off \
-DWEBP_BUILD_DWEBP=off \
-DWEBP_BUILD_GIF2WEBP=off \
-DWEBP_BUILD_IMG2WEBP=off \
-DWEBP_BUILD_VWEBP=off \
-DWEBP_BUILD_WEBPINFO=off \
-DWEBP_BUILD_WEBPMUX=off \
-DWEBP_BUILD_EXTRAS=off \
..
# 'make install' failes on zlib, which we don't want anyway.
make
cp -f ../include/SDL_image.h "${G_TARGET}/include/SDL2/."
cp -f libSDL2_image.a "${G_TARGET}/lib/."
cp -f external/libwebp/libwebp.a "${G_TARGET}/lib/."
cp -f external/libwebp/libwebpdemux.a "${G_TARGET}/lib/."
if [[ "${OS}" != "macos" ]]; then
cp -f external/jpeg/libjpeg.a "${G_TARGET}/lib/."
cp -f external/libpng/libpng.a "${G_TARGET}/lib/."
fi
popd
pushd thirdparty/SDL2_mixer
clearAndEnterBuild
cmake ${COMMON} \
-DBUILD_SHARED_LIBS=off \
-DSDL2MIXER_CMD=off \
-DSDL2MIXER_DEPS_SHARED=off \
-DSDL2MIXER_VENDORED=on \
-DSDL2MIXER_SAMPLES=off \
-DSDL2_DIR=${G_TARGET}/lib/cmake/SDL2 \
-DWAVPACK_ENABLE_ASM=no \
..
make install
popd
pushd thirdparty/SDL2_ttf
clearAndEnterBuild
cmake ${COMMON} \
-DBUILD_SHARED_LIBS=off \
-DSDL2TTF_VENDORED=on \
-DSDL2TTF_HARFBUZZ=off \
-DSDL2TTF_SAMPLES=off \
-DSDL2_DIR=${G_TARGET}/lib/cmake/SDL2 \
..
make install
popd
pushd thirdparty/libarchive
clearAndEnterBuild
cmake ${COMMON} \
-DBUILD_SHARED_LIBS=off \
-DBUILD_TESTING=off \
-DENABLE_CAT=off \
-DENABLE_CNG=off \
-DENABLE_CPIO=off \
-DENABLE_EXPAT=off \
-DENABLE_ICONV=off \
-DENABLE_LIBB2=off \
-DENABLE_LIBGCC=off \
-DENABLE_LIBXML2=off \
-DENABLE_LZ4=off \
-DENABLE_LZO=off \
-DENABLE_MBEDTLS=off \
-DENABLE_NETTLE=off \
-DENABLE_OPENSSL=off \
-DENABLE_PCREPOSIX=off \
-DENABLE_TAR=off \
-DENABLE_TEST=off \
-DENABLE_UNZIP=off \
-DPOSIX_REGEX_LIB=libc \
-DUSE_BZIP2_STATIC=on \
-DBZIP2_INCLUDE_DIR="${G_TARGET}/include" \
-DBZIP2_LIBRARIES="${G_TARGET}/lib/libbz2_static.a" \
-DZLIB_ROOT="${G_TARGET}" \
-DLIBLZMA_INCLUDE_DIR="${G_TARGET}/include" \
-DLIBLZMA_LIBRARY="${G_TARGET}/lib/liblzma.a" \
-DZSTD_INCLUDE_DIR="${G_TARGET}/include" \
-DZSTD_LIBRARY="${G_TARGET}/lib/libzstd.a" \
-DWINDOWS_VERSION=VISTA \
..
make install
popd
pushd thirdparty/openssl
clearAndEnterBuild
if [[ "${OS}" == "windows" ]]; then
if [[ "${ARCH}" == "x86" ]]; then
OPT1="mingw"
else
OPT1="mingw64"
fi
else
OPT1=""
fi
if [[ "${OS}" == "pi" ]]; then
if [[ "${ARCH}" == "aarch64" ]]; then
OPT1="linux-aarch64"
else
OPT1="linux-arm4"
fi
fi
if [[ "${OS}" == "macos" ]]; then
if [[ "${ARCH}" == "aarch64" ]]; then
OPT1="darwin64-arm64"
else
OPT1="darwin64-x86_64"
fi
fi
../Configure ${OPT1} \
--prefix="${G_TARGET}" \
--libdir=lib \
--with-zlib-include="${G_TARGET}/include" \
--with-zlib-lib="${G_TARGET}/lib" \
--with-zstd-include="${G_TARGET}/include" \
--with-zstd-lib="${G_TARGET}/lib" \
no-apps \
no-docs \
no-dso \
no-dynamic-engine \
no-module \
no-shared \
no-tests \
zlib \
enable-zstd
make install
popd
lua thirdparty/luasec/src/options.lua -g "${G_TARGET}/include/openssl/ssl.h" > "${G_TARGET}/generated/luasec_options.c"
mkdir -p "${G_TARGET}/include/luasocket"
cp -f \
thirdparty/luasocket/src/*.h \
"${G_TARGET}/include/luasocket/."
if [[ "${OS}" == "pi" ]]; then
# Hack to make ffmpeg compile.
mkdir -p "${G_TARGET}/include/sys"
echo "/* File no longer used */" > "${G_TARGET}/include/sys/sysctl.h"
fi
pushd thirdparty/ffmpeg
clearAndEnterBuild
# https://trac.ffmpeg.org/wiki/CompilationGuide/CrossCompilingForWindows
../configure \
--enable-static \
--disable-shared \
--disable-debug \
--disable-muxers \
--disable-hwaccels \
--disable-encoders \
--disable-filters \
--disable-network \
--disable-devices \
--disable-doc \
--disable-programs \
--enable-gpl \
--enable-version3 \
--extra-ldflags="-L${G_TARGET}/lib" \
--prefix=${G_TARGET} \
--arch=${ARCH} \
--target-os=${CROSS_OS} \
--cross-prefix=${TRIPLE}- \
--cc="${CC}" \
--cxx="${CXX}" \
--ranlib="${RANLIB}"
make install
popd
pushd thirdparty/ffms2
#libtoolize --force
#aclocal
#autoheader
#automake --force-missing --add-missing
#autoupdate
#autoconf
#./autogen.sh
#make distclean || true
clearAndEnterBuild
../configure \
--prefix=${G_TARGET} \
--with-zlib=${G_TARGET} \
--enable-static \
--disable-shared \
--target=${TRIPLE} \
--host=${TRIPLE} \
--build=x86_64-linux
make install-libLTLIBRARIES # This weird target prevents building the command line tools.
popd
# === Known FFMPEG Types ===
createExtensionHeader ffmpeg > ${G_GENERATED}/extensions.h
# === Overlay Font ===
createEmbeddedImage font
# === Window Icon ===
createEmbeddedImage icon
# === Kangaroo Punch Logo ===
createEmbeddedImage kangarooPunchLogo
# === Singe Logo ===
createEmbeddedImage singeLogo
# === Laser Disc ===
createEmbeddedImage laserDisc
# === Magnifying Glass ===
createEmbeddedImage magnifyingGlass
# === "Indexing" Text ===
createEmbeddedImage indexing
# === Singe Menu Font ===
createEmbeddedBinary assets/FreeSansBold.ttf ${G_GENERATED}/FreeSansBold_ttf.h FREESANSBOLD_TTF_H
# === Singe Menu Background Video ===
ffmpeg -i "assets/Singe Engine Intro.mpg" -filter:v 'crop=ih/3*4:ih' -vf scale=720:480 -c:v libx264 -c:a aac -f matroska ${G_TARGET}/temp1.mkv
ffmpeg -i assets/180503_01_PurpleGrid.mp4 -filter:v 'crop=ih/3*4:ih' -vf scale=720:480 -c:v libx264 -c:a aac -f matroska ${G_TARGET}/temp2.mkv
ffmpeg -f concat -safe 0 -i <(echo -e "file ${G_TARGET}/temp1.mkv\nfile ${G_TARGET}/temp2.mkv\n") -c copy ${G_TARGET}/menuBackground.mkv
createEmbeddedBinary ${G_TARGET}/menuBackground.mkv ${G_GENERATED}/menuBackground_mkv.h MENUBACKGROUND_MKV_H
rm ${G_TARGET}/temp1.mkv ${G_TARGET}/temp2.mkv ${G_TARGET}/menuBackground.mkv
# === LuaSocket ===
createEmbeddedBinary thirdparty/luasocket/src/ftp.lua ${G_GENERATED}/ftp_lua.h FTP_LUA_H
createEmbeddedBinary thirdparty/luasocket/src/headers.lua ${G_GENERATED}/headers_lua.h HEADERS_LUA_H
createEmbeddedBinary thirdparty/luasocket/src/http.lua ${G_GENERATED}/http_lua.h HTTP_LUA_H
createEmbeddedBinary thirdparty/luasocket/src/ltn12.lua ${G_GENERATED}/ltn12_lua.h LTN12_LUA_H
createEmbeddedBinary thirdparty/luasocket/src/mbox.lua ${G_GENERATED}/mbox_lua.h MBOX_LUA_H
createEmbeddedBinary thirdparty/luasocket/src/mime.lua ${G_GENERATED}/mime_lua.h MIME_LUA_H
createEmbeddedBinary thirdparty/luasocket/src/smtp.lua ${G_GENERATED}/smtp_lua.h SMTP_LUA_H
createEmbeddedBinary thirdparty/luasocket/src/socket.lua ${G_GENERATED}/socket_lua.h SOCKET_LUA_H
createEmbeddedBinary thirdparty/luasocket/src/tp.lua ${G_GENERATED}/tp_lua.h TP_LUA_H
createEmbeddedBinary thirdparty/luasocket/src/url.lua ${G_GENERATED}/url_lua.h URL_LUA_H
# === LuaSec ===
createEmbeddedBinary thirdparty/luasec/src/https.lua ${G_GENERATED}/https_lua.h HTTPS_LUA_H
createEmbeddedBinary thirdparty/luasec/src/ssl.lua ${G_GENERATED}/ssl_lua.h SSL_LUA_H
# === LuaRS232 ===
createEmbeddedBinary thirdparty/librs232/bindings/lua/rs232.lua ${G_GENERATED}/rs232_lua.h RS232_LUA_H
# === Copas ===
createEmbeddedBinary thirdparty/copas/src/copas.lua ${G_GENERATED}/copas_lua.h COPAS_LUA_H
createEmbeddedBinary thirdparty/copas/src/copas/ftp.lua ${G_GENERATED}/copas_ftp_lua.h COPAS_FTP_LUA_H copas
createEmbeddedBinary thirdparty/copas/src/copas/http.lua ${G_GENERATED}/copas_http_lua.h COPAS_HTTP_LUA_H copas
createEmbeddedBinary thirdparty/copas/src/copas/smtp.lua ${G_GENERATED}/copas_smtp_lua.h COPAS_SMTP_LUA_H copas
createEmbeddedBinary thirdparty/copas/src/copas/lock.lua ${G_GENERATED}/copas_lock_lua.h COPAS_LOCK_LUA_H copas
createEmbeddedBinary thirdparty/copas/src/copas/queue.lua ${G_GENERATED}/copas_queue_lua.h COPAS_QUEUE_LUA_H copas
createEmbeddedBinary thirdparty/copas/src/copas/semaphore.lua ${G_GENERATED}/copas_semaphore_lua.h COPAS_SEMAPHORE_LUA_H copas
createEmbeddedBinary thirdparty/copas/src/copas/timer.lua ${G_GENERATED}/copas_timer_lua.h COPAS_TIMER_LUA_H copas
# === binaryheap.lua ===
createEmbeddedBinary thirdparty/binaryheap.lua/src/binaryheap.lua ${G_GENERATED}/binaryheap_lua.h BINARYHEAP_LUA_H
# === timerwheel.lua ===
createEmbeddedBinary thirdparty/timerwheel.lua/src/timerwheel/timerwheel.lua ${G_GENERATED}/timerwheel_lua.h TIMERWHEEL_LUA_H
# === json.lua ===
createEmbeddedBinary thirdparty/json.lua/json.lua ${G_GENERATED}/json_lua.h JSON_LUA_H
# === Singe Framework ===
createEmbeddedBinary assets/Framework.singe ${G_GENERATED}/Framework_singe.h FRAMEWORK_SINGE_H
# === Default Config ===
createEmbeddedBinary assets/controls.cfg ${G_GENERATED}/controls_cfg.h CONTROLS_CFG_H
# === Singe Menu App ===
createEmbeddedBinary assets/Menu.singe ${G_GENERATED}/Menu_singe.h MENU_SINGE_H
# === Singe Manual ===
#lyx -batch -f all -E pdf ${G_GENERATED}/Manual.pdf assets/Manual.lyx
#createEmbeddedBinary ${G_GENERATED}/Manual.pdf ${G_GENERATED}/Manual_pdf.h MANUAL_H
pushd ${G_TARGET}
clearAndEnterBuild
cmake ${COMMON} ${G_BUILDROOT}
make
#upx -9 --force singe2${SUFFIX}
mv -f singe2${SUFFIX} ${G_BUILDROOT}/${G_BUILDDIR}/Singe-v2.10-${OS^}-${ARCH}${SUFFIX}
popd
}
function clearAndEnterBuild() {
[[ -d ${G_BUILDDIR} ]] && rm -rf ${G_BUILDDIR}
mkdir -p ${G_BUILDDIR}
cd ${G_BUILDDIR}
}
function createEmbeddedBinary() {
local BINFILE=$1
local SOURCEFILE=$2 # This is assumed to be an absolute path
local BLOCKER=$3
local PREFIX=$4
local FILENAME=$(basename ${BINFILE})
local DIRNAME=$(dirname ${BINFILE})
outputLicense > ${SOURCEFILE}
outputHeader ${BLOCKER} >> ${SOURCEFILE}
printf "\n#ifdef EMBED_HERE\n\n" >> ${SOURCEFILE}
pushd ${DIRNAME}
xxd -i ${FILENAME} >> ${SOURCEFILE}
popd
if [[ ! -z ${PREFIX} ]]; then
PREFIX=${PREFIX}_
sed -i "s/unsigned char /unsigned char ${PREFIX}/" ${SOURCEFILE}
sed -i "s/unsigned int /unsigned int ${PREFIX}/" ${SOURCEFILE}
fi
printf "\n#else // EMBED_HERE\n\n" >> ${SOURCEFILE}
printf "extern unsigned char ${PREFIX}${FILENAME/\./_}[];\n" >> ${SOURCEFILE}
printf "extern unsigned int ${PREFIX}${FILENAME/\./_}_len;\n" >> ${SOURCEFILE}
printf "\n#endif // EMBED_HERE\n\n" >> ${SOURCEFILE}
outputFooter ${BLOCKER} >> ${SOURCEFILE}
}
function createEmbeddedImage() {
local BASENAME=$1
pushd assets
convert -flatten -background rgba\(0,0,0,0\) ${BASENAME}.xcf ${G_GENERATED}/${BASENAME}.png
createEmbeddedBinary ${G_GENERATED}/${BASENAME}.png ${G_GENERATED}/${BASENAME}.h ${BASENAME^^}_H
rm ${G_GENERATED}/${BASENAME}.png
popd
}
function createExtensionHeader() {
local FFMPEG=$1
local a=
local c=0
outputLicense
outputHeader FFMPEG_EXTENSIONS_H
printf "static char *ffmpegExtensions[] = {\n"
printf "\t"
getExtensions "${FFMPEG}" | sort | uniq -u | while read a; do
printf "\"${a}\", "
c=$((c + 1))
if [[ ${c} -ge 10 ]]; then
printf "\n\t"
c=0
fi
done
printf "0\n};"
outputFooter FFMPEG_EXTENSIONS_H
}
function getExtensions() {
local FFMPEG=$1
local a=
local b=
local c=
local d=
local e=
local f=
local g=
"${FFMPEG}" -demuxers 2> /dev/null | while read a b c; do
if [[ "${a}x" == "Dx" ]]; then
"${FFMPEG}" -h demuxer=${b} 2> /dev/null | grep "Common extensions" | while read d e f; do
g=${f/./}
echo -e "${g//,/\\n}"
done
fi
done
}
function outputFooter() {
local BLOCKER=$1
printf "\n#pragma GCC diagnostic pop\n\n\n#endif // ${BLOCKER}\n"
}
function outputHeader() {
local BLOCKER=$1
printf "\n\n#ifndef ${BLOCKER}\n#define ${BLOCKER}\n\n\n"
printf "// ===== THIS FILE IS AUTOMATICALLY GENERATED - DO NOT EDIT =====\n\n\n"
printf "#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wunused-variable\"\n"
}
function outputLicense() {
cat <<- LICENSE
/*
*
* Singe 2
* Copyright (C) 2006-2024 Scott Duensing <scott@kangaroopunch.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
*/
LICENSE
}
# -e = stop script on errors
# -u = stop script on undefined variable
# -o pipefail = stop pipeline if any step fails
set -e
mkdir -p ${G_BUILDDIR}
# These are required for the build.
sudo apt-get install -y \
xxd \
imagemagick \
lua5.4 \
lyx \
ffmpeg \
libasound-dev \
libxi-dev \
libvdpau-dev \
upx-ucl
buildAll linux x86_64 2>&1 | tee ${G_BUILDDIR}/linux-x86_64.log
buildAll macos aarch64 2>&1 | tee ${G_BUILDDIR}/macos-aarch64.log
buildAll pi aarch64 2>&1 | tee ${G_BUILDDIR}/pi-aarch64.log
buildAll windows x86_64 2>&1 | tee ${G_BUILDDIR}/windows-x86_64.log
# === UNSUPPORTED ===
#buildAll macos x86_64 2>&1 | tee ${G_BUILDDIR}/macos-x86_64.log
#buildAll linux x86
#buildAll macos x86 #***TODO*** Needs older SDL2
#buildAll windows x86

4
ffms2/.gitmodules vendored
View file

@ -1,4 +0,0 @@
[submodule "test/googletest"]
path = test/googletest
url = https://github.com/google/googletest
branch = master

View file

@ -1,44 +0,0 @@
language: cpp
dist: trusty
sudo: required
matrix:
include:
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-6
- g++-6
- yasm
before_install:
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6
- compiler: clang
addons:
apt:
sources:
- llvm-toolchain-trusty-4.0
packages:
- clang-4.0
- yasm
before_install:
- sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-4.0 60 --slave /usr/bin/clang++ clang++ /usr/bin/clang++-4.0
install:
- git clone git://git.videolan.org/ffmpeg.git --depth=1 ffmpeg
- cd ffmpeg
- ./configure --disable-avfilter --disable-devices --disable-doc --disable-encoders --disable-filters --disable-hwaccels --disable-muxers --disable-network
- make -j2
- sudo make install
- cd ..
script:
- ./autogen.sh --enable-static --disable-shared || cat config.log
- make V=1 CXXFLAGS='-Werror -Wno-error=deprecated-declarations' -j2 -k
- make test-sync
- make test -j2 -k
notifications:
email:
- on_success: change
- on_failure: change

View file

@ -1,81 +0,0 @@
ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = foreign
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = ffms2.pc
dist_doc_DATA = doc/ffms2-api.md doc/ffms2-changelog.md
AM_CPPFLAGS = \
-I. \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/config \
-D_FILE_OFFSET_BITS=64 \
-DFFMS_EXPORTS \
-D__STDC_CONSTANT_MACROS \
@FFMPEG_CFLAGS@ \
@ZLIB_CPPFLAGS@ \
-include config.h
AM_CXXFLAGS = -std=c++11 -fvisibility=hidden
lib_LTLIBRARIES = src/core/libffms2.la
src_core_libffms2_la_LDFLAGS = @src_core_libffms2_la_LDFLAGS@
src_core_libffms2_la_LIBADD = @FFMPEG_LIBS@ @ZLIB_LDFLAGS@ -lz @LTUNDEF@
src_core_libffms2_la_SOURCES = \
src/core/audiosource.cpp \
src/core/audiosource.h \
src/core/ffms.cpp \
src/core/filehandle.cpp \
src/core/filehandle.h \
src/core/indexing.cpp \
src/core/indexing.h \
src/core/track.cpp \
src/core/track.h \
src/core/utils.cpp \
src/core/utils.h \
src/core/videosource.cpp \
src/core/videosource.h \
src/core/videoutils.cpp \
src/core/videoutils.h \
src/core/zipfile.cpp \
src/core/zipfile.h \
src/vapoursynth/VapourSynth.h \
src/vapoursynth/vapoursource.cpp \
src/vapoursynth/vapoursource.h \
src/vapoursynth/vapoursynth.cpp
include_HEADERS = $(top_srcdir)/include/ffms.h $(top_srcdir)/include/ffmscompat.h
bin_PROGRAMS = src/index/ffmsindex
src_index_ffmsindex_SOURCES = src/index/ffmsindex.cpp
src_index_ffmsindex_LDADD = src/core/libffms2.la
.PHONY: test test-build test-clean test-sync test-run
clean-local: test-clean
SAMPLES_DIR = $(abs_top_builddir)/test/samples
SAMPLES_URL = https://storage.googleapis.com/ffms2tests
test: test-setup test-build test-run
test-setup:
@$(MKDIR_P) $(abs_top_builddir)/test
@$(MKDIR_P) $(SAMPLES_DIR)
@if [ ! -e "$(abs_top_builddir)/test/Makefile" ]; then \
$(LN_S) $(abs_top_srcdir)/test/Makefile $(abs_top_builddir)/test/Makefile; \
fi
test-build: test-setup src/core/libffms2.la
@if [ ! -d "$(abs_top_srcdir)/test/googletest" ]; then \
echo "googletest submodule not initalized."; \
fi
@$(MAKE) -C test USER_DIR=$(abs_top_srcdir) SAMPLES_DIR=$(SAMPLES_DIR) CXX=$(CXX) AR=$(AR)
test-sync: test-setup
@$(MAKE) -C test sync USER_DIR=$(abs_top_srcdir) SAMPLES_DIR=$(SAMPLES_DIR) SAMPLES_URL=$(SAMPLES_URL) CXX=$(CXX) AR=$(AR)
test-run: test-build
@$(MAKE) -C test run USER_DIR=$(abs_top_srcdir) SAMPLES_DIR=$(SAMPLES_DIR) CXX=$(CXX) AR=$(AR) -k
test-clean:
@$(MAKE) -C test clean USER_DIR=$(abs_top_srcdir) CXX=$(CXX) AR=$(AR)

File diff suppressed because it is too large Load diff

1470
ffms2/aclocal.m4 vendored

File diff suppressed because it is too large Load diff

View file

@ -1,7 +0,0 @@
BUILD INSTRUCTIONS
The included projects require Visual Studio 2017.
Libraries needed: recent FFmpeg, zlib, Avisynth+ (MT branch) headers.
All include and library paths are set to be relative to the ffms2 directory by default.

View file

@ -1,347 +0,0 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2012-10-14.11; # UTC
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent tools from complaining about whitespace usage.
IFS=" "" $nl"
file_conv=
# func_file_conv build_file lazy
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
# type is listed in (the comma separated) LAZY, no conversion will
# take place.
func_file_conv ()
{
file=$1
case $file in
/ | /[!/]*) # absolute file, and not a UNC file
if test -z "$file_conv"; then
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
;;
CYGWIN*)
file_conv=cygwin
;;
*)
file_conv=wine
;;
esac
fi
case $file_conv/,$2, in
*,$file_conv,*)
;;
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
file=`winepath -w "$file" || echo "$file"`
;;
esac
;;
esac
}
# func_cl_dashL linkdir
# Make cl look for libraries in LINKDIR
func_cl_dashL ()
{
func_file_conv "$1"
if test -z "$lib_path"; then
lib_path=$file
else
lib_path="$lib_path;$file"
fi
linker_opts="$linker_opts -LIBPATH:$file"
}
# func_cl_dashl library
# Do a library search-path lookup for cl
func_cl_dashl ()
{
lib=$1
found=no
save_IFS=$IFS
IFS=';'
for dir in $lib_path $LIB
do
IFS=$save_IFS
if $shared && test -f "$dir/$lib.dll.lib"; then
found=yes
lib=$dir/$lib.dll.lib
break
fi
if test -f "$dir/$lib.lib"; then
found=yes
lib=$dir/$lib.lib
break
fi
if test -f "$dir/lib$lib.a"; then
found=yes
lib=$dir/lib$lib.a
break
fi
done
IFS=$save_IFS
if test "$found" != yes; then
lib=$lib.lib
fi
}
# func_cl_wrapper cl arg...
# Adjust compile command to suit cl
func_cl_wrapper ()
{
# Assume a capable shell
lib_path=
shared=:
linker_opts=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1
case $2 in
*.o | *.[oO][bB][jJ])
func_file_conv "$2"
set x "$@" -Fo"$file"
shift
;;
*)
func_file_conv "$2"
set x "$@" -Fe"$file"
shift
;;
esac
;;
-I)
eat=1
func_file_conv "$2" mingw
set x "$@" -I"$file"
shift
;;
-I*)
func_file_conv "${1#-I}" mingw
set x "$@" -I"$file"
shift
;;
-l)
eat=1
func_cl_dashl "$2"
set x "$@" "$lib"
shift
;;
-l*)
func_cl_dashl "${1#-l}"
set x "$@" "$lib"
shift
;;
-L)
eat=1
func_cl_dashL "$2"
;;
-L*)
func_cl_dashL "${1#-L}"
;;
-static)
shared=false
;;
-Wl,*)
arg=${1#-Wl,}
save_ifs="$IFS"; IFS=','
for flag in $arg; do
IFS="$save_ifs"
linker_opts="$linker_opts $flag"
done
IFS="$save_ifs"
;;
-Xlinker)
eat=1
linker_opts="$linker_opts $2"
;;
-*)
set x "$@" "$1"
shift
;;
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
func_file_conv "$1"
set x "$@" -Tp"$file"
shift
;;
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
func_file_conv "$1" mingw
set x "$@" "$file"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -n "$linker_opts"; then
linker_opts="-link$linker_opts"
fi
exec "$@" $linker_opts
exit 1
}
eat=
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand '-c -o'.
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
ofile=
cfile=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
# So we strip '-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no '-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# '.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
# Create the lock directory.
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
"$@"
ret=$?
if test -f "$cofile"; then
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

1480
ffms2/config.guess vendored

File diff suppressed because it is too large Load diff

1801
ffms2/config.sub vendored

File diff suppressed because it is too large Load diff

19020
ffms2/configure vendored

File diff suppressed because it is too large Load diff

View file

@ -1,151 +0,0 @@
AC_PREREQ([2.58])
AC_INIT([ffms2],[esyscmd([sh version.sh])])
AC_CONFIG_SRCDIR([src/core/ffms.cpp])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.11 subdir-objects])
AM_SILENT_RULES([yes])
AM_MAINTAINER_MODE([disable])
VERSION_INFO="4:0:0"
AC_MSG_CHECKING([if debug build is enabled])
AC_ARG_ENABLE([debug],
[AC_HELP_STRING([--enable-debug],
[Enable debug build. [default=no]])],
[enable_debug=yes],
[enable_debug=no]
)
AC_MSG_RESULT([$enable_debug])
if test "$enable_debug" = yes; then
OPT_FLAGS="-O0 -g"
else
OPT_FLAGS="-O3"
fi
if test -z "$CFLAGS"; then
CFLAGS="$OPT_FLAGS -Wall -Wextra"
fi
if test -z "$CXXFLAGS"; then
CXXFLAGS="$OPT_FLAGS -Wall -Wextra"
fi
AC_CONFIG_HEADERS([src/config/config.h])
AC_PROG_CC
AC_PROG_CXX
AC_PROG_LN_S
AC_PROG_MKDIR_P
AC_CANONICAL_HOST
AS_CASE([$host],
[*mingw* | *cygwin*], [
AC_ENABLE_STATIC
AC_DISABLE_SHARED
], [
AC_ENABLE_SHARED
AC_DISABLE_STATIC])
AC_PROG_LIBTOOL
if echo "$host" | $GREP "cygwin" >/dev/null 2>&1 && test "$enable_shared" = "yes"; then
AC_MSG_ERROR([Shared build is broken on cygwin.
Please remove --enable-shared from your configure options or build with another --host.])
fi
dnl Workaround for a bug in libtool
dnl The windows libtool uses a file magic checking method that only accepts
dnl dynamic libraries. Change it for libtool's alternative checking method.
if test "$lt_cv_file_magic_cmd" = "func_win32_libid" ; then
deplibs_check_method='file_magic file format pei*-(i386|x86-64)|(.*architecture: i386)?'
file_magic_cmd='$OBJDUMP -f'
fi
FFMS_VERSION="$(sh $(dirname -- "$0")/version.sh)"
AC_SUBST([FFMS_VERSION])
CHECK_ZLIB
dnl Save CFLAGS and LIBS for later, as anything else we add will be from pkg-config
dnl and thus should be separate in our .pc file.
_CFLAGS="$CFLAGS"
_CPPFLAGS="$CPPFLAGS"
_LIBS="$LIBS"
PKG_PROG_PKG_CONFIG([0.22])
pkgconfigdir="\$(libdir)/pkgconfig"
AC_SUBST(pkgconfigdir)
PKG_CHECK_MODULES(FFMPEG, [libavformat >= 53.20.0 libavcodec >= 53.24.0 libswscale >= 0.7.0 libavutil >= 51.21.0 libswresample >= 1.0.0])
dnl As of 0eec06ed8747923faa6a98e474f224d922dc487d ffmpeg only adds -lrt to lavc's
dnl LIBS, but lavu needs it, so move it to the end if it's present
FFMPEG_LIBS=$(echo $FFMPEG_LIBS | sed 's/\(.*\)-lrt \(.*\)/\1\2 -lrt/')
AC_SUBST([FFMPEG_CFLAGS])
AC_SUBST([FFMPEG_LIBS])
CPPFLAGS="$CPPFLAGS -D__STDC_CONSTANT_MACROS"
CFLAGS="$_CFLAGS $FFMPEG_CFLAGS"
AC_DEFUN([TEST_FFMPEG],
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <libavcodec/avcodec.h>
#include <libswscale/swscale.h>
]],[[
avcodec_register_all();
swscale_version();
]])], [eval $1=yes], [eval $1=no])
])
AC_MSG_CHECKING([whether FFmpeg works])
LIBS="$_LIBS $FFMPEG_LIBS"
TEST_FFMPEG([FFMPEG_WORKS])
AC_MSG_RESULT([$FFMPEG_WORKS])
if test "$FFMPEG_WORKS" = no; then
AC_MSG_FAILURE([cannot link with FFmpeg])
fi
src_core_libffms2_la_LDFLAGS=""
AC_MSG_CHECKING([whether -Wl,-Bsymbolic is needed])
if test "$enable_shared" = yes; then
_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -shared $lt_prog_compiler_pic"
TEST_FFMPEG([no_bsymbolic])
if test "$no_bsymbolic" = "no"; then
LDFLAGS="$LDFLAGS -Wl,-Bsymbolic"
TEST_FFMPEG([bsymbolic])
if test "$bsymbolic" = "yes"; then
src_core_libffms2_la_LDFLAGS="$src_core_libffms2_la_LDFLAGS -Wl-Bsymbolic"
else
AC_MSG_RESULT($bsymbolic)
AC_MSG_FAILURE([cannot build ffms2 as a shared library])
fi
else
bsymbolic=no
fi
LDFLAGS="$_LDFLAGS"
src_core_libffms2_la_LDFLAGS="$src_core_libffms2_la_LDFLAGS -version-info $VERSION_INFO"
else
bsymbolic=no
fi
AC_SUBST([src_core_libffms2_la_LDFLAGS])
CFLAGS="$_CFLAGS"
CPPFLAGS="$_CPPFLAGS"
LIBS="$_LIBS"
AC_MSG_RESULT($bsymbolic)
if echo "$host" | $GREP "mingw" >/dev/null 2>&1; then
LTUNDEF="-no-undefined"
fi
AC_SUBST([LTUNDEF])
AC_CONFIG_FILES([
Makefile
ffms2.pc
])
AC_OUTPUT

View file

@ -1,791 +0,0 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2016-01-11.22; # UTC
# Copyright (C) 1999-2017 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
Run PROGRAMS ARGS to compile a file, generating dependencies
as side-effects.
Environment variables:
depmode Dependency tracking mode.
source Source file read by 'PROGRAMS ARGS'.
object Object file output by 'PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputting dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "depcomp $scriptversion"
exit $?
;;
esac
# Get the directory component of the given path, and save it in the
# global variables '$dir'. Note that this directory component will
# be either empty or ending with a '/' character. This is deliberate.
set_dir_from ()
{
case $1 in
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
*) dir=;;
esac
}
# Get the suffix-stripped basename of the given path, and save it the
# global variable '$base'.
set_base_from ()
{
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
}
# If no dependency file was actually created by the compiler invocation,
# we still have to create a dummy depfile, to avoid errors with the
# Makefile "include basename.Plo" scheme.
make_dummy_depfile ()
{
echo "#dummy" > "$depfile"
}
# Factor out some common post-processing of the generated depfile.
# Requires the auxiliary global variable '$tmpdepfile' to be set.
aix_post_process_depfile ()
{
# If the compiler actually managed to produce a dependency file,
# post-process it.
if test -f "$tmpdepfile"; then
# Each line is of the form 'foo.o: dependency.h'.
# Do two passes, one to just change these to
# $object: dependency.h
# and one to simply output
# dependency.h:
# which is needed to avoid the deleted-header problem.
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
} > "$depfile"
rm -f "$tmpdepfile"
else
make_dummy_depfile
fi
}
# A tabulation character.
tab=' '
# A newline character.
nl='
'
# Character ranges might be problematic outside the C locale.
# These definitions help.
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
lower=abcdefghijklmnopqrstuvwxyz
digits=0123456789
alpha=${upper}${lower}
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
depfile=${depfile-`echo "$object" |
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Avoid interferences from the environment.
gccflag= dashmflag=
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
cygpath_u="cygpath -u -f -"
if test "$depmode" = msvcmsys; then
# This is just like msvisualcpp but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u='sed s,\\\\,/,g'
depmode=msvisualcpp
fi
if test "$depmode" = msvc7msys; then
# This is just like msvc7 but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u='sed s,\\\\,/,g'
depmode=msvc7
fi
if test "$depmode" = xlc; then
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
gccflag=-qmakedep=gcc,-MF
depmode=gcc
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
## the command line argument order; so add the flags where they
## appear in depend2.am. Note that the slowdown incurred here
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
for arg
do
case $arg in
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
*) set fnord "$@" "$arg" ;;
esac
shift # fnord
shift # $arg
done
"$@"
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
## (see the conditional assignment to $gccflag above).
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say). Also, it might not be
## supported by the other compilers which use the 'gcc' depmode.
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
# The second -e expression handles DOS-style file names with drive
# letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the "deleted header file" problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
## Some versions of gcc put a space before the ':'. On the theory
## that the space means something, we add a space to the output as
## well. hp depmode also adds that space, but also prefixes the VPATH
## to the object. Take care to not repeat it in the output.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like '#:fec' to the end of the
# dependency line.
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
| tr "$nl" ' ' >> "$depfile"
echo >> "$depfile"
# The second pass generates a dummy entry for each header file.
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> "$depfile"
else
make_dummy_depfile
fi
rm -f "$tmpdepfile"
;;
xlc)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts '$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
set_dir_from "$object"
set_base_from "$object"
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.u
tmpdepfile2=$base.u
tmpdepfile3=$dir.libs/$base.u
"$@" -Wc,-M
else
tmpdepfile1=$dir$base.u
tmpdepfile2=$dir$base.u
tmpdepfile3=$dir$base.u
"$@" -M
fi
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
aix_post_process_depfile
;;
tcc)
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
# FIXME: That version still under development at the moment of writing.
# Make that this statement remains true also for stable, released
# versions.
# It will wrap lines (doesn't matter whether long or short) with a
# trailing '\', as in:
#
# foo.o : \
# foo.c \
# foo.h \
#
# It will put a trailing '\' even on the last line, and will use leading
# spaces rather than leading tabs (at least since its commit 0394caf7
# "Emit spaces for -MD").
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
# We have to change lines of the first kind to '$object: \'.
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
# And for each line of the second kind, we have to emit a 'dep.h:'
# dummy dependency, to avoid the deleted-header problem.
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
rm -f "$tmpdepfile"
;;
## The order of this option in the case statement is important, since the
## shell code in configure will try each of these formats in the order
## listed in this file. A plain '-MD' option would be understood by many
## compilers, so we must ensure this comes after the gcc and icc options.
pgcc)
# Portland's C compiler understands '-MD'.
# Will always output deps to 'file.d' where file is the root name of the
# source file under compilation, even if file resides in a subdirectory.
# The object file name does not affect the name of the '.d' file.
# pgcc 10.2 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using '\' :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
set_dir_from "$object"
# Use the source, not the object, to determine the base name, since
# that's sadly what pgcc will do too.
set_base_from "$source"
tmpdepfile=$base.d
# For projects that build the same source file twice into different object
# files, the pgcc approach of using the *source* file root name can cause
# problems in parallel builds. Use a locking strategy to avoid stomping on
# the same $tmpdepfile.
lockdir=$base.d-lock
trap "
echo '$0: caught signal, cleaning up...' >&2
rmdir '$lockdir'
exit 1
" 1 2 13 15
numtries=100
i=$numtries
while test $i -gt 0; do
# mkdir is a portable test-and-set.
if mkdir "$lockdir" 2>/dev/null; then
# This process acquired the lock.
"$@" -MD
stat=$?
# Release the lock.
rmdir "$lockdir"
break
else
# If the lock is being held by a different process, wait
# until the winning process is done or we timeout.
while test -d "$lockdir" && test $i -gt 0; do
sleep 1
i=`expr $i - 1`
done
fi
i=`expr $i - 1`
done
trap - 1 2 13 15
if test $i -le 0; then
echo "$0: failed to acquire lock after $numtries attempts" >&2
echo "$0: check lockdir '$lockdir'" >&2
exit 1
fi
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp2)
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
# compilers, which have integrated preprocessors. The correct option
# to use with these is +Maked; it writes dependencies to a file named
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
set_dir_from "$object"
set_base_from "$object"
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
"$@" -Wc,+Maked
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
"$@" +Maked
fi
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
# Add 'dependent.h:' lines.
sed -ne '2,${
s/^ *//
s/ \\*$//
s/$/:/
p
}' "$tmpdepfile" >> "$depfile"
else
make_dummy_depfile
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in 'foo.d' instead, so we check for that too.
# Subdirectories are respected.
set_dir_from "$object"
set_base_from "$object"
if test "$libtool" = yes; then
# Libtool generates 2 separate objects for the 2 libraries. These
# two compilations output dependencies in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
# automatically cleaned when .libs/ is deleted, while ignoring
# the former would cause a distcleancheck panic.
tmpdepfile1=$dir$base.o.d # libtool 1.5
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
"$@" -Wc,-MD
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
tmpdepfile3=$dir$base.d
"$@" -MD
fi
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
# Same post-processing that is required for AIX mode.
aix_post_process_depfile
;;
msvc7)
if test "$libtool" = yes; then
showIncludes=-Wc,-showIncludes
else
showIncludes=-showIncludes
fi
"$@" $showIncludes > "$tmpdepfile"
stat=$?
grep -v '^Note: including file: ' "$tmpdepfile"
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
# The first sed program below extracts the file names and escapes
# backslashes for cygpath. The second sed program outputs the file
# name when reading, but also accumulates all include files in the
# hold buffer in order to output them again at the end. This only
# works with sed implementations that can handle large buffers.
sed < "$tmpdepfile" -n '
/^Note: including file: *\(.*\)/ {
s//\1/
s/\\/\\\\/g
p
}' | $cygpath_u | sort -u | sed -n '
s/ /\\ /g
s/\(.*\)/'"$tab"'\1 \\/p
s/.\(.*\) \\/\1:/
H
$ {
s/.*/'"$tab"'/
G
p
}' >> "$depfile"
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
rm -f "$tmpdepfile"
;;
msvc7msys)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# Remove '-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for ':'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
"$@" $dashmflag |
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this sed invocation
# correctly. Breaking it into two sed invocations is a workaround.
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no eat=no
for arg
do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
if test $eat = yes; then
eat=no
continue
fi
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-arch)
eat=yes ;;
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix=`echo "$object" | sed 's/^.*\././'`
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
# makedepend may prepend the VPATH from the source file name to the object.
# No need to regex-escape $object, excess matching of '.' is harmless.
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process the last invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed '1,2d' "$tmpdepfile" \
| tr ' ' "$nl" \
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# Remove '-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
"$@" -E \
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
| sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
IFS=" "
for arg
do
case "$arg" in
-o)
shift
;;
$object)
shift
;;
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E 2>/dev/null |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
echo "$tab" >> "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvcmsys)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:

View file

@ -1,508 +0,0 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2014-09-12.12; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# 'make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
tab=' '
nl='
'
IFS=" $tab$nl"
# Set DOITPROG to "echo" to test this script.
doit=${DOITPROG-}
doit_exec=${doit:-exec}
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
chgrpprog=${CHGRPPROG-chgrp}
chmodprog=${CHMODPROG-chmod}
chownprog=${CHOWNPROG-chown}
cmpprog=${CMPPROG-cmp}
cpprog=${CPPROG-cp}
mkdirprog=${MKDIRPROG-mkdir}
mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
posix_mkdir=
# Desired mode of installed file.
mode=0755
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
stripcmd=
src=
dst=
dir_arg=
dst_arg=
copy_on_change=false
is_target_a_directory=possibly
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
--help display this help and exit.
--version display version info and exit.
-c (ignored)
-C install only if different (preserve the last data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
"
while test $# -ne 0; do
case $1 in
-c) ;;
-C) copy_on_change=true;;
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
case $mode in
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
shift;;
-s) stripcmd=$stripprog;;
-t)
is_target_a_directory=always
dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) is_target_a_directory=never;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
done
# We allow the use of options -d and -T together, by making -d
# take the precedence; this is for compatibility with GNU install.
if test -n "$dir_arg"; then
if test -n "$dst_arg"; then
echo "$0: target directory not allowed when installing a directory." >&2
exit 1
fi
fi
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
done
fi
if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call 'install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if test -z "$dir_arg"; then
if test $# -gt 1 || test "$is_target_a_directory" = always; then
if test ! -d "$dst_arg"; then
echo "$0: $dst_arg: Is not a directory." >&2
exit 1
fi
fi
fi
if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
trap "ret=141; $do_exit" 13
trap "ret=143; $do_exit" 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src
do
# Protect names problematic for 'test' and other utilities.
case $src in
-* | [=\(\)!]) src=./$src;;
esac
if test -n "$dir_arg"; then
dst=$src
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dst_arg
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test "$is_target_a_directory" = never; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
dstdir=`dirname "$dst"`
test -d "$dstdir"
dstdir_status=$?
fi
fi
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
# $RANDOM is not portable (e.g. dash); use it when possible to
# lower collision chance
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
# As "mkdir -p" follows symlinks and we work in /tmp possibly; so
# create the $tmpdir first (and fail if unsuccessful) to make sure
# that nobody tries to guess the $tmpdir name.
if (umask $mkdir_umask &&
$mkdirprog $mkdir_mode "$tmpdir" &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
test_tmpdir="$tmpdir/a"
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
fi
trap '' 0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
[-=\(\)!]*) prefix='./';;
*) prefix='';;
esac
oIFS=$IFS
IFS=/
set -f
set fnord $dstdir
shift
set +f
IFS=$oIFS
prefixes=
for d
do
test X"$d" = X && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
trap '' 0
fi
done
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

File diff suppressed because it is too large Load diff

8387
ffms2/m4/libtool.m4 vendored

File diff suppressed because it is too large Load diff

View file

@ -1,61 +0,0 @@
/* src/config/config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#undef LT_OBJDIR
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION

View file

@ -1,138 +0,0 @@
// Copyright (c) 2007-2011 Fredrik Mellbin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#ifndef UTILS_H
#define UTILS_H
#include "ffms.h"
extern "C" {
#include <libavutil/mem.h>
#include <libavutil/opt.h>
#include <libavformat/avformat.h>
#include <libavcodec/avcodec.h>
#include <libswscale/swscale.h>
#include <libswresample/swresample.h>
}
// must be included after ffmpeg headers
#include "ffmscompat.h"
#include <cstdio>
#include <memory>
#include <string>
#include <vector>
class FFMS_Exception {
std::string _Message;
int _ErrorType;
int _SubType;
public:
FFMS_Exception(int ErrorType, int SubType, const char *Message = "");
FFMS_Exception(int ErrorType, int SubType, const std::string &Message);
const std::string &GetErrorMessage() const { return _Message; }
int CopyOut(FFMS_ErrorInfo *ErrorInfo) const;
};
template<typename T, typename... Args>
std::unique_ptr<T> make_unique(Args&&... args) {
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
}
void ClearErrorInfo(FFMS_ErrorInfo *ErrorInfo);
void InitNullPacket(AVPacket &pkt);
void FillAP(FFMS_AudioProperties &AP, AVCodecContext *CTX, FFMS_Track &Frames);
void LAVFOpenFile(const char *SourceFile, AVFormatContext *&FormatContext, int Track);
namespace optdetail {
template<typename T>
T get_av_opt(void *v, const char *name) {
int64_t value = 0;
av_opt_get_int(v, name, 0, &value);
return static_cast<T>(value);
}
template<>
inline double get_av_opt<double>(void *v, const char *name) {
double value = 0.0;
av_opt_get_double(v, name, 0, &value);
return value;
}
template<typename T>
void set_av_opt(void *v, const char *name, T value) {
av_opt_set_int(v, name, value, 0);
}
template<>
inline void set_av_opt<double>(void *v, const char *name, double value) {
av_opt_set_double(v, name, value, 0);
}
}
template<typename FFMS_Struct>
class OptionMapper {
struct OptionMapperBase {
virtual void ToOpt(FFMS_Struct const& src, void *dst) const = 0;
virtual void FromOpt(FFMS_Struct &dst, void *src) const = 0;
virtual ~OptionMapperBase() = default;
};
template<typename T>
class OptionMapperImpl : public OptionMapperBase {
T(FFMS_Struct::*ptr);
const char *name;
public:
OptionMapperImpl(T(FFMS_Struct::*ptr), const char *name) : ptr(ptr), name(name) {}
void ToOpt(FFMS_Struct const& src, void *dst) const { optdetail::set_av_opt(dst, name, src.*ptr); }
void FromOpt(FFMS_Struct &dst, void *src) const { dst.*ptr = optdetail::get_av_opt<T>(src, name); }
};
std::unique_ptr<OptionMapperBase> impl;
public:
template<typename T>
OptionMapper(const char *opt_name, T(FFMS_Struct::*member)) : impl(new OptionMapperImpl<T>(member, opt_name)) {}
void ToOpt(FFMS_Struct const& src, void *dst) const { impl->ToOpt(src, dst); }
void FromOpt(FFMS_Struct &dst, void *src) const { impl->FromOpt(dst, src); }
};
template<typename T, int N>
std::unique_ptr<T> ReadOptions(void *opt, OptionMapper<T>(&options)[N]) {
auto ret = make_unique<T>();
for (int i = 0; i < N; ++i)
options[i].FromOpt(*ret, opt);
return ret;
}
template<typename T, int N>
void SetOptions(T const& src, void *opt, OptionMapper<T>(&options)[N]) {
for (int i = 0; i < N; ++i)
options[i].ToOpt(src, opt);
}
int ResizerNameToSWSResizer(const char *ResizerName);
bool IsSamePath(const char *p1, const char *p2);
#endif

View file

@ -1,285 +0,0 @@
// Copyright (c) 2008-2009 Karl Blomster
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#include "ffms.h"
#ifdef _WIN32
#include "vsutf16.h"
#endif
#include <cinttypes>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include <string>
#include <stdexcept>
namespace {
long long IndexMask = 0;
int Verbose = 0;
int IgnoreErrors = 0;
bool Overwrite = false;
bool PrintProgress = true;
bool WriteTC = false;
bool WriteKF = false;
std::string InputFile;
std::string CacheFile;
struct Error {
std::string msg;
Error(const char *msg) : msg(msg) {}
Error(const char *msg, FFMS_ErrorInfo const& e) : msg(msg) {
this->msg.append(e.Buffer);
}
};
void PrintUsage() {
std::cout <<
"FFmpegSource2 indexing app\n"
"Usage: ffmsindex [options] inputfile [outputfile]\n"
"If no output filename is specified, inputfile.ffindex will be used.\n"
"\n"
"Options:\n"
"-f Force overwriting of existing index file, if any (default: no)\n"
"-v Set FFmpeg verbosity level. Can be repeated for more verbosity. (default: no messages printed)\n"
"-p Disable progress reporting. (default: progress reporting on)\n"
"-c Write timecodes for all video tracks to outputfile_track00.tc.txt (default: no)\n"
"-k Write keyframes for all video tracks to outputfile_track00.kf.txt (default: no)\n"
"-t N Set the audio indexing mask to N (-1 means index all tracks, 0 means index none, default: 0)\n"
"-s N Set audio decoding error handling. See the documentation for details. (default: 0)\n"
<< std::endl;
}
void ParseCMDLine(int argc, const char *argv[]) {
for (int i = 1; i < argc; ++i) {
const char *Option = argv[i];
#define OPTION_ARG(dst, flag, parse) try { dst = parse(i + 1 < argc ? argv[i+1] : throw Error("Error: missing argument for -" flag)); i++; } catch (std::logic_error &) { throw Error("Error: invalid argument specified for -" flag); }
if (!strcmp(Option, "-f")) {
Overwrite = true;
} else if (!strcmp(Option, "-v")) {
Verbose++;
} else if (!strcmp(Option, "-p")) {
PrintProgress = false;
} else if (!strcmp(Option, "-c")) {
WriteTC = true;
} else if (!strcmp(Option, "-k")) {
WriteKF = true;
} else if (!strcmp(Option, "-t")) {
OPTION_ARG(IndexMask, "t", std::stoll);
} else if (!strcmp(Option, "-s")) {
OPTION_ARG(IgnoreErrors, "s", std::stoi);
} else if (InputFile.empty()) {
InputFile = Option;
} else if (CacheFile.empty()) {
CacheFile = Option;
} else {
std::cout << "Warning: ignoring unknown option " << Option << std::endl;
}
}
if (IgnoreErrors < 0 || IgnoreErrors > 3)
throw Error("Error: invalid error handling mode");
if (InputFile.empty())
throw Error("Error: no input file specified");
if (CacheFile.empty()) {
CacheFile = InputFile;
CacheFile.append(".ffindex");
}
}
int FFMS_CC UpdateProgress(int64_t Current, int64_t Total, void *Private) {
if (!PrintProgress)
return 0;
int Percentage = int((double(Current) / double(Total)) * 100);
if (Private) {
int *LastPercentage = (int *)Private;
if (Percentage <= *LastPercentage)
return 0;
*LastPercentage = Percentage;
}
std::cout << "Indexing, please wait... " << Percentage << "% \r" << std::flush;
return 0;
}
std::string DumpFilename(FFMS_Track *Track, int TrackNum, const char *Suffix) {
if (FFMS_GetTrackType(Track) != FFMS_TYPE_VIDEO || !FFMS_GetNumFrames(Track))
return "";
char tn[11];
snprintf(tn, 11, "%02" PRIu32"", (uint32_t) TrackNum);
return CacheFile + "_track" + tn + Suffix;
}
void DoIndexing() {
char ErrorMsg[1024];
FFMS_ErrorInfo E;
E.Buffer = ErrorMsg;
E.BufferSize = sizeof(ErrorMsg);
int Progress = 0;
FFMS_Index *Index = FFMS_ReadIndex(CacheFile.c_str(), &E);
if (Index) {
FFMS_DestroyIndex(Index);
if (!Overwrite)
throw Error("Error: index file already exists, use -f if you are sure you want to overwrite it.");
}
UpdateProgress(0, 100, nullptr);
FFMS_Indexer *Indexer = FFMS_CreateIndexer(InputFile.c_str(), &E);
if (Indexer == nullptr)
throw Error("\nFailed to initialize indexing: ", E);
FFMS_SetProgressCallback(Indexer, UpdateProgress, &Progress);
// Treat -1 as meaning track numbers above sizeof(long long) * 8 too, dumping implies indexing
if (IndexMask == -1)
FFMS_TrackTypeIndexSettings(Indexer, FFMS_TYPE_AUDIO, 1, 0);
// Apply attributes to remaining tracks (will set the attributes again on some tracks)
for (int i = 0; i < static_cast<int>(sizeof(IndexMask) * 8); i++) {
if ((IndexMask >> i) & 1)
FFMS_TrackIndexSettings(Indexer, i, 1, 0);
}
Index = FFMS_DoIndexing2(Indexer, IgnoreErrors, &E);
// The indexer is always freed
Indexer = nullptr;
if (Index == nullptr)
throw Error("\nIndexing error: ", E);
UpdateProgress(100, 100, nullptr);
std::cout << std::endl;
if (WriteTC) {
if (PrintProgress)
std::cout << "Writing timecodes... ";
int NumTracks = FFMS_GetNumTracks(Index);
for (int t = 0; t < NumTracks; t++) {
FFMS_Track *Track = FFMS_GetTrackFromIndex(Index, t);
std::string Filename = DumpFilename(Track, t, ".tc.txt");
if (!Filename.empty()) {
if (FFMS_WriteTimecodes(Track, Filename.c_str(), &E))
std::cout << std::endl << "Failed to write timecodes file "
<< Filename << ": " << E.Buffer << std::endl;
}
}
if (PrintProgress)
std::cout << "done." << std::endl;
}
if (WriteKF) {
if (PrintProgress)
std::cout << "Writing keyframes... ";
int NumTracks = FFMS_GetNumTracks(Index);
for (int t = 0; t < NumTracks; t++) {
FFMS_Track *Track = FFMS_GetTrackFromIndex(Index, t);
std::string Filename = DumpFilename(Track, t, ".kf.txt");
if (!Filename.empty()) {
std::ofstream kf(Filename.c_str());
kf << "# keyframe format v1\n"
"fps 0\n";
int FrameCount = FFMS_GetNumFrames(Track);
for (int CurFrameNum = 0; CurFrameNum < FrameCount; CurFrameNum++) {
if (FFMS_GetFrameInfo(Track, CurFrameNum)->KeyFrame)
kf << CurFrameNum << "\n";
}
}
}
if (PrintProgress)
std::cout << "done. " << std::endl;
}
if (PrintProgress)
std::cout << "Writing index... ";
int error = FFMS_WriteIndex(CacheFile.c_str(), Index, &E);
FFMS_DestroyIndex(Index);
if (error)
throw Error("Error writing index: ", E);
if (PrintProgress)
std::cout << "done." << std::endl;
}
} // namespace {
#ifdef _WIN32
int wmain(int argc, const wchar_t *_argv[]) {
std::vector<const char *> StringPtrs(argc);
std::vector<std::string> StringStorage(argc);
for (int i = 0; i < argc; i++) {
StringStorage[i] = utf16_to_utf8(_argv[i]);
StringPtrs[i] = StringStorage[i].c_str();
}
const char **argv = StringPtrs.data();
#else
int main(int argc, const char *argv[]) {
#endif
try {
if (argc <= 1) {
PrintUsage();
return 0;
}
ParseCMDLine(argc, argv);
} catch (Error const& e) {
std::cout << e.msg << std::endl;
return 1;
}
FFMS_Init(0, 0);
switch (Verbose) {
case 0: FFMS_SetLogLevel(FFMS_LOG_QUIET); break;
case 1: FFMS_SetLogLevel(FFMS_LOG_WARNING); break;
case 2: FFMS_SetLogLevel(FFMS_LOG_INFO); break;
case 3: FFMS_SetLogLevel(FFMS_LOG_VERBOSE); break;
default: FFMS_SetLogLevel(FFMS_LOG_DEBUG); // if user used -v 4 or more times, he deserves the spam
}
try {
DoIndexing();
} catch (Error const& e) {
std::cout << e.msg << std::endl;
FFMS_Deinit();
return 1;
}
FFMS_Deinit();
return 0;
}

View file

@ -1,174 +0,0 @@
/*****************************************************************************
* Copyright (c) 2012-2015 Fredrik Mellbin
* --- Legal stuff ---
* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What The Fuck You Want
* To Public License, Version 2, as published by Sam Hocevar. See
* http://sam.zoy.org/wtfpl/COPYING for more details.
*****************************************************************************/
#ifndef VSHELPER_H
#define VSHELPER_H
#include <limits.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <math.h>
#ifdef _WIN32
#include <malloc.h>
#endif
#include "VapourSynth.h"
/* Visual Studio doesn't recognize inline in c mode */
#if defined(_MSC_VER) && !defined(__cplusplus)
#define inline _inline
#endif
/* A kinda portable definition of the C99 restrict keyword (or its inofficial C++ equivalent) */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* Available in C99 */
#define VS_RESTRICT restrict
#elif defined(__cplusplus) || defined(_MSC_VER) /* Almost all relevant C++ compilers support it so just assume it works */
#define VS_RESTRICT __restrict
#else /* Not supported */
#define VS_RESTRICT
#endif
#ifdef _WIN32
#define VS_ALIGNED_MALLOC(pptr, size, alignment) do { *(pptr) = _aligned_malloc((size), (alignment)); } while (0)
#define VS_ALIGNED_FREE(ptr) do { _aligned_free((ptr)); } while (0)
#else
#define VS_ALIGNED_MALLOC(pptr, size, alignment) do { if(posix_memalign((void**)(pptr), (alignment), (size))) *((void**)pptr) = NULL; } while (0)
#define VS_ALIGNED_FREE(ptr) do { free((ptr)); } while (0)
#endif
#define VSMAX(a,b) ((a) > (b) ? (a) : (b))
#define VSMIN(a,b) ((a) > (b) ? (b) : (a))
#ifdef __cplusplus
/* A nicer templated malloc for all the C++ users out there */
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1900)
template<typename T=void>
#else
template<typename T>
#endif
static inline T* vs_aligned_malloc(size_t size, size_t alignment) {
#ifdef _WIN32
return (T*)_aligned_malloc(size, alignment);
#else
void *tmp = NULL;
if (posix_memalign(&tmp, alignment, size))
tmp = 0;
return (T*)tmp;
#endif
}
static inline void vs_aligned_free(void *ptr) {
VS_ALIGNED_FREE(ptr);
}
#endif /* __cplusplus */
/* convenience function for checking if the format never changes between frames */
static inline int isConstantFormat(const VSVideoInfo *vi) {
return vi->height > 0 && vi->width > 0 && vi->format;
}
/* convenience function to check for if two clips have the same format (unknown/changeable will be considered the same too) */
static inline int isSameFormat(const VSVideoInfo *v1, const VSVideoInfo *v2) {
return v1->height == v2->height && v1->width == v2->width && v1->format == v2->format;
}
/* multiplies and divides a rational number, such as a frame duration, in place and reduces the result */
static inline void muldivRational(int64_t *num, int64_t *den, int64_t mul, int64_t div) {
/* do nothing if the rational number is invalid */
if (!*den)
return;
/* nobody wants to accidentally divide by zero */
assert(div);
int64_t a, b;
*num *= mul;
*den *= div;
a = *num;
b = *den;
while (b != 0) {
int64_t t = a;
a = b;
b = t % b;
}
if (a < 0)
a = -a;
*num /= a;
*den /= a;
}
/* reduces a rational number */
static inline void vs_normalizeRational(int64_t *num, int64_t *den) {
muldivRational(num, den, 1, 1);
}
/* add two rational numbers and reduces the result */
static inline void vs_addRational(int64_t *num, int64_t *den, int64_t addnum, int64_t addden) {
/* do nothing if the rational number is invalid */
if (!*den)
return;
/* nobody wants to accidentally add an invalid rational number */
assert(addden);
if (*den == addden) {
*num += addnum;
} else {
int64_t temp = addden;
addnum *= *den;
addden *= *den;
*num *= temp;
*den *= temp;
*num += addnum;
vs_normalizeRational(num, den);
}
}
/* converts an int64 to int with saturation, useful to silence warnings when reading int properties among other things */
static inline int int64ToIntS(int64_t i) {
if (i > INT_MAX)
return INT_MAX;
else if (i < INT_MIN)
return INT_MIN;
else return (int)i;
}
static inline void vs_bitblt(void *dstp, int dst_stride, const void *srcp, int src_stride, size_t row_size, size_t height) {
if (height) {
if (src_stride == dst_stride && src_stride == (int)row_size) {
memcpy(dstp, srcp, row_size * height);
} else {
const uint8_t *srcp8 = (const uint8_t *)srcp;
uint8_t *dstp8 = (uint8_t *)dstp;
size_t i;
for (i = 0; i < height; i++) {
memcpy(dstp8, srcp8, row_size);
srcp8 += src_stride;
dstp8 += dst_stride;
}
}
}
}
/* check if the frame dimensions are valid for a given format */
/* returns non-zero for valid width and height */
static inline int areValidDimensions(const VSFormat *fi, int width, int height) {
return !(width % (1 << fi->subSamplingW) || height % (1 << fi->subSamplingH));
}
/* Visual Studio doesn't recognize inline in c mode */
#if defined(_MSC_VER) && !defined(__cplusplus)
#undef inline
#endif
#endif

View file

@ -1,342 +0,0 @@
/*
* Copyright (c) 2012-2017 Fredrik Mellbin
*
* This file is part of VapourSynth.
*
* VapourSynth is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* VapourSynth is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with VapourSynth; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef VAPOURSYNTH_H
#define VAPOURSYNTH_H
#include <stdint.h>
#define VAPOURSYNTH_API_MAJOR 3
#define VAPOURSYNTH_API_MINOR 5
#define VAPOURSYNTH_API_VERSION ((VAPOURSYNTH_API_MAJOR << 16) | (VAPOURSYNTH_API_MINOR))
/* Convenience for C++ users. */
#ifdef __cplusplus
# define VS_EXTERN_C extern "C"
# if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1900)
# define VS_NOEXCEPT noexcept
# else
# define VS_NOEXCEPT
# endif
#else
# define VS_EXTERN_C
# define VS_NOEXCEPT
#endif
#if defined(_WIN32) && !defined(_WIN64)
# define VS_CC __stdcall
#else
# define VS_CC
#endif
/* And now for some symbol hide-and-seek... */
#if defined(_WIN32) /* Windows being special */
# define VS_EXTERNAL_API(ret) VS_EXTERN_C __declspec(dllexport) ret VS_CC
#elif defined(__GNUC__) && __GNUC__ >= 4
# define VS_EXTERNAL_API(ret) VS_EXTERN_C __attribute__((visibility("default"))) ret VS_CC
#else
# define VS_EXTERNAL_API(ret) VS_EXTERN_C ret VS_CC
#endif
#if !defined(VS_CORE_EXPORTS) && defined(_WIN32)
# define VS_API(ret) VS_EXTERN_C __declspec(dllimport) ret VS_CC
#else
# define VS_API(ret) VS_EXTERNAL_API(ret)
#endif
typedef struct VSFrameRef VSFrameRef;
typedef struct VSNodeRef VSNodeRef;
typedef struct VSCore VSCore;
typedef struct VSPlugin VSPlugin;
typedef struct VSNode VSNode;
typedef struct VSFuncRef VSFuncRef;
typedef struct VSMap VSMap;
typedef struct VSAPI VSAPI;
typedef struct VSFrameContext VSFrameContext;
typedef enum VSColorFamily {
/* all planar formats */
cmGray = 1000000,
cmRGB = 2000000,
cmYUV = 3000000,
cmYCoCg = 4000000,
/* special for compatibility */
cmCompat = 9000000
} VSColorFamily;
typedef enum VSSampleType {
stInteger = 0,
stFloat = 1
} VSSampleType;
/* The +10 is so people won't be using the constants interchangably "by accident" */
typedef enum VSPresetFormat {
pfNone = 0,
pfGray8 = cmGray + 10,
pfGray16,
pfGrayH,
pfGrayS,
pfYUV420P8 = cmYUV + 10,
pfYUV422P8,
pfYUV444P8,
pfYUV410P8,
pfYUV411P8,
pfYUV440P8,
pfYUV420P9,
pfYUV422P9,
pfYUV444P9,
pfYUV420P10,
pfYUV422P10,
pfYUV444P10,
pfYUV420P16,
pfYUV422P16,
pfYUV444P16,
pfYUV444PH,
pfYUV444PS,
pfYUV420P12,
pfYUV422P12,
pfYUV444P12,
pfYUV420P14,
pfYUV422P14,
pfYUV444P14,
pfRGB24 = cmRGB + 10,
pfRGB27,
pfRGB30,
pfRGB48,
pfRGBH,
pfRGBS,
/* special for compatibility, if you implement these in any filter I'll personally kill you */
/* I'll also change their ids around to break your stuff regularly */
pfCompatBGR32 = cmCompat + 10,
pfCompatYUY2
} VSPresetFormat;
typedef enum VSFilterMode {
fmParallel = 100, /* completely parallel execution */
fmParallelRequests = 200, /* for filters that are serial in nature but can request one or more frames they need in advance */
fmUnordered = 300, /* for filters that modify their internal state every request */
fmSerial = 400 /* for source filters and compatibility with other filtering architectures */
} VSFilterMode;
typedef struct VSFormat {
char name[32];
int id;
int colorFamily; /* see VSColorFamily */
int sampleType; /* see VSSampleType */
int bitsPerSample; /* number of significant bits */
int bytesPerSample; /* actual storage is always in a power of 2 and the smallest possible that can fit the number of bits used per sample */
int subSamplingW; /* log2 subsampling factor, applied to second and third plane */
int subSamplingH;
int numPlanes; /* implicit from colorFamily */
} VSFormat;
typedef enum VSNodeFlags {
nfNoCache = 1,
nfIsCache = 2,
nfMakeLinear = 4 /* api 3.3 */
} VSNodeFlags;
typedef enum VSPropTypes {
ptUnset = 'u',
ptInt = 'i',
ptFloat = 'f',
ptData = 's',
ptNode = 'c',
ptFrame = 'v',
ptFunction = 'm'
} VSPropTypes;
typedef enum VSGetPropErrors {
peUnset = 1,
peType = 2,
peIndex = 4
} VSGetPropErrors;
typedef enum VSPropAppendMode {
paReplace = 0,
paAppend = 1,
paTouch = 2
} VSPropAppendMode;
typedef struct VSCoreInfo {
const char *versionString;
int core;
int api;
int numThreads;
int64_t maxFramebufferSize;
int64_t usedFramebufferSize;
} VSCoreInfo;
typedef struct VSVideoInfo {
const VSFormat *format;
int64_t fpsNum;
int64_t fpsDen;
int width;
int height;
int numFrames; /* api 3.2 - no longer allowed to be 0 */
int flags;
} VSVideoInfo;
typedef enum VSActivationReason {
arInitial = 0,
arFrameReady = 1,
arAllFramesReady = 2,
arError = -1
} VSActivationReason;
typedef enum VSMessageType {
mtDebug = 0,
mtWarning = 1,
mtCritical = 2,
mtFatal = 3
} VSMessageType;
/* core entry point */
typedef const VSAPI *(VS_CC *VSGetVapourSynthAPI)(int version);
/* plugin function and filter typedefs */
typedef void (VS_CC *VSPublicFunction)(const VSMap *in, VSMap *out, void *userData, VSCore *core, const VSAPI *vsapi);
typedef void (VS_CC *VSRegisterFunction)(const char *name, const char *args, VSPublicFunction argsFunc, void *functionData, VSPlugin *plugin);
typedef void (VS_CC *VSConfigPlugin)(const char *identifier, const char *defaultNamespace, const char *name, int apiVersion, int readonly, VSPlugin *plugin);
typedef void (VS_CC *VSInitPlugin)(VSConfigPlugin configFunc, VSRegisterFunction registerFunc, VSPlugin *plugin);
typedef void (VS_CC *VSFreeFuncData)(void *userData);
typedef void (VS_CC *VSFilterInit)(VSMap *in, VSMap *out, void **instanceData, VSNode *node, VSCore *core, const VSAPI *vsapi);
typedef const VSFrameRef *(VS_CC *VSFilterGetFrame)(int n, int activationReason, void **instanceData, void **frameData, VSFrameContext *frameCtx, VSCore *core, const VSAPI *vsapi);
typedef void (VS_CC *VSFilterFree)(void *instanceData, VSCore *core, const VSAPI *vsapi);
/* other */
typedef void (VS_CC *VSFrameDoneCallback)(void *userData, const VSFrameRef *f, int n, VSNodeRef *, const char *errorMsg);
typedef void (VS_CC *VSMessageHandler)(int msgType, const char *msg, void *userData);
struct VSAPI {
VSCore *(VS_CC *createCore)(int threads) VS_NOEXCEPT;
void (VS_CC *freeCore)(VSCore *core) VS_NOEXCEPT;
const VSCoreInfo *(VS_CC *getCoreInfo)(VSCore *core) VS_NOEXCEPT;
const VSFrameRef *(VS_CC *cloneFrameRef)(const VSFrameRef *f) VS_NOEXCEPT;
VSNodeRef *(VS_CC *cloneNodeRef)(VSNodeRef *node) VS_NOEXCEPT;
VSFuncRef *(VS_CC *cloneFuncRef)(VSFuncRef *f) VS_NOEXCEPT;
void (VS_CC *freeFrame)(const VSFrameRef *f) VS_NOEXCEPT;
void (VS_CC *freeNode)(VSNodeRef *node) VS_NOEXCEPT;
void (VS_CC *freeFunc)(VSFuncRef *f) VS_NOEXCEPT;
VSFrameRef *(VS_CC *newVideoFrame)(const VSFormat *format, int width, int height, const VSFrameRef *propSrc, VSCore *core) VS_NOEXCEPT;
VSFrameRef *(VS_CC *copyFrame)(const VSFrameRef *f, VSCore *core) VS_NOEXCEPT;
void (VS_CC *copyFrameProps)(const VSFrameRef *src, VSFrameRef *dst, VSCore *core) VS_NOEXCEPT;
void (VS_CC *registerFunction)(const char *name, const char *args, VSPublicFunction argsFunc, void *functionData, VSPlugin *plugin) VS_NOEXCEPT;
VSPlugin *(VS_CC *getPluginById)(const char *identifier, VSCore *core) VS_NOEXCEPT;
VSPlugin *(VS_CC *getPluginByNs)(const char *ns, VSCore *core) VS_NOEXCEPT;
VSMap *(VS_CC *getPlugins)(VSCore *core) VS_NOEXCEPT;
VSMap *(VS_CC *getFunctions)(VSPlugin *plugin) VS_NOEXCEPT;
void (VS_CC *createFilter)(const VSMap *in, VSMap *out, const char *name, VSFilterInit init, VSFilterGetFrame getFrame, VSFilterFree free, int filterMode, int flags, void *instanceData, VSCore *core) VS_NOEXCEPT;
void (VS_CC *setError)(VSMap *map, const char *errorMessage) VS_NOEXCEPT; /* use to signal errors outside filter getframe functions */
const char *(VS_CC *getError)(const VSMap *map) VS_NOEXCEPT; /* use to query errors, returns 0 if no error */
void (VS_CC *setFilterError)(const char *errorMessage, VSFrameContext *frameCtx) VS_NOEXCEPT; /* use to signal errors in the filter getframe function */
VSMap *(VS_CC *invoke)(VSPlugin *plugin, const char *name, const VSMap *args) VS_NOEXCEPT;
const VSFormat *(VS_CC *getFormatPreset)(int id, VSCore *core) VS_NOEXCEPT;
const VSFormat *(VS_CC *registerFormat)(int colorFamily, int sampleType, int bitsPerSample, int subSamplingW, int subSamplingH, VSCore *core) VS_NOEXCEPT;
const VSFrameRef *(VS_CC *getFrame)(int n, VSNodeRef *node, char *errorMsg, int bufSize) VS_NOEXCEPT; /* do never use inside a filter's getframe function, for external applications using the core as a library or for requesting frames in a filter constructor */
void (VS_CC *getFrameAsync)(int n, VSNodeRef *node, VSFrameDoneCallback callback, void *userData) VS_NOEXCEPT; /* do never use inside a filter's getframe function, for external applications using the core as a library or for requesting frames in a filter constructor */
const VSFrameRef *(VS_CC *getFrameFilter)(int n, VSNodeRef *node, VSFrameContext *frameCtx) VS_NOEXCEPT; /* only use inside a filter's getframe function */
void (VS_CC *requestFrameFilter)(int n, VSNodeRef *node, VSFrameContext *frameCtx) VS_NOEXCEPT; /* only use inside a filter's getframe function */
void (VS_CC *queryCompletedFrame)(VSNodeRef **node, int *n, VSFrameContext *frameCtx) VS_NOEXCEPT; /* only use inside a filter's getframe function */
void (VS_CC *releaseFrameEarly)(VSNodeRef *node, int n, VSFrameContext *frameCtx) VS_NOEXCEPT; /* only use inside a filter's getframe function */
int (VS_CC *getStride)(const VSFrameRef *f, int plane) VS_NOEXCEPT;
const uint8_t *(VS_CC *getReadPtr)(const VSFrameRef *f, int plane) VS_NOEXCEPT;
uint8_t *(VS_CC *getWritePtr)(VSFrameRef *f, int plane) VS_NOEXCEPT;
VSFuncRef *(VS_CC *createFunc)(VSPublicFunction func, void *userData, VSFreeFuncData free, VSCore *core, const VSAPI *vsapi) VS_NOEXCEPT;
void (VS_CC *callFunc)(VSFuncRef *func, const VSMap *in, VSMap *out, VSCore *core, const VSAPI *vsapi) VS_NOEXCEPT; /* core and vsapi arguments are completely ignored, they only remain to preserve ABI */
/* property access functions */
VSMap *(VS_CC *createMap)(void) VS_NOEXCEPT;
void (VS_CC *freeMap)(VSMap *map) VS_NOEXCEPT;
void (VS_CC *clearMap)(VSMap *map) VS_NOEXCEPT;
const VSVideoInfo *(VS_CC *getVideoInfo)(VSNodeRef *node) VS_NOEXCEPT;
void (VS_CC *setVideoInfo)(const VSVideoInfo *vi, int numOutputs, VSNode *node) VS_NOEXCEPT;
const VSFormat *(VS_CC *getFrameFormat)(const VSFrameRef *f) VS_NOEXCEPT;
int (VS_CC *getFrameWidth)(const VSFrameRef *f, int plane) VS_NOEXCEPT;
int (VS_CC *getFrameHeight)(const VSFrameRef *f, int plane) VS_NOEXCEPT;
const VSMap *(VS_CC *getFramePropsRO)(const VSFrameRef *f) VS_NOEXCEPT;
VSMap *(VS_CC *getFramePropsRW)(VSFrameRef *f) VS_NOEXCEPT;
int (VS_CC *propNumKeys)(const VSMap *map) VS_NOEXCEPT;
const char *(VS_CC *propGetKey)(const VSMap *map, int index) VS_NOEXCEPT;
int (VS_CC *propNumElements)(const VSMap *map, const char *key) VS_NOEXCEPT;
char (VS_CC *propGetType)(const VSMap *map, const char *key) VS_NOEXCEPT;
int64_t(VS_CC *propGetInt)(const VSMap *map, const char *key, int index, int *error) VS_NOEXCEPT;
double(VS_CC *propGetFloat)(const VSMap *map, const char *key, int index, int *error) VS_NOEXCEPT;
const char *(VS_CC *propGetData)(const VSMap *map, const char *key, int index, int *error) VS_NOEXCEPT;
int (VS_CC *propGetDataSize)(const VSMap *map, const char *key, int index, int *error) VS_NOEXCEPT;
VSNodeRef *(VS_CC *propGetNode)(const VSMap *map, const char *key, int index, int *error) VS_NOEXCEPT;
const VSFrameRef *(VS_CC *propGetFrame)(const VSMap *map, const char *key, int index, int *error) VS_NOEXCEPT;
VSFuncRef *(VS_CC *propGetFunc)(const VSMap *map, const char *key, int index, int *error) VS_NOEXCEPT;
int (VS_CC *propDeleteKey)(VSMap *map, const char *key) VS_NOEXCEPT;
int (VS_CC *propSetInt)(VSMap *map, const char *key, int64_t i, int append) VS_NOEXCEPT;
int (VS_CC *propSetFloat)(VSMap *map, const char *key, double d, int append) VS_NOEXCEPT;
int (VS_CC *propSetData)(VSMap *map, const char *key, const char *data, int size, int append) VS_NOEXCEPT;
int (VS_CC *propSetNode)(VSMap *map, const char *key, VSNodeRef *node, int append) VS_NOEXCEPT;
int (VS_CC *propSetFrame)(VSMap *map, const char *key, const VSFrameRef *f, int append) VS_NOEXCEPT;
int (VS_CC *propSetFunc)(VSMap *map, const char *key, VSFuncRef *func, int append) VS_NOEXCEPT;
int64_t (VS_CC *setMaxCacheSize)(int64_t bytes, VSCore *core) VS_NOEXCEPT;
int (VS_CC *getOutputIndex)(VSFrameContext *frameCtx) VS_NOEXCEPT;
VSFrameRef *(VS_CC *newVideoFrame2)(const VSFormat *format, int width, int height, const VSFrameRef **planeSrc, const int *planes, const VSFrameRef *propSrc, VSCore *core) VS_NOEXCEPT;
void (VS_CC *setMessageHandler)(VSMessageHandler handler, void *userData) VS_NOEXCEPT;
int (VS_CC *setThreadCount)(int threads, VSCore *core) VS_NOEXCEPT;
const char *(VS_CC *getPluginPath)(const VSPlugin *plugin) VS_NOEXCEPT;
/* api 3.1 */
const int64_t *(VS_CC *propGetIntArray)(const VSMap *map, const char *key, int *error) VS_NOEXCEPT;
const double *(VS_CC *propGetFloatArray)(const VSMap *map, const char *key, int *error) VS_NOEXCEPT;
int (VS_CC *propSetIntArray)(VSMap *map, const char *key, const int64_t *i, int size) VS_NOEXCEPT;
int (VS_CC *propSetFloatArray)(VSMap *map, const char *key, const double *d, int size) VS_NOEXCEPT;
/* api 3.4 */
void (VS_CC *logMessage)(int msgType, const char *msg) VS_NOEXCEPT;
};
VS_API(const VSAPI *) getVapourSynthAPI(int version) VS_NOEXCEPT;
#endif /* VAPOURSYNTH_H */

View file

@ -1,373 +0,0 @@
// Copyright (c) 2012-2018 Fredrik Mellbin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#include "vapoursource.h"
#include "../core/utils.h"
#include "VSHelper.h"
#include <algorithm>
#include <cmath>
#include <stdexcept>
#include <string>
#include <utility>
#include <vector>
static int GetNumPixFmts() {
int n = 0;
while (av_get_pix_fmt_name((AVPixelFormat)n))
n++;
return n;
}
static bool IsRealNativeEndianPlanar(const AVPixFmtDescriptor &desc) {
// reject all special flags
if (desc.flags & (AV_PIX_FMT_FLAG_PAL | AV_PIX_FMT_FLAG_BAYER | AV_PIX_FMT_FLAG_HWACCEL | AV_PIX_FMT_FLAG_BITSTREAM))
return false;
int used_planes = 0;
for (int i = 0; i < desc.nb_components; i++)
used_planes = std::max(used_planes, (int)desc.comp[i].plane + 1);
bool temp = (used_planes == desc.nb_components) && (desc.comp[0].depth >= 8);
if (!temp)
return false;
else if (desc.comp[0].depth == 8)
return temp;
else
return (AV_PIX_FMT_YUV420P10 == AV_PIX_FMT_YUV420P10BE ? !!(desc.flags & AV_PIX_FMT_FLAG_BE) : !(desc.flags & AV_PIX_FMT_FLAG_BE));
}
static int GetSampleType(const AVPixFmtDescriptor &desc) {
return (desc.flags & AV_PIX_FMT_FLAG_FLOAT) ? stFloat : stInteger;
}
static bool HasAlpha(const AVPixFmtDescriptor &desc) {
return !!(desc.flags & AV_PIX_FMT_FLAG_ALPHA);
}
static int GetColorFamily(const AVPixFmtDescriptor &desc) {
if (desc.nb_components <= 2)
return cmGray;
else if (desc.flags & AV_PIX_FMT_FLAG_RGB)
return cmRGB;
else
return cmYUV;
}
static int FormatConversionToPixelFormat(int id, bool alpha, VSCore *core, const VSAPI *vsapi) {
const VSFormat *f = vsapi->getFormatPreset(id, core);
int npixfmt = GetNumPixFmts();
// Look for a suitable format without alpha first to not waste memory
if (!alpha) {
for (int i = 0; i < npixfmt; i++) {
const AVPixFmtDescriptor &desc = *av_pix_fmt_desc_get((AVPixelFormat)i);
if (IsRealNativeEndianPlanar(desc) && !HasAlpha(desc)
&& GetColorFamily(desc) == f->colorFamily
&& desc.comp[0].depth == f->bitsPerSample
&& desc.log2_chroma_w == f->subSamplingW
&& desc.log2_chroma_h == f->subSamplingH
&& GetSampleType(desc) == f->sampleType)
return i;
}
}
// Try all remaining formats
for (int i = 0; i < npixfmt; i++) {
const AVPixFmtDescriptor &desc = *av_pix_fmt_desc_get((AVPixelFormat)i);
if (IsRealNativeEndianPlanar(desc) && HasAlpha(desc)
&& GetColorFamily(desc) == f->colorFamily
&& desc.comp[0].depth == f->bitsPerSample
&& desc.log2_chroma_w == f->subSamplingW
&& desc.log2_chroma_h == f->subSamplingH
&& GetSampleType(desc) == f->sampleType)
return i;
}
return AV_PIX_FMT_NONE;
}
static const VSFormat *FormatConversionToVS(int id, VSCore *core, const VSAPI *vsapi) {
const AVPixFmtDescriptor &desc = *av_pix_fmt_desc_get((AVPixelFormat)id);
return vsapi->registerFormat(
GetColorFamily(desc),
GetSampleType(desc),
desc.comp[0].depth,
desc.log2_chroma_w,
desc.log2_chroma_h, core);
}
void VS_CC VSVideoSource::Init(VSMap *, VSMap *, void **instanceData, VSNode *node, VSCore *, const VSAPI *vsapi) {
VSVideoSource *Source = static_cast<VSVideoSource *>(*instanceData);
vsapi->setVideoInfo(Source->VI, Source->OutputAlpha ? 2 : 1, node);
}
const VSFrameRef *VS_CC VSVideoSource::GetFrame(int n, int activationReason, void **instanceData, void **, VSFrameContext *frameCtx, VSCore *core, const VSAPI *vsapi) {
VSVideoSource *vs = static_cast<VSVideoSource *>(*instanceData);
if (activationReason == arInitial) {
char ErrorMsg[1024];
FFMS_ErrorInfo E;
E.Buffer = ErrorMsg;
E.BufferSize = sizeof(ErrorMsg);
std::string buf = "Source: ";
int OutputIndex = vs->OutputAlpha ? vsapi->getOutputIndex(frameCtx) : 0;
VSFrameRef *Dst = vsapi->newVideoFrame(vs->VI[OutputIndex].format, vs->VI[OutputIndex].width, vs->VI[OutputIndex].height, nullptr, core);
VSMap *Props = vsapi->getFramePropsRW(Dst);
const FFMS_Frame *Frame = nullptr;
if (vs->FPSNum > 0 && vs->FPSDen > 0) {
double currentTime = FFMS_GetVideoProperties(vs->V)->FirstTime +
(double)(n * (int64_t)vs->FPSDen) / vs->FPSNum;
Frame = FFMS_GetFrameByTime(vs->V, currentTime, &E);
vsapi->propSetInt(Props, "_DurationNum", vs->FPSDen, paReplace);
vsapi->propSetInt(Props, "_DurationDen", vs->FPSNum, paReplace);
vsapi->propSetFloat(Props, "_AbsoluteTime", currentTime, paReplace);
} else {
Frame = FFMS_GetFrame(vs->V, n, &E);
FFMS_Track *T = FFMS_GetTrackFromVideo(vs->V);
const FFMS_TrackTimeBase *TB = FFMS_GetTimeBase(T);
int64_t num;
if (n + 1 < vs->VI[0].numFrames)
num = FFMS_GetFrameInfo(T, n + 1)->PTS - FFMS_GetFrameInfo(T, n)->PTS;
else if (n > 0) // simply use the second to last frame's duration for the last one, should be good enough
num = FFMS_GetFrameInfo(T, n)->PTS - FFMS_GetFrameInfo(T, n - 1)->PTS;
else // just make it one timebase if it's a single frame clip
num = 1;
int64_t DurNum = TB->Num * num;
int64_t DurDen = TB->Den * 1000;
muldivRational(&DurNum, &DurDen, 1, 1);
vsapi->propSetInt(Props, "_DurationNum", DurNum, paReplace);
vsapi->propSetInt(Props, "_DurationDen", DurDen, paReplace);
vsapi->propSetFloat(Props, "_AbsoluteTime", ((static_cast<double>(TB->Num) / 1000) * FFMS_GetFrameInfo(T, n)->PTS) / TB->Den, paReplace);
}
if (Frame == nullptr) {
buf += E.Buffer;
vsapi->setFilterError(buf.c_str(), frameCtx);
return nullptr;
}
// Set AR variables
if (vs->SARNum > 0 && vs->SARDen > 0) {
vsapi->propSetInt(Props, "_SARNum", vs->SARNum, paReplace);
vsapi->propSetInt(Props, "_SARDen", vs->SARDen, paReplace);
}
vsapi->propSetInt(Props, "_Matrix", Frame->ColorSpace, paReplace);
vsapi->propSetInt(Props, "_Primaries", Frame->ColorPrimaries, paReplace);
vsapi->propSetInt(Props, "_Transfer", Frame->TransferCharateristics, paReplace);
if (Frame->ChromaLocation > 0)
vsapi->propSetInt(Props, "_ChromaLocation", Frame->ChromaLocation - 1, paReplace);
if (Frame->ColorRange == FFMS_CR_MPEG)
vsapi->propSetInt(Props, "_ColorRange", 1, paReplace);
else if (Frame->ColorRange == FFMS_CR_JPEG)
vsapi->propSetInt(Props, "_ColorRange", 0, paReplace);
vsapi->propSetData(Props, "_PictType", &Frame->PictType, 1, paReplace);
// Set field information
int FieldBased = 0;
if (Frame->InterlacedFrame)
FieldBased = (Frame->TopFieldFirst ? 2 : 1);
vsapi->propSetInt(Props, "_FieldBased", FieldBased, paReplace);
if (Frame->HasMasteringDisplayPrimaries) {
vsapi->propSetFloatArray(Props, "MasteringDisplayPrimariesX", Frame->MasteringDisplayPrimariesX, 3);
vsapi->propSetFloatArray(Props, "MasteringDisplayPrimariesY", Frame->MasteringDisplayPrimariesY, 3);
vsapi->propSetFloat(Props, "MasteringDisplayWhitePointX", Frame->MasteringDisplayWhitePointX, paReplace);
vsapi->propSetFloat(Props, "MasteringDisplayWhitePointY", Frame->MasteringDisplayWhitePointY, paReplace);
}
if (Frame->HasMasteringDisplayLuminance) {
vsapi->propSetFloat(Props, "MasteringDisplayMinLuminance", Frame->MasteringDisplayMinLuminance, paReplace);
vsapi->propSetFloat(Props, "MasteringDisplayMaxLuminance", Frame->MasteringDisplayMaxLuminance, paReplace);
}
if (Frame->HasContentLightLevel) {
vsapi->propSetFloat(Props, "ContentLightLevelMax", Frame->ContentLightLevelMax, paReplace);
vsapi->propSetFloat(Props, "ContentLightLevelAverage", Frame->ContentLightLevelAverage, paReplace);
}
if (OutputIndex == 0)
OutputFrame(Frame, Dst, vsapi);
else
OutputAlphaFrame(Frame, vs->VI[0].format->numPlanes, Dst, vsapi);
return Dst;
}
return nullptr;
}
void VS_CC VSVideoSource::Free(void *instanceData, VSCore *, const VSAPI *) {
FFMS_Deinit();
delete static_cast<VSVideoSource *>(instanceData);
}
VSVideoSource::VSVideoSource(const char *SourceFile, int Track, FFMS_Index *Index,
int AFPSNum, int AFPSDen, int Threads, int SeekMode, int /*RFFMode*/,
int ResizeToWidth, int ResizeToHeight, const char *ResizerName,
int Format, bool OutputAlpha, const VSAPI *vsapi, VSCore *core)
: FPSNum(AFPSNum), FPSDen(AFPSDen), OutputAlpha(OutputAlpha) {
VI[0] = {};
VI[1] = {};
char ErrorMsg[1024];
FFMS_ErrorInfo E;
E.Buffer = ErrorMsg;
E.BufferSize = sizeof(ErrorMsg);
V = FFMS_CreateVideoSource(SourceFile, Track, Index, Threads, SeekMode, &E);
if (!V) {
throw std::runtime_error(std::string("Source: ") + E.Buffer);
}
try {
InitOutputFormat(ResizeToWidth, ResizeToHeight, ResizerName, Format, vsapi, core);
} catch (std::exception &) {
FFMS_DestroyVideoSource(V);
throw;
}
const FFMS_VideoProperties *VP = FFMS_GetVideoProperties(V);
if (FPSNum > 0 && FPSDen > 0) {
muldivRational(&FPSNum, &FPSDen, 1, 1);
VI[0].fpsDen = FPSDen;
VI[0].fpsNum = FPSNum;
if (VP->NumFrames > 1) {
VI[0].numFrames = static_cast<int>((VP->LastTime - VP->FirstTime) * (1 + 1. / (VP->NumFrames - 1)) * FPSNum / FPSDen + 0.5);
if (VI[0].numFrames < 1)
VI[0].numFrames = 1;
} else {
VI[0].numFrames = 1;
}
} else {
VI[0].fpsDen = VP->FPSDenominator;
VI[0].fpsNum = VP->FPSNumerator;
VI[0].numFrames = VP->NumFrames;
muldivRational(&VI[0].fpsNum, &VI[0].fpsDen, 1, 1);
}
if (OutputAlpha) {
VI[1] = VI[0];
VI[1].format = vsapi->registerFormat(cmGray, VI[0].format->sampleType, VI[0].format->bitsPerSample, VI[0].format->subSamplingW, VI[0].format->subSamplingH, core);
}
SARNum = VP->SARNum;
SARDen = VP->SARDen;
}
VSVideoSource::~VSVideoSource() {
FFMS_DestroyVideoSource(V);
}
void VSVideoSource::InitOutputFormat(int ResizeToWidth, int ResizeToHeight,
const char *ResizerName, int ConvertToFormat, const VSAPI *vsapi, VSCore *core) {
char ErrorMsg[1024];
FFMS_ErrorInfo E;
E.Buffer = ErrorMsg;
E.BufferSize = sizeof(ErrorMsg);
const FFMS_Frame *F = FFMS_GetFrame(V, 0, &E);
if (!F) {
std::string buf = "Source: ";
buf += E.Buffer;
throw std::runtime_error(buf);
}
std::vector<int> TargetFormats;
int npixfmt = GetNumPixFmts();
for (int i = 0; i < npixfmt; i++)
if (IsRealNativeEndianPlanar(*av_pix_fmt_desc_get((AVPixelFormat)i)))
TargetFormats.push_back(i);
TargetFormats.push_back(AV_PIX_FMT_NONE);
int TargetPixelFormat = AV_PIX_FMT_NONE;
if (ConvertToFormat != pfNone) {
TargetPixelFormat = FormatConversionToPixelFormat(ConvertToFormat, OutputAlpha, core, vsapi);
if (TargetPixelFormat == AV_PIX_FMT_NONE)
throw std::runtime_error(std::string("Source: Invalid output colorspace specified"));
TargetFormats.clear();
TargetFormats.push_back(TargetPixelFormat);
TargetFormats.push_back(-1);
}
if (ResizeToWidth <= 0)
ResizeToWidth = F->EncodedWidth;
if (ResizeToHeight <= 0)
ResizeToHeight = F->EncodedHeight;
int Resizer = ResizerNameToSWSResizer(ResizerName);
if (Resizer == 0)
throw std::runtime_error(std::string("Source: Invalid resizer name specified"));
if (FFMS_SetOutputFormatV2(V, &TargetFormats[0],
ResizeToWidth, ResizeToHeight, Resizer, &E))
throw std::runtime_error(std::string("Source: No suitable output format found"));
F = FFMS_GetFrame(V, 0, &E);
TargetFormats.clear();
TargetFormats.push_back(F->ConvertedPixelFormat);
TargetFormats.push_back(-1);
// This trick is required to first get the "best" default format and then set only that format as the output
if (FFMS_SetOutputFormatV2(V, TargetFormats.data(), ResizeToWidth, ResizeToHeight, Resizer, &E))
throw std::runtime_error(std::string("Source: No suitable output format found"));
F = FFMS_GetFrame(V, 0, &E);
// Don't output alpha if the clip doesn't have it
if (!HasAlpha(*av_pix_fmt_desc_get((AVPixelFormat)F->ConvertedPixelFormat)))
OutputAlpha = false;
VI[0].format = FormatConversionToVS(F->ConvertedPixelFormat, core, vsapi);
if (!VI[0].format)
throw std::runtime_error(std::string("Source: No suitable output format found"));
VI[0].width = F->ScaledWidth;
VI[0].height = F->ScaledHeight;
// Crop to obey subsampling width/height requirements
VI[0].width -= VI[0].width % (1 << VI[0].format->subSamplingW);
VI[0].height -= VI[0].height % (1 << VI[0].format->subSamplingH);
}
void VSVideoSource::OutputFrame(const FFMS_Frame *Frame, VSFrameRef *Dst, const VSAPI *vsapi) {
const int RGBPlaneOrder[3] = { 2, 0, 1 };
const VSFormat *fi = vsapi->getFrameFormat(Dst);
if (fi->colorFamily == cmRGB) {
for (int i = 0; i < fi->numPlanes; i++)
vs_bitblt(vsapi->getWritePtr(Dst, i), vsapi->getStride(Dst, i), Frame->Data[RGBPlaneOrder[i]], Frame->Linesize[RGBPlaneOrder[i]],
vsapi->getFrameWidth(Dst, i) * fi->bytesPerSample, vsapi->getFrameHeight(Dst, i));
} else {
for (int i = 0; i < fi->numPlanes; i++)
vs_bitblt(vsapi->getWritePtr(Dst, i), vsapi->getStride(Dst, i), Frame->Data[i], Frame->Linesize[i],
vsapi->getFrameWidth(Dst, i) * fi->bytesPerSample, vsapi->getFrameHeight(Dst, i));
}
}
void VSVideoSource::OutputAlphaFrame(const FFMS_Frame *Frame, int Plane, VSFrameRef *Dst, const VSAPI *vsapi) {
const VSFormat *fi = vsapi->getFrameFormat(Dst);
vs_bitblt(vsapi->getWritePtr(Dst, 0), vsapi->getStride(Dst, 0), Frame->Data[Plane], Frame->Linesize[Plane],
vsapi->getFrameWidth(Dst, 0) * fi->bytesPerSample, vsapi->getFrameHeight(Dst, 0));
}

View file

@ -1,63 +0,0 @@
// Copyright (c) 2012-2017 Fredrik Mellbin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#ifndef FFVAPOURSOURCES_H
#define FFVAPOURSOURCES_H
extern "C" {
#include <libavutil/avutil.h>
#include <libavutil/common.h>
#include <libavutil/pixdesc.h>
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
}
#include "VapourSynth.h"
#include "ffms.h"
#include "ffmscompat.h"
struct VSVideoSource {
private:
VSVideoInfo VI[2];
FFMS_VideoSource *V;
int64_t FPSNum;
int64_t FPSDen;
int SARNum;
int SARDen;
bool OutputAlpha;
void InitOutputFormat(int ResizeToWidth, int ResizeToHeight,
const char *ResizerName, int ConvertToFormat, const VSAPI *vsapi, VSCore *core);
static void OutputFrame(const FFMS_Frame *Frame, VSFrameRef *Dst, const VSAPI *vsapi);
static void OutputAlphaFrame(const FFMS_Frame *Frame, int Plane, VSFrameRef *Dst, const VSAPI *vsapi);
public:
VSVideoSource(const char *SourceFile, int Track, FFMS_Index *Index,
int AFPSNum, int AFPSDen, int Threads, int SeekMode, int RFFMode,
int ResizeToWidth, int ResizeToHeight, const char *ResizerName,
int Format, bool OutputAlpha, const VSAPI *vsapi, VSCore *core);
~VSVideoSource();
static void VS_CC Init(VSMap *in, VSMap *out, void **instanceData, VSNode *node, VSCore *core, const VSAPI *vsapi);
static const VSFrameRef *VS_CC GetFrame(int n, int activationReason, void **instanceData, void **frameData, VSFrameContext *frameCtx, VSCore *core, const VSAPI *vsapi);
static void VS_CC Free(void *instanceData, VSCore *core, const VSAPI *vsapi);
};
#endif

View file

@ -1,239 +0,0 @@
// Copyright (c) 2012-2017 Fredrik Mellbin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#include "ffms.h"
#include "vapoursource.h"
#include "VSHelper.h"
#include "../core/utils.h"
#include <cstdio>
#include <cstring>
#include <string>
#include <set>
static void VS_CC CreateIndex(const VSMap *in, VSMap *out, void *, VSCore *, const VSAPI *vsapi) {
FFMS_Init(0, 0);
char ErrorMsg[1024];
FFMS_ErrorInfo E;
E.Buffer = ErrorMsg;
E.BufferSize = sizeof(ErrorMsg);
int err;
std::set<int> IndexTracks;
const char *Source = vsapi->propGetData(in, "source", 0, nullptr);
const char *CacheFile = vsapi->propGetData(in, "cachefile", 0, &err);
int NumIndexTracks = vsapi->propNumElements(in, "indextracks");
bool IndexAllTracks = (NumIndexTracks == 1) && (int64ToIntS(vsapi->propGetInt(in, "indextracks", 0, nullptr)) == -1);
if (!IndexAllTracks) {
for (int i = 0; i < NumIndexTracks; i++) {
int Track = int64ToIntS(vsapi->propGetInt(in, "indextracks", i, nullptr));
IndexTracks.insert(Track);
}
}
int ErrorHandling = int64ToIntS(vsapi->propGetInt(in, "errorhandling", 0, &err));
if (err)
ErrorHandling = FFMS_IEH_IGNORE;
bool OverWrite = !!vsapi->propGetInt(in, "overwrite", 0, &err);
std::string DefaultCache(Source);
if (!CacheFile || !strcmp(CacheFile, "")) {
DefaultCache.append(".ffindex");
CacheFile = DefaultCache.c_str();
}
FFMS_Index *Index = FFMS_ReadIndex(CacheFile, &E);
if (OverWrite || !Index || (Index && FFMS_IndexBelongsToFile(Index, Source, nullptr) != FFMS_ERROR_SUCCESS)) {
FFMS_Indexer *Indexer = FFMS_CreateIndexer(Source, &E);
if (!Indexer) {
FFMS_DestroyIndex(Index);
return vsapi->setError(out, (std::string("Index: ") + E.Buffer).c_str());
}
if (IndexAllTracks) {
FFMS_TrackTypeIndexSettings(Indexer, FFMS_TYPE_AUDIO, 1, 0);
} else {
for (int i : IndexTracks)
FFMS_TrackIndexSettings(Indexer, i, 1, 0);
}
Index = FFMS_DoIndexing2(Indexer, ErrorHandling, &E);
if (!Index)
return vsapi->setError(out, (std::string("Index: ") + E.Buffer).c_str());
if (FFMS_WriteIndex(CacheFile, Index, &E)) {
FFMS_DestroyIndex(Index);
return vsapi->setError(out, (std::string("Index: ") + E.Buffer).c_str());
}
FFMS_DestroyIndex(Index);
if (!OverWrite)
vsapi->propSetData(out, "result", "Index generated", -1, paReplace);
else
vsapi->propSetData(out, "result", "Index generated (forced overwrite)", -1, paReplace);
} else {
FFMS_DestroyIndex(Index);
vsapi->propSetData(out, "result", "Valid index already exists", -1, paReplace);
}
FFMS_Deinit();
}
static void VS_CC CreateSource(const VSMap *in, VSMap *out, void *, VSCore *core, const VSAPI *vsapi) {
FFMS_Init(0, 0);
char ErrorMsg[1024];
FFMS_ErrorInfo E;
E.Buffer = ErrorMsg;
E.BufferSize = sizeof(ErrorMsg);
int err;
const char *Source = vsapi->propGetData(in, "source", 0, nullptr);
int Track = int64ToIntS(vsapi->propGetInt(in, "track", 0, &err));
if (err)
Track = -1;
bool Cache = !!vsapi->propGetInt(in, "cache", 0, &err);
if (err)
Cache = true;
const char *CacheFile = vsapi->propGetData(in, "cachefile", 0, &err);
int FPSNum = int64ToIntS(vsapi->propGetInt(in, "fpsnum", 0, &err));
if (err)
FPSNum = -1;
int FPSDen = int64ToIntS(vsapi->propGetInt(in, "fpsden", 0, &err));
if (err)
FPSDen = 1;
int Threads = int64ToIntS(vsapi->propGetInt(in, "threads", 0, &err));
const char *Timecodes = vsapi->propGetData(in, "timecodes", 0, &err);
int SeekMode = int64ToIntS(vsapi->propGetInt(in, "seekmode", 0, &err));
if (err)
SeekMode = FFMS_SEEK_NORMAL;
int RFFMode = int64ToIntS(vsapi->propGetInt(in, "rffmode", 0, &err));
int Width = int64ToIntS(vsapi->propGetInt(in, "width", 0, &err));
int Height = int64ToIntS(vsapi->propGetInt(in, "height", 0, &err));
const char *Resizer = vsapi->propGetData(in, "resizer", 0, &err);
if (err)
Resizer = "BICUBIC";
int Format = int64ToIntS(vsapi->propGetInt(in, "format", 0, &err));
bool OutputAlpha = !!vsapi->propGetInt(in, "alpha", 0, &err);
if (err)
OutputAlpha = false;
if (FPSDen < 1)
return vsapi->setError(out, "Source: FPS denominator needs to be 1 or higher");
if (Track <= -2)
return vsapi->setError(out, "Source: No video track selected");
if (SeekMode < -1 || SeekMode > 3)
return vsapi->setError(out, "Source: Invalid seekmode selected");
if (RFFMode < 0 || RFFMode > 2)
return vsapi->setError(out, "Source: Invalid RFF mode selected");
if (RFFMode > 0 && FPSNum > 0)
return vsapi->setError(out, "Source: RFF modes may not be combined with CFR conversion");
if (Timecodes && IsSamePath(Source, Timecodes))
return vsapi->setError(out, "Source: Timecodes will overwrite the source");
FFMS_Index *Index = nullptr;
std::string DefaultCache;
if (Cache) {
if (CacheFile && *CacheFile) {
if (IsSamePath(Source, CacheFile))
return vsapi->setError(out, "Source: Cache will overwrite the source");
Index = FFMS_ReadIndex(CacheFile, &E);
} else {
DefaultCache = Source;
DefaultCache += ".ffindex";
CacheFile = DefaultCache.c_str();
Index = FFMS_ReadIndex(CacheFile, &E);
// Reindex if the index doesn't match the file and its name wasn't
// explicitly given
if (Index && FFMS_IndexBelongsToFile(Index, Source, nullptr) != FFMS_ERROR_SUCCESS) {
FFMS_DestroyIndex(Index);
Index = nullptr;
}
}
}
if (!Index) {
FFMS_Indexer *Indexer = FFMS_CreateIndexer(Source, &E);
if (!Indexer)
return vsapi->setError(out, (std::string("Index: ") + E.Buffer).c_str());
Index = FFMS_DoIndexing2(Indexer, FFMS_IEH_CLEAR_TRACK, &E);
if (!Index)
return vsapi->setError(out, (std::string("Index: ") + E.Buffer).c_str());
if (Cache)
if (FFMS_WriteIndex(CacheFile, Index, &E)) {
FFMS_DestroyIndex(Index);
return vsapi->setError(out, (std::string("Index: ") + E.Buffer).c_str());
}
}
if (Track == -1)
Track = FFMS_GetFirstIndexedTrackOfType(Index, FFMS_TYPE_VIDEO, &E);
if (Track < 0) {
FFMS_DestroyIndex(Index);
return vsapi->setError(out, "Source: No video track found");
}
if (Timecodes && strcmp(Timecodes, "")) {
if (FFMS_WriteTimecodes(FFMS_GetTrackFromIndex(Index, Track), Timecodes, &E)) {
FFMS_DestroyIndex(Index);
return vsapi->setError(out, (std::string("Index: ") + E.Buffer).c_str());
}
}
VSVideoSource *vs;
try {
vs = new VSVideoSource(Source, Track, Index, FPSNum, FPSDen, Threads, SeekMode, RFFMode, Width, Height, Resizer, Format, OutputAlpha, vsapi, core);
} catch (std::exception const& e) {
FFMS_DestroyIndex(Index);
return vsapi->setError(out, e.what());
}
vsapi->createFilter(in, out, "Source", VSVideoSource::Init, VSVideoSource::GetFrame, VSVideoSource::Free, fmUnordered, nfMakeLinear, vs, core);
FFMS_DestroyIndex(Index);
}
static void VS_CC GetLogLevel(const VSMap *, VSMap *out, void *, VSCore *, const VSAPI *vsapi) {
vsapi->propSetInt(out, "level", FFMS_GetLogLevel(), paReplace);
}
static void VS_CC SetLogLevel(const VSMap *in, VSMap *out, void *, VSCore *, const VSAPI *vsapi) {
FFMS_SetLogLevel((int)vsapi->propGetInt(in, "level", 0, nullptr));
vsapi->propSetInt(out, "level", FFMS_GetLogLevel(), paReplace);
}
static void VS_CC GetVersion(const VSMap *, VSMap *out, void *, VSCore *, const VSAPI *vsapi) {
int Version = FFMS_GetVersion();
char buf[100];
sprintf(buf, "%d.%d.%d.%d", Version >> 24, (Version & 0xFF0000) >> 16, (Version & 0xFF00) >> 8, Version & 0xFF);
vsapi->propSetData(out, "version", buf, -1, paReplace);
}
VS_EXTERNAL_API(void) VapourSynthPluginInit(VSConfigPlugin configFunc, VSRegisterFunction registerFunc, VSPlugin *plugin) {
configFunc("com.vapoursynth.ffms2", "ffms2", "FFmpegSource 2 for VapourSynth", VAPOURSYNTH_API_VERSION, 1, plugin);
registerFunc("Index", "source:data;cachefile:data:opt;indextracks:int[]:opt;errorhandling:int:opt;overwrite:int:opt;", CreateIndex, nullptr, plugin);
registerFunc("Source", "source:data;track:int:opt;cache:int:opt;cachefile:data:opt;fpsnum:int:opt;fpsden:int:opt;threads:int:opt;timecodes:data:opt;seekmode:int:opt;width:int:opt;height:int:opt;resizer:data:opt;format:int:opt;alpha:int:opt;", CreateSource, nullptr, plugin);
registerFunc("GetLogLevel", "", GetLogLevel, nullptr, plugin);
registerFunc("SetLogLevel", "level:int;", SetLogLevel, nullptr, plugin);
registerFunc("Version", "", GetVersion, nullptr, plugin);
}

View file

@ -1,115 +0,0 @@
# Where to find user code.
USER_DIR = ..
# Points to the root of Google Test, relative to where this file is.
# Remember to tweak this if you move this file.
GTEST_DIR = $(USER_DIR)/test/googletest/googletest
# Where to find sample files
SAMPLES_DIR =
# URL to sync samples from
SAMPLES_URL =
# Flags passed to the preprocessor.
# Set Google Test's header directory as a system directory, such that
# the compiler doesn't generate warnings in Google Test headers.
CPPFLAGS += -isystem $(GTEST_DIR)/include \
-I$(USER_DIR)/include \
-D_FILE_OFFSET_BITS=64 \
-DFFMS_EXPORTS \
-D__STDC_CONSTANT_MACROS \
-DSAMPLES_DIR=$(SAMPLES_DIR)
# Flags passed to the C++ compiler.
CXXFLAGS += -g -Wall -Wextra -pthread -std=c++11 -fvisibility=hidden
# All tests produced by this Makefile. Remember to add new tests you
# created to the list.
TESTS = indexer \
hdr \
display_matrix
RUNTESTS = $(subst $() $(),-run$() $(),$(TESTS))-run
# All the sample files we need to sync
SAMPLES = test.mp4 \
hdr10tags-both.mkv \
hdr10tags-container.mkv \
hdr10tags-stream.mp4 \
qrvideo_hflip_90.mov \
qrvideo_hflip_270.mov \
qrvideo_vflip.mov
# All Google Test headers. Usually you shouldn't change this
# definition.
GTEST_HEADERS = $(GTEST_DIR)/include/gtest/*.h $(GTEST_DIR)/include/gtest/internal/*.h
# House-keeping build targets.
all: $(TESTS)
run: all $(RUNTESTS)
sync:
@for i in $(SAMPLES); do \
if [ ! -f "$(SAMPLES_DIR)/$$i" ]; then \
wget -O $(SAMPLES_DIR)/$$i $(SAMPLES_URL)/$$i; \
fi \
done
clean:
rm -f $(TESTS) gtest.a gtest_main.a *.o
rm -rf .libs
# Builds gtest.a and gtest_main.a.
# Usually you shouldn't tweak such internal variables, indicated by a
# trailing _.
GTEST_SRCS_ = $(GTEST_DIR)/src/*.cc $(GTEST_DIR)/src/*.h $(GTEST_HEADERS)
# For simplicity and to avoid depending on Google Test's
# implementation details, the dependencies specified below are
# conservative and not optimized. This is fine as Google Test
# compiles fast and for ordinary users its source rarely changes.
gtest-all.o: $(GTEST_SRCS_)
$(CXX) $(CPPFLAGS) -I$(GTEST_DIR) $(CXXFLAGS) -c $(GTEST_DIR)/src/gtest-all.cc
gtest_main.o: $(GTEST_SRCS_)
$(CXX) $(CPPFLAGS) -I$(GTEST_DIR) $(CXXFLAGS) -c $(GTEST_DIR)/src/gtest_main.cc
gtest.a: gtest-all.o
$(AR) $(ARFLAGS) $@ $^
gtest_main.a: gtest-all.o gtest_main.o
$(AR) $(ARFLAGS) $@ $^
tests.o: $(USER_DIR)/test/tests.cpp $(USER_DIR)/include/ffms.h $(GTEST_HEADERS)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/test/tests.cpp
hdr.o: $(USER_DIR)/test/hdr.cpp $(USER_DIR)/include/ffms.h $(GTEST_HEADERS)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/test/hdr.cpp
display_matrix.o: $(USER_DIR)/test/display_matrix.cpp $(USER_DIR)/include/ffms.h $(GTEST_HEADERS)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/test/display_matrix.cpp
indexer.o: $(USER_DIR)/test/indexer.cpp $(USER_DIR)/include/ffms.h $(GTEST_HEADERS)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/test/indexer.cpp
indexer: indexer.o tests.o gtest_main.a ../src/core/libffms2.la
../libtool --tag=CXX --mode=link $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o indexer indexer.o tests.o gtest_main.a -lavutil ../src/core/libffms2.la
indexer-run:
@./indexer
hdr: hdr.o gtest_main.a ../src/core/libffms2.la
../libtool --tag=CXX --mode=link $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o hdr hdr.o gtest_main.a -lavutil ../src/core/libffms2.la
hdr-run:
@./hdr
display_matrix: display_matrix.o gtest_main.a ../src/core/libffms2.la
../libtool --tag=CXX --mode=link $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o display_matrix display_matrix.o gtest_main.a -lavutil ../src/core/libffms2.la
display_matrix-run:
@./display_matrix

521
patches/ActionMax/Emulator.singe Executable file
View file

@ -0,0 +1,521 @@
dofile("Singe/Framework.singe")
stateStartup = 0
stateSetup = 1
stateTitle = 2
stateMenu = 3
stateIntro = 4
statePlaying = 5
stateGameOver = 6
gameStandard = 0
gameLimited = 1
pixelLow = 0
pixelHigh = 1
pixelUnknown = 2
sprLightOn = spriteLoad("ActionMax/sprite_LightOn.png")
sprLightOff = spriteLoad("ActionMax/sprite_LightOff.png")
sprActionMax = spriteLoad("ActionMax/sprite_ActionMax.png")
sprCrosshair = spriteLoad("ActionMax/sprite_Crosshair.png")
sprBullet = spriteLoad("ActionMax/sprite_Bullet.png")
sprBoxArt = spriteLoad("ActionMax/sprite_" .. gameID .. ".png")
sndActionMax = soundLoad("ActionMax/sound_ActionMax.wav")
sndSteadyAim = soundLoad("ActionMax/sound_ASteadyAimIsCritical.wav")
sndGetReady = soundLoad("ActionMax/sound_GetReadyForAction.wav")
sndGunShot = soundLoad("ActionMax/sound_Gunshot.wav")
sndGoodHit = soundLoad("ActionMax/sound_GoodHit.wav")
sndBadHit = soundLoad("ActionMax/sound_BadHit.wav")
sndGameOver = soundLoad("ActionMax/sound_GameOver.wav")
mouseX = 0
mouseY = 0
halfWidth = 0
crosshairCenterX = spriteGetWidth(sprCrosshair) / 2
crosshairCenterY = spriteGetHeight(sprCrosshair) / 2
currentState = stateStartup
gameMode = gameStandard
shotsFired = 0 -- Total Fired
shotsGood = 0 -- Hit our target
shotsBad = 0 -- Hit our friends
scoreDisplay = 0 -- How long the score is yet to be displayed
scoreTimer = 4 -- How long to display the score + 1
lightDisplay = 0 -- How long the light is yet to be displayed
lightTimer = 2 -- How long to display the light + 1
triggerPulled = 0 -- This isn't quite a boolean. It counts down so we can get multiple pixel samples across frames.
ammoLeft = 0 -- Number of misses remaining in limited ammo mode
ammoCount = 5 -- Number of misses allowed in limited ammo mode
gunLastState = pixelUnknown
sensorLastState = pixelUnknown
thisSeconds = 0
lastSeconds = 0
heartbeat = false
fntBlueStone20 = fontLoad("ActionMax/font_BlueStone.ttf", 20)
fntChemRea16 = fontLoad("ActionMax/font_chemrea.ttf", 16)
fntChemRea32 = fontLoad("ActionMax/font_chemrea.ttf", 32)
fntChemRea48 = fontLoad("ActionMax/font_chemrea.ttf", 48)
fntLEDReal32 = fontLoad("ActionMax/font_LED_Real.ttf", 32)
colorBackground(0, 0, 0, 0)
fontQuality(FONT_QUALITY_BLENDED)
colorForeground(255, 255, 0)
fontSelect(fntBlueStone20)
sprPullToStart = fontToSprite("Pull Trigger to Start!")
sprGetReady = fontToSprite("Get Ready!")
colorForeground(255, 255, 255)
fontSelect(fntChemRea16)
sprLastGame = fontToSprite("LAST GAME SCORE")
colorForeground(255, 255, 0)
fontSelect(fntChemRea32)
sprSelectGameType = fontToSprite("Select Game Type")
sprStandard1 = fontToSprite("Standard")
sprStandard2 = fontToSprite("Game")
sprLimited1 = fontToSprite("Limited")
sprLimited2 = fontToSprite("Ammo")
colorForeground(255, 0, 0)
fontSelect(fntChemRea48)
sprGameOver = fontToSprite("GAME OVER")
discSearch(backgroundFrame)
function getPixelState(intX, intY)
r1, g1, b1 = vldpGetPixel(intX, intY)
-- Determine pixel state
if ((255 - r1 < highThreshold) and (255 - g1 < highThreshold) and (255 - b1 < highThreshold)) then
pixelState = pixelHigh
elseif ((r1 < lowThreshold) and (g1 < lowThreshold) and (b1 < lowThreshold)) then
pixelState = pixelLow
else
pixelState = pixelUnknown
end
return pixelState
end
function onInputPressed(intWhat)
--dr, dg, db = vldpGetPixel(mouseX, mouseY)
--debugPrint("Current Frame: " .. discGetFrame() .. " X: " .. mouseX .. " Y: " .. mouseY .. " R: " .. dr .. " G: " .. dg .. " B: " .. db)
-- They fired!
if (intWhat == SWITCH_BUTTON3) then
if (currentState == stateTitle) then
discSearch(lengthIntro + lengthGame + 2)
discPlay()
currentState = stateMenu
elseif (currentState == stateMenu) then
if (mouseX < halfWidth) then
gameMode = gameStandard
else
ammoLeft = ammoCount
gameMode = gameLimited
end
shotsFired = 0
shotsGood = 0
shotsBad = 0
colorForeground(255, 0, 0)
fontSelect(fntLEDReal32)
discSearch(1)
discPlay()
soundPlay(sndGetReady)
currentState = stateIntro
elseif (currentState == statePlaying) then
-- Make gunshot noise
soundPlay(sndGunShot)
-- We want to sample across two frames
triggerPulled = 2
shotsFired = shotsFired + 1
-- No matter what, we subtract ammo. On good hits, we add it back to make it look like nothing changed.
if (gameMode == gameLimited) then
ammoLeft = ammoLeft - 1
end
end
end
end
--dbgPaused = 0
--dbgSpeed = 1
function onInputReleased(intWhat)
--[[ We don't use this. All this is debug stuff.
if (intWhat == SWITCH_BUTTON1) then
if (currentState == statePlaying) then
discSearch(lengthIntro + lengthGame - 60)
discPlay()
else
if (dbgPaused == 1) then
discPlay()
dbgPaused = 0
else
discPause()
dbgPaused = 1
end
end
end
if (intWhat == SWITCH_RIGHT) then
if (dbgSpeed < 4) then
dbgSpeed = dbgSpeed + 1
end
discChangeSpeed(dbgSpeed, 1)
end
if (intWhat == SWITCH_LEFT) then
if (dbgSpeed > 1) then
dbgSpeed = dbgSpeed - 1
end
discChangeSpeed(dbgSpeed, 1)
end
if (intWhat == SWITCH_UP) then
discStepBackward()
end
if (intWhat == SWITCH_DOWN) then
discStepForward()
end
--]]
end
function onMouseMoved(intX, intY, intXrel, intYrel)
-- Remember the mouse location for use later.
mouseX = intX
mouseY = intY
end
function onOverlayUpdate()
overlayClear()
currentFrame = discGetFrame()
-- Give us a 1 second heartbeat for overlay element timing
thisSeconds = os.time(os.date('*t'))
if (thisSeconds ~= lastSeconds) then
heartbeat = not heartbeat
lastSeconds = thisSeconds
-- Tick off floating score display
if (scoreDisplay > 0) then
scoreDisplay = scoreDisplay - 1
end
-- Tick off light timer
if (lightDisplay > 0) then
lightDisplay = lightDisplay - 1
end
end
if (currentState == stateStartup) then
-- We run this state to cause the overlay to update once before we use the dimensions to build the menu
overlayClear()
currentState = stateSetup
elseif (currentState == stateSetup) then
-- We do all the math to draw the menu here, one time.
halfWidth = (overlayGetWidth() / 2)
logoTop = 5
logoLeft = halfWidth - (spriteGetWidth(sprActionMax) / 2)
logoHeight = logoTop + spriteGetHeight(sprActionMax)
pullToStartHeight = spriteGetHeight(sprPullToStart)
pullToStartTop = overlayGetHeight() - pullToStartHeight
pullToStartLeft = halfWidth - (spriteGetWidth(sprPullToStart) / 2)
getReadyHeight = spriteGetHeight(sprGetReady)
getReadyTop = overlayGetHeight() - getReadyHeight
getReadyLeft = halfWidth - (spriteGetWidth(sprGetReady) / 2)
boxLeft = (halfWidth / 2) - spriteGetWidth(sprBoxArt) / 2 + halfWidth
boxTop = (overlayGetHeight() - (logoHeight + pullToStartHeight)) / 2 - spriteGetHeight(sprBoxArt) / 2 + logoHeight
lastGameLeft = (halfWidth / 2) - spriteGetWidth(sprLastGame) / 2
lastGameTop = logoHeight + logoTop
scoreHeight = 13 -- Point size + 1 instead of spriteGetHeight(sprLastGame)
scoreTop = lastGameTop + scoreHeight + 10
scoreLeft = lastGameLeft
lightLeft = overlayGetWidth() - spriteGetWidth(sprLightOff)
lightTop = overlayGetHeight() - spriteGetHeight(sprLightOff)
bulletWidth = spriteGetWidth(sprBullet)
selectGameTypeLeft = halfWidth - spriteGetWidth(sprSelectGameType) / 2
selectGameTypeTop = 25
standard1Left = halfWidth / 2 - spriteGetWidth(sprStandard1) / 2
standard2Left = halfWidth / 2 - spriteGetWidth(sprStandard2) / 2
limited1Left = halfWidth + (halfWidth / 2) - spriteGetWidth(sprLimited1) / 2
limited2Left = halfWidth + (halfWidth / 2) - spriteGetWidth(sprLimited2) / 2
standardLimited1Top = (overlayGetHeight() / 2) - spriteGetHeight(sprStandard1) + 2
standardLimited2Top = (overlayGetHeight() / 2) + 2
gameOverLeft = halfWidth - spriteGetWidth(sprGameOver) / 2
gameOverTop = (overlayGetHeight() / 2) - spriteGetHeight(sprGameOver)
colorForeground(200, 200, 200)
fontSelect(fntChemRea16)
hndActionMaxSound = soundPlay(sndActionMax)
currentState = stateTitle
elseif (currentState == stateTitle) then
spriteDraw(logoLeft, logoTop, sprActionMax)
spriteDraw(boxLeft, boxTop, sprBoxArt)
spriteDraw(lastGameLeft, lastGameTop, sprLastGame)
y = scoreTop
fontPrint(scoreLeft, y, " Shots Fired: " .. shotsFired)
y = y + scoreHeight
fontPrint(scoreLeft, y, " Good Hits: " .. shotsGood)
y = y + scoreHeight
fontPrint(scoreLeft, y, " Bad Hits: " .. shotsBad)
y = y + scoreHeight
fontPrint(scoreLeft, y, " Shot Score: " .. shotsGood - shotsBad)
y = y + scoreHeight * 2
if (shotsFired > 0) then
scorePercent = math.floor((shotsGood - shotsBad) / shotsFired * 100)
else
scorePercent = 0
end
fontPrint(scoreLeft, y, " Game Score: " .. scorePercent .. "%")
if (heartbeat) then
spriteDraw(pullToStartLeft, pullToStartTop, sprPullToStart)
end
elseif (currentState == stateMenu) then
spriteDraw(selectGameTypeLeft, selectGameTypeTop, sprSelectGameType)
spriteDraw(standard1Left, standardLimited1Top, sprStandard1)
spriteDraw(standard2Left, standardLimited2Top, sprStandard2)
spriteDraw(limited1Left, standardLimited1Top, sprLimited1)
spriteDraw(limited2Left, standardLimited2Top, sprLimited2)
if (currentFrame >= lengthIntro + lengthGame + lengthMenu) then
discSearch(lengthIntro + lengthGame + 2)
discPlay()
end
elseif (currentState == stateIntro) then
if (heartbeat) then
spriteDraw(getReadyLeft, getReadyTop, sprGetReady)
end
-- Skip into game video when the intro is over.
if (currentFrame >= lengthIntro) then
discSearch(lengthIntro + 1)
discPlay()
currentState = statePlaying
end
elseif (currentState == statePlaying) then
-- Read Sucton Cup Sensor.
sensorLastState = sensorState
sensorState = getPixelState(sensorX, sensorY)
-- Are they firing?
if (triggerPulled > 0) then
-- New frame (according to the sensor)?
if (sensorLastState ~= sensorState) then
-- Did they aim outside the suction cup sensor area?
if ((mouseX < sensorLeft) or (mouseY < sensorTop)) then
-- Yes. Process shot.
gunState = getPixelState(mouseX, mouseY)
else
-- No. They shot the sensor area. Bad user.
gunState = pixelUnknown
end
-- Are we doing the first or second frame sample?
if (triggerPulled == 1) then
--debugPrint("S1: " .. sensorLastState .. " S2: " .. sensorState .. " G1: " .. gunLastState .. " G2: " .. gunState)
-- Decide what happened. Do we have two good samples of each sensor?
if ((gunState ~= pixelUnknown) and (sensorState ~= pixelUnknown) and (gunLastState ~= pixelUnknown) and (sensorLastState ~= pixelUnknown)) then
-- If the sensor and gun states didn't change between frames, then this makes no sense.
if (gunLastState ~= gunState) then
-- Does the gun match the sensor?
if (gunState == sensorState) then
-- Yes! Hit bad guy!
soundPlay(sndGoodHit)
shotsGood = shotsGood + 1
lightDisplay = lightTimer
-- Add it back to make it look like nothing changed.
if (gameMode == gameLimited) then
ammoLeft = ammoLeft + 1
end
else
-- No. Crap - shot a good guy!
soundPlay(sndBadHit)
shotsBad = shotsBad + 1
end
-- Float the score for a bit
scoreDisplay = scoreTimer
end
end
else
-- Remember this info for next pass
gunLastState = gunState
end
-- Get ready for next pass
triggerPulled = triggerPulled - 1
end
end
-- When the game is over, return to the menu.
if (currentFrame >= lengthIntro + lengthGame) then
discPause()
discSearch(backgroundFrame)
colorForeground(255, 255, 255)
fontSelect(fntChemRea16)
currentState = stateTitle
end
-- Do we need to show the score?
if (scoreDisplay > 0) then
fontPrint(5, 5, "SCORE: " .. (shotsGood - shotsBad))
end
-- Do we need to light the light?
if (lightDisplay > 0) then
spriteDraw(lightLeft, lightTop, sprLightOn)
else
spriteDraw(lightLeft, lightTop, sprLightOff)
end
-- Do we need to draw the ammo display?
if (gameMode == gameLimited) then
-- Are they out of ammo?
if (ammoLeft < 0) then
discSearch(lengthIntro + lengthGame + 2)
discPlay()
soundPlay(sndGameOver)
currentState = stateGameOver
end
if (ammoLeft > 0) then
bulletStart = overlayGetWidth() - bulletWidth - 5
for i=1,ammoLeft do
spriteDraw(bulletStart, 0, sprBullet)
bulletStart = bulletStart - bulletWidth
end
end
end
elseif (currentState == stateGameOver) then
spriteDraw(gameOverLeft, gameOverTop, sprGameOver)
if (currentFrame >= lengthIntro + lengthGame + lengthMenu) then
discPause()
discSearch(backgroundFrame)
colorForeground(255, 255, 255)
fontSelect(fntChemRea16)
currentState = stateTitle
end
end
-- Draw gun crosshair (This must be the last thing we draw so it's on top.)
if (singeWantsCrosshairs()) then
spriteDraw(mouseX - crosshairCenterX, mouseY - crosshairCenterY, sprCrosshair)
end
return(OVERLAY_UPDATED)
end
function onShutdown()
discStop()
-- Unload our resources.
fontUnload(fntBlueStone20)
fontUnload(fntChemRea16)
fontUnload(fntChemRea32)
fontUnload(fntChemRea48)
fontUnload(fntLEDReal32)
soundUnload(sndActionMax)
soundUnload(sndSteadyAim)
soundUnload(sndGetReady)
soundUnload(sndGunShot)
soundUnload(sndGoodHit)
soundUnload(sndBadHit)
soundUnload(sndGameOver)
spriteUnload(sprLightOn)
spriteUnload(sprLightOff)
spriteUnload(sprActionMax)
spriteUnload(sprCrosshair)
spriteUnload(sprBullet)
spriteUnload(sprBoxArt)
spriteUnload(sprPullToStart)
spriteUnload(sprGetReady)
spriteUnload(sprLastGame)
spriteUnload(sprSelectGameType)
spriteUnload(sprStandard1)
spriteUnload(sprStandard2)
spriteUnload(sprLimited1)
spriteUnload(sprLimited2)
spriteUnload(sprGameOver)
end
function onSoundCompleted(intWhich)
-- Play the "A Steady Aim is Critical" sound after "ActionMax" is finished.
if (intWhich == hndActionMaxSound) then
soundPlay(sndSteadyAim)
hndActionMaxSound = SOUND_REMOVE_HANDLE
end
end

View file

@ -0,0 +1,332 @@
--[[
PROGRAM NAME: LUA SINGE
VERSION: 1.1
AUTHOR: KARIS (2020)
This file is part of LUA SINGE.
LUA SINGE is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation.
LUA SINGE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Thanks to Scott Duensing, RDG.
]]--
iSecs = 0
iLimit = 0
lastSeconds = 0
thisSeconds = 0
sprText = nil
sprShadow = nil
sLastText = nil
iLastColor = -1
iLastShadow = -1
tSecs = 0
tLimit = 0
tlastSeconds = 0
tthisSeconds = 0
bTommy = false
bGunMute = false
iMuteFrames = 0
MUTE_DELAY = 35
heartbeat = false
blinkSecs = 0
lastBlinkSecs = 0
iRevFrames = 0
REV_DELAY = 10
bReversePointer = false
revsetx = 0; revsety = 0
iFrameStart = 0; iFrameEnd = 0
CHANNEL_LEFT = 1
CHANNEL_RIGHT = 2
ALL_CHANNELS = 3
bMuteAttract = false
RED = 0
BLUE = 1
YELLOW = 2
GREEN = 3
ORANGE = 4
WHITE = 5
GREY = 6; GRAY = 6
LIGHTBLUE = 7
BLACK = 8
function singeRandomize()
math.randomseed(os.time()) -- random initialize
math.random(); math.random(); math.random() -- warming up
end
function blinkTimer(thisMS)
-- Function blinks every second.
blinkSecs = os.clock()
if bPause then
lastBlinkSecs = blinkSecs
else
if (blinkSecs - lastBlinkSecs > thisMS) then
heartbeat = not heartbeat
lastBlinkSecs = blinkSecs
end
end
end
function goTimer(thisMS)
blinkSecs = os.clock()
if bPause then
lastBlinkSecs = blinkSecs
else
if (blinkSecs - lastBlinkSecs > thisMS) then
heartbeat = true
lastBlinkSecs = blinkSecs
end
end
end
function clockRnd()
local j = 0
local q = 0
local w = 0
local r = 0
local b1 = true
j = os.clock()
q, w = math.modf(j)
s2 = tostring(w)
r = string.find(s2,".")
if (r == nil) then
s2 = tostring(q)
s2 = string.sub(s2,string.len(s2), string.len(s2))
else
s2 = string.sub(s2, r + 1)
r = string.len(s2)
if r == 0 then
s2 = tostring(q)
s2 = string.sub(s2,string.len(s2), string.len(s2))
elseif r == 2 then
s2 = string.sub(s2, 2, 2)
elseif r >= 3 then
s2 = string.sub(s2, 3, 3)
end
end
w = tonumber(s2)
return w
end
function timerOFF()
iSecs = 0
iLimit = 0
end
function timerON(thisLong)
iSecs = 0
iLimit = thisLong
lastSeconds = os.clock()
end
function timerDue()
thisSeconds = os.clock()
if bPause then
lastSeconds = thisSeconds
else
if (thisSeconds ~= lastSeconds) then
iSecs = iSecs + thisSeconds - lastSeconds
lastSeconds = thisSeconds
end
if (iSecs >= iLimit) then
timerOFF()
return true
else
return false
end
end
end
function muteSound()
iMuteFrames = 0
bGunMute = true
end
function blinkRev()
iRevFrames = 0
bReversePointer = true
end
function setupClip(thisA, thisB)
iFrameStart = thisA
iFrameEnd = thisB
discSkipToFrame(thisA)
end
function monoAudio (thisChannel)
if thisChannel == CHANNEL_LEFT then
discAudio (2, false)
discAudio (1, true)
elseif thisChannel == CHANNEL_RIGHT then
discAudio (1, false)
discAudio (2, true)
end
end
function resetChannels()
discAudio(1, true)
discAudio(2, true)
end
function muteAudio()
discAudio(1, false)
discAudio(2, false)
end
function setFontColor(thisColor)
if thisColor == RED then
colorForeground(255, 0, 0)
elseif thisColor == BLUE then
colorForeground(0, 0, 255)
elseif thisColor == YELLOW then
colorForeground(255, 255, 0)
elseif thisColor == GREEN then
colorForeground(0, 255, 0)
elseif thisColor == ORANGE then
colorForeground(255, 150, 0)
elseif thisColor == WHITE then
colorForeground(255, 255, 255)
elseif thisColor == GREY or thisColor == GRAY then
colorForeground(128, 128, 128)
elseif thisColor == LIGHTBLUE then
colorForeground(30, 160, 250)
elseif thisColor == BLACK then
colorForeground(0,0,0)
elseif thisColor == PINK then
colorForeground(252,0,148)
end
end
function textPrint(thisMsg, thisx, thisy, thisFont, thisColor, thisShadow)
fontSelect(thisFont)
setFontColor(thisColor)
fontPrint(thisx,thisy,thisMsg)
end
function getMiddle(thisPhrase)
local x = 0
local y = 0
local sprite = fontToSprite(thisPhrase)
x = OVLW/2 - spriteGetWidth(sprite) * 0.5
y = OVLH/2 - spriteGetHeight(sprite) * 0.5
spriteUnload(sprite)
return x
end

View file

@ -1,356 +0,0 @@
#include <stdio.h>
#include <SDL2/SDL.h>
#include <ffms.h>
#include "stddclmr.h"
// /home/scott/code/singe2/videotest/Stargate.m4v
// /home/scott/code/singe2/videotest/TestClip_720x480_29.97fps_2000_frames.avi
#define byte unsigned char
#define bool unsigned char
#define true 1
#define false 0
#define AUDIO_SAMPLES 1024
void die(char *fmt, ...);
int FFMS_CC indexCallBack(int64_t Current, int64_t Total, void *ICPrivate);
void say(char *fmt, ...);
__attribute__((__format__(__printf__, 1, 0)))
void die(char *fmt, ...) {
va_list args;
va_start(args, fmt);
vfprintf(stderr, fmt, args);
va_end(args);
printf("\n");
fflush(stderr);
exit(1);
}
int FFMS_CC indexCallBack(int64_t current, int64_t total, void *ICPrivate) {
static int lastPercent = 0;
int thisPercent = 0;
(void)ICPrivate;
if ((current == 0) && (total == 0)) {
lastPercent = 0; // Reset
} else {
thisPercent = (int)((double)current / (double)total * 100.0);
if (thisPercent != lastPercent) {
lastPercent = thisPercent;
say("Indexing: %d%%", thisPercent);
}
}
return 0;
}
__attribute__((__format__(__printf__, 1, 0)))
void say(char *fmt, ...) {
va_list args;
va_start(args, fmt);
vfprintf(stdout, fmt, args);
va_end(args);
printf("\n");
fflush(stdout);
}
int main(int argc, char *argv[]) {
int err = 0;
int audioTrack = -1;
int videoTrack = -1;
int pixelFormats[2];
int frame = 0;
int audioSampleSize = 0;
bool running = true;
bool playing = true;
bool resetTime = false;
int64_t frameDeltaTime = 0;
int64_t lastFrameTime = 0;
int64_t timestamp = 0;
int64_t audioPosition = 0;
int64_t audioCount = 0;
Uint32 lastTickTime = 0;
char *filename = argv[1];
char errMsg[1024];
char indexName[1024];
byte *audioBuffer = NULL;
byte audioSampleBytes = 0;
SDL_Window *window = NULL;
SDL_Renderer *renderer = NULL;
SDL_AudioSpec audioWant;
SDL_AudioSpec audioHave;
SDL_AudioDeviceID audioDevice = 0;
FFMS_Index *index = NULL;
FFMS_Indexer *indexer = NULL;
SDL_Texture *videoTexture = NULL;
FFMS_ErrorInfo errInfo;
FFMS_AudioSource *audioSource = NULL;
FFMS_VideoSource *videoSource = NULL;
const FFMS_AudioProperties *audioProps = NULL;
const FFMS_VideoProperties *videoProps = NULL;
const FFMS_Frame *propFrame = NULL;
const FFMS_TrackTimeBase *videoTimeBase = NULL;
const FFMS_Frame *frameData = NULL;
const FFMS_FrameInfo *frameInfo = NULL;
// Did we get a filename to open?
if (argc != 2) die("Usage: %s <filename>\n", argv[0]);
// Init SDL
err = SDL_Init(SDL_INIT_EVERYTHING);
if (err != 0) die("%s", SDL_GetError());
// Create Resizable Window
window = SDL_CreateWindow(filename, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 1280, 720, SDL_WINDOW_RESIZABLE);
if (window == NULL) die("%s", SDL_GetError());
// Create an accelerated renderer.
renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);
if (renderer == NULL) die("%s", SDL_GetError());
// Clear screen with black
SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);
SDL_RenderClear(renderer);
// Start FFMS
FFMS_Init(0, 0);
errInfo.Buffer = errMsg;
errInfo.BufferSize = sizeof(errMsg);
errInfo.ErrorType = FFMS_ERROR_SUCCESS;
errInfo.SubType = FFMS_ERROR_SUCCESS;
// Index file
snprintf(indexName, 1024, "%s.index", filename);
index = FFMS_ReadIndex(indexName, &errInfo);
if (index) {
if (FFMS_IndexBelongsToFile(index, filename, &errInfo)) {
FFMS_DestroyIndex(index);
index = NULL;
say("Cached index is invalid.");
} else {
say("Loaded cached index.");
}
}
if (!index) {
say("Creating new index.");
indexer = FFMS_CreateIndexer(filename, &errInfo);
if (indexer == NULL) die("%s", errInfo.Buffer);
FFMS_TrackTypeIndexSettings(indexer, FFMS_TYPE_AUDIO, 1, 0);
FFMS_TrackTypeIndexSettings(indexer, FFMS_TYPE_VIDEO, 1, 0);
indexCallBack(0, 0, NULL);
FFMS_SetProgressCallback(indexer, indexCallBack, NULL);
index = FFMS_DoIndexing2(indexer, FFMS_IEH_ABORT, &errInfo);
if (index == NULL) die("%s", errInfo.Buffer);
if (FFMS_WriteIndex(indexName, index, &errInfo)) die("%s", errInfo.Buffer);
}
// Find video track
videoTrack = FFMS_GetFirstTrackOfType(index, FFMS_TYPE_VIDEO, &errInfo);
if (videoTrack < 0) die("%s", errInfo.Buffer);
videoSource = FFMS_CreateVideoSource(filename, videoTrack, index, 1, FFMS_SEEK_NORMAL, &errInfo);
if (videoSource == NULL) die("%s", errInfo.Buffer);
// Get video properties
videoProps = FFMS_GetVideoProperties(videoSource);
propFrame = FFMS_GetFrame(videoSource, 0, &errInfo);
if (propFrame == NULL) die("%s", errInfo.Buffer);
videoTimeBase = FFMS_GetTimeBase(FFMS_GetTrackFromVideo(videoSource));
// Set up output format
pixelFormats[0] = FFMS_GetPixFmt("bgra");
pixelFormats[1] = -1;
if (FFMS_SetOutputFormatV2(videoSource, pixelFormats, propFrame->EncodedWidth, propFrame->EncodedHeight, FFMS_RESIZER_BICUBIC, &errInfo)) die("%s", errInfo.Buffer);
// Find audio track
audioTrack = FFMS_GetFirstTrackOfType(index, FFMS_TYPE_AUDIO, &errInfo);
if (audioTrack < 0) die("%s", errInfo.Buffer);
audioSource = FFMS_CreateAudioSource(filename, audioTrack, index, FFMS_DELAY_FIRST_VIDEO_TRACK, &errInfo);
if (audioSource == NULL) die("%s", errInfo.Buffer);
// Get audio properties
audioProps = FFMS_GetAudioProperties(audioSource);
// Index is now part of audioSource & videoSource, so release this one
FFMS_DestroyIndex(index);
// Create video texture
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear");
videoTexture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_BGRA32, SDL_TEXTUREACCESS_STATIC, propFrame->EncodedWidth, propFrame->EncodedHeight);
if (videoTexture == NULL) die("%s", SDL_GetError());
SDL_RenderSetLogicalSize(renderer, propFrame->EncodedWidth, propFrame->EncodedHeight);
// Create audio format
SDL_zero(audioWant);
SDL_zero(audioHave);
audioWant.freq = audioProps->SampleRate;
switch (audioProps->SampleFormat) {
case FFMS_FMT_U8:
audioWant.format = AUDIO_U8;
audioSampleBytes = 1;
break;
case FFMS_FMT_S16:
audioWant.format = AUDIO_S16SYS;
audioSampleBytes = 2;
break;
case FFMS_FMT_S32:
audioWant.format = AUDIO_S32SYS;
audioSampleBytes = 4;
break;
case FFMS_FMT_FLT:
audioWant.format = AUDIO_F32SYS;
audioSampleBytes = 4;
break;
default:
die("Unknown audio sample format.");
break;
}
audioWant.channels = (unsigned char)audioProps->Channels;
audioWant.silence = 0;
audioWant.samples = AUDIO_SAMPLES;
audioWant.callback = NULL;
audioWant.userdata = NULL;
audioDevice = SDL_OpenAudioDevice(NULL, 0, &audioWant, &audioHave, 0);
if (audioDevice == 0) die("%s", SDL_GetError());
SDL_PauseAudioDevice(audioDevice, 0);
audioSampleSize = audioSampleBytes * audioProps->Channels;
audioBuffer = (byte *)malloc((size_t)(audioSampleSize * AUDIO_SAMPLES) * sizeof(byte));
if (!audioBuffer) die("Unable to allocate audio buffer.");
// Play It
say("Frames: %d (%dx%d) Audio Samples: %ld (%d Hz) %d Channel%s",
videoProps->NumFrames,
propFrame->EncodedWidth,
propFrame->EncodedHeight,
audioProps->NumSamples,
audioProps->SampleRate,
audioProps->Channels,
audioProps->Channels == 1 ? "" : "s"
);
while (running) {
SDL_Event event;
while (SDL_PollEvent(&event)) {
switch (event.type) {
case SDL_KEYUP:
switch (event.key.keysym.sym) {
case SDLK_ESCAPE:
running = false;
break;
case SDLK_SPACE:
playing = !playing;
resetTime = playing;
break;
case SDLK_RIGHT:
frame++;
resetTime = true;
break;
case SDLK_LEFT:
frame--;
resetTime = true;
break;
case SDLK_UP:
frame += 100;
resetTime = true;
break;
case SDLK_DOWN:
frame -= 100;
resetTime = true;
break;
}
if (resetTime) {
if (frame >= videoProps->NumFrames) {
frame = 0;
}
if (frame < 0) {
frame = videoProps->NumFrames - 1;
}
say("Seeking to frame %d", frame);
}
break;
case SDL_QUIT:
running = 0;
break;
}
}
// Handle video frames (and time)
if ((SDL_GetTicks() - lastTickTime >= frameDeltaTime) || resetTime) {
lastTickTime = SDL_GetTicks();
if (frameData) {
SDL_UpdateTexture(videoTexture, NULL, frameData->Data[0], frameData->Linesize[0]);
SDL_RenderCopy(renderer, videoTexture, NULL, NULL);
SDL_RenderPresent(renderer);
}
frameData = FFMS_GetFrame(videoSource, frame, &errInfo);
if (frameData == NULL) die("%s", errInfo.Buffer);
frameInfo = FFMS_GetFrameInfo(FFMS_GetTrackFromVideo(videoSource), frame);
timestamp = (int64_t)((frameInfo->PTS * videoTimeBase->Num) / (double)videoTimeBase->Den); // Convert to milliseconds
frameDeltaTime = timestamp - lastFrameTime;
lastFrameTime = timestamp;
if (playing) {
if (++frame >= videoProps->NumFrames) {
frame = 0;
timestamp = 0;
resetTime = true;
}
}
if (resetTime) {
lastTickTime = 0;
frameDeltaTime = 0;
audioPosition = (int64_t)((double)(timestamp * 0.001) * (double)audioProps->SampleRate);
SDL_ClearQueuedAudio(audioDevice);
resetTime = false;
}
}
// Handle audio samples
SDL_PauseAudioDevice(audioDevice, !playing);
if ((playing) && (SDL_GetQueuedAudioSize(audioDevice) < (Uint32)(AUDIO_SAMPLES * audioSampleSize)) && (audioPosition < audioProps->NumSamples)) {
audioCount = AUDIO_SAMPLES;
if (audioPosition + audioCount >= audioProps->NumSamples) {
audioCount = audioProps->NumSamples - audioPosition - 1;
}
//say("Requesting audio samples %ld to %ld - %d bytes (Queue is %lu)", audioPosition, audioPosition + audioCount, audioCount * audioSampleSize, SDL_GetQueuedAudioSize(audioDevice));
if (FFMS_GetAudio(audioSource, audioBuffer, audioPosition, audioCount, &errInfo)) die("%s", errInfo.Buffer);
SDL_QueueAudio(audioDevice, audioBuffer, (Uint32)(audioSampleSize * audioCount));
audioPosition += audioCount;
}
}
// Shutdown
free(audioBuffer);
FFMS_DestroyAudioSource(audioSource);
FFMS_DestroyVideoSource(videoSource);
FFMS_Deinit();
SDL_CloseAudioDevice(audioDevice);
SDL_DestroyTexture(videoTexture);
SDL_DestroyRenderer(renderer);
SDL_DestroyWindow(window);
SDL_Quit();
return 0;
}

View file

@ -1,26 +0,0 @@
TEMPLATE = app
CONFIG += console
CONFIG -= \
app_bundle
qt
FFMS = $$PWD/../ffms2
INCLUDEPATH += \
$$FFMS/include
HEADERS += \
stddclmr.h
SOURCES += \
main.c
# This is for testing only
QMAKE_RPATHDIR += \
$$FFMS/src/core/.libs
LIBS += \
-lSDL2 \
-L$$FFMS/src/core/.libs \
-lffms2

38
src/common.h Normal file
View file

@ -0,0 +1,38 @@
/*
*
* Singe 2
* Copyright (C) 2006-2024 Scott Duensing <scott@kangaroopunch.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
*/
#ifndef COMMON_H
#define COMMON_H
#include <stdint.h>
#define byte unsigned char
#define bool unsigned char
#define true 1
#define false 0
#endif // COMMON_H

81
src/embedded.h Normal file
View file

@ -0,0 +1,81 @@
/*
*
* Singe 2
* Copyright (C) 2006-2024 Scott Duensing <scott@kangaroopunch.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
*/
#ifndef EMBEDDED_H
#define EMBEDDED_H
#include "generated/font.h"
#include "generated/icon.h"
#include "generated/kangarooPunchLogo.h"
#include "generated/singeLogo.h"
#include "generated/laserDisc.h"
#include "generated/magnifyingGlass.h"
#include "generated/indexing.h"
#include "generated/Framework_singe.h"
#include "generated/controls_cfg.h"
#include "generated/Menu_singe.h"
#include "generated/FreeSansBold_ttf.h"
#include "generated/menuBackground_mkv.h"
//#include "generated/Manual_pdf.h"
// LuaSocket
#include "generated/ftp_lua.h"
#include "generated/headers_lua.h"
#include "generated/http_lua.h"
#include "generated/ltn12_lua.h"
#include "generated/mbox_lua.h"
#include "generated/mime_lua.h"
#include "generated/smtp_lua.h"
#include "generated/socket_lua.h"
#include "generated/tp_lua.h"
#include "generated/url_lua.h"
// LuaSec
#include "generated/https_lua.h"
#include "generated/ssl_lua.h"
// LuaRS232
#include "generated/rs232_lua.h"
// binaryheap
#include "generated/binaryheap_lua.h"
// timerwheel
#include "generated/timerwheel_lua.h"
// json
#include "generated/json_lua.h"
// Copas
#include "generated/copas_lua.h"
#include "generated/copas_ftp_lua.h"
#include "generated/copas_http_lua.h"
#include "generated/copas_lock_lua.h"
#include "generated/copas_queue_lua.h"
#include "generated/copas_semaphore_lua.h"
#include "generated/copas_smtp_lua.h"
#include "generated/copas_timer_lua.h"
#endif // EMBEDDED_H

353
src/frameFile.c Normal file
View file

@ -0,0 +1,353 @@
/*
*
* Singe 2
* Copyright (C) 2006-2024 Scott Duensing <scott@kangaroopunch.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
*/
#include "../thirdparty/uthash/src/uthash.h"
#include "util.h"
#include "videoPlayer.h"
#include "frameFile.h"
extern bool _confShowCalculated;
typedef struct FrameLineS {
int32_t videoHandle;
int64_t lastFramePlayed;
int64_t frame;
char *filename;
} FrameLineT;
typedef struct FrameFileS {
int32_t id;
int32_t count;
char *videoPath;
FrameLineT *files;
UT_hash_handle hh;
} FrameFileT;
static FrameFileT *_frameFileHash = NULL;
static int32_t _nextId = 0;
void _transferProperties(int32_t oldHandle, int32_t newHandle);
void _transferProperties(int32_t oldHandle, int32_t newHandle) {
int32_t l = 0;
int32_t r = 0;
if ((oldHandle < 0) || (newHandle < 0)) {
// Invalid handle somewhere
return;
}
// Transfer previous video's properties to this one
videoGetVolume(oldHandle, &l, &r);
videoSetVolume(newHandle, l, r);
if (videoIsPlaying(oldHandle)) {
videoPlay(newHandle);
} else {
videoPause(newHandle);
}
videoPause(oldHandle);
}
int64_t frameFileGetFrame(int32_t frameFileHandle, int32_t videoHandle) {
int32_t i = 0;
FrameFileT *f = NULL;
// Get our framefile structure
HASH_FIND_INT(_frameFileHash, &frameFileHandle, f);
if (!f) utilDie("No framefile at index %d in frameFileSeek.", frameFileHandle);
// Search through loaded video segments
for (i=0; i<f->count; i++) {
if (f->files[i].videoHandle == videoHandle) {
// Frame is in this video
return videoGetFrame(videoHandle) + f->files[i].frame;
}
}
// Didn't find it.
return -1;
}
int32_t frameFileInit(void) {
return 0; // Nothing to do
}
int32_t frameFileLoad(char *filename, char *indexPath, bool stretchVideo, SDL_Renderer *renderer, bool showCalculated) {
int32_t result = 0;
int32_t count = 0;
int64_t frame = 0;
int64_t next = 0;
size_t bytes = 0;
char *audio = NULL;
char *data = NULL;
char *path = NULL;
char *offset = NULL;
char *frameLine = NULL;
char *space = NULL;
char *endptr = NULL;
char *temp = NULL;
FrameLineT *files = NULL;
FrameLineT *newFiles = NULL;
FrameFileT *frameFile = NULL;
data = utilReadFile(filename, &bytes);
if (!data) utilDie("Unable to open framefile: %s", filename);
// Get path where video files live
path = utilReadLine(data, bytes, &offset);
if (!path) utilDie("Cannot read video path from framefile!");
utilFixPathSeparators(&path, true);
// If it's not an absolute path, pre-pend the path to the framefile
if ((path[0] != utilGetPathSeparator()) && (path[1] != ':')) {
temp = path;
count = strlen(filename) - strlen(utilGetLastPathComponent(filename));
path = malloc(sizeof(char) * (count + strlen(temp) + 1));
memcpy(path, filename, count);
memcpy(&path[count], temp, strlen(temp));
path[count + strlen(temp)] = 0;
free(temp);
utilFixPathSeparators(&path, true);
count = 0;
}
// Read frame offsets and filenames - silently ignore bad lines
while ((frameLine = utilReadLine(data, bytes, &offset)) != NULL) {
// Covert tabs to spaces
for (next=0; next<(int64_t)strlen(frameLine); next++) {
if (frameLine[next] == 9) frameLine[next] = 32;
}
// Find first space in this file.
space = strstr(frameLine, " ");
if (space) {
// Write a zero in there to make it two fields.
*space = 0;
// Is the first part an integer?
endptr = NULL;
frame = strtol(frameLine, &endptr, 10);
*space = 32;
if (endptr == space) {
// Got an integer. Point at filename.
space++;
while (space[0] == 32) {
space++;
}
// Copy frame number and filename into array
newFiles = realloc(files, sizeof(FrameLineT) * (count + 1));
if (!newFiles) utilDie("Unable to allocate new framefile entry!");
files = newFiles;
files[count].lastFramePlayed = 0;
files[count].frame = frame;
files[count].filename = utilCreateString("%s%s", path, space);
// Is this an old m2v/ogg pair?
if (strncmp(utilGetFileExtension(files[count].filename), "m2v", 3) == 0) {
// Open split video and audio files
audio = strdup(files[count].filename);
audio[strlen(audio) - 3] = 'o';
audio[strlen(audio) - 2] = 'g';
audio[strlen(audio) - 1] = 'g';
if (utilFileExists(audio)) {
files[count].videoHandle = videoLoadWithAudio(files[count].filename, audio, indexPath, stretchVideo, renderer);
} else {
files[count].videoHandle = videoLoadWithAudio(files[count].filename, NULL, indexPath, stretchVideo, renderer);
}
free(audio);
audio = NULL;
} else {
// Open combined video/audio file
files[count].videoHandle = videoLoad(files[count].filename, indexPath, stretchVideo, renderer);
}
count++;
}
}
free(frameLine);
}
free(data);
// Allocate new framefile
frameFile = malloc(sizeof(FrameFileT));
frameFile->id = _nextId;
frameFile->count = count;
frameFile->videoPath = path;
frameFile->files = files;
HASH_ADD_INT(_frameFileHash, id, frameFile);
result = _nextId++;
// Show debug output?
if (showCalculated) {
// 00000000011111111112222222222333333333344444444445555555555666666666677777777778
// 12345678901234567890123456789012345678901234567890123456789012345678901234567890
utilSay("Existing Framefile:\n");
utilSay(" Start Length End File");
utilSay("-------- -------- -------- -------------------------------------------------");
for (count=0; count<frameFile->count; count++) {
frame = videoGetFrameCount(frameFile->files[count].videoHandle);
utilSay("%8ld %8ld %8ld %s", frameFile->files[count].frame, frame, frameFile->files[count].frame + frame, frameFile->files[count].filename);
}
next = 0;
utilSay("\nIdeal Framefile:\n");
utilSay(" Start File");
utilSay("-------- ---------------------------------------------------------------------");
for (count=0; count<frameFile->count; count++) {
frame = videoGetFrameCount(frameFile->files[count].videoHandle);
utilSay("%8ld %s", next, frameFile->files[count].filename);
next += frame + 1;
}
utilSay("");
}
return result;
}
int32_t frameFileSeek(int32_t frameFileHandle, int64_t seekFrame, int32_t *videoHandle, int64_t *actualFrame) {
int32_t i = 0;
int32_t found = -1;
FrameFileT *f = NULL;
// Get our framefile structure
HASH_FIND_INT(_frameFileHash, &frameFileHandle, f);
if (!f) utilDie("No framefile at index %d in frameFileSeek.", frameFileHandle);
// Search through loaded video segments
// Daphne-like framefile searching
found = 0;
for (i=0; i<f->count; i++) {
if (seekFrame >= f->files[i].frame) {
found = i;
}
}
/*
// Strict framefile searching
for (i=0; i<f->count; i++) {
if ((seekFrame >= f->files[i].frame) && (seekFrame <= (f->files[i].frame + videoGetFrameCount(f->files[i].videoHandle)))) {
found = i;
break;
}
}
*/
if (found >= 0) {
// Frame is in this video
*actualFrame = seekFrame - f->files[found].frame;
//utilSay("Frame %ld found in file %d - %s at %ld", seekFrame, found, f->files[found].filename, *actualFrame);
f->files[found].lastFramePlayed = *actualFrame;
videoSeek(f->files[found].videoHandle, *actualFrame);
// Is this a different video from the previous one?
if (*videoHandle != f->files[found].videoHandle) {
// Yes
_transferProperties(*videoHandle, f->files[found].videoHandle);
*videoHandle = f->files[found].videoHandle;
}
return 0;
}
// Didn't find it
*videoHandle = -1;
*actualFrame = -1;
return 1;
}
int32_t frameFileQuit(void) {
FrameFileT *f = NULL;
FrameFileT *t = NULL;
// Unload any remaining frameFiles
HASH_ITER(hh, _frameFileHash, f, t) {
frameFileUnload(f->id);
}
return 0;
}
int32_t frameFileUnload(int32_t frameFileHandle) {
int32_t i = 0;
FrameFileT *f = NULL;
// Get our framefile structure
HASH_FIND_INT(_frameFileHash, &frameFileHandle, f);
if (!f) utilDie("No framefile at index %d in frameFileUnload.", frameFileHandle);
// Unload videos
for (i=0; i<f->count; i++) {
free(f->files[i].filename);
videoUnload(f->files[i].videoHandle);
}
// Free memory
free(f->files);
free(f->videoPath);
// Remove from hash
HASH_DEL(_frameFileHash, f);
free(f);
return 0;
}
int32_t frameFileUpdate(int32_t frameFileHandle, int32_t *videoHandle) {
int32_t i = 0;
int64_t frame = 0;
FrameFileT *f = NULL;
// Get our framefile structure
HASH_FIND_INT(_frameFileHash, &frameFileHandle, f);
if (!f) utilDie("No framefile at index %d in frameFileUpdate.", frameFileHandle);
// Did the current video loop? If so, move to next video.
for (i=0; i<f->count; i++) {
if (f->files[i].videoHandle == *videoHandle) {
frame = videoGetFrame(*videoHandle);
if ((f->files[i].lastFramePlayed > frame) && (frame == 0)) {
// Switch video files
if (i == (f->count - 1)) {
i = 0;
} else {
i++;
}
_transferProperties(*videoHandle, f->files[i].videoHandle);
*videoHandle = f->files[i].videoHandle;
}
break;
}
}
return 0;
}

42
src/frameFile.h Normal file
View file

@ -0,0 +1,42 @@
/*
*
* Singe 2
* Copyright (C) 2006-2024 Scott Duensing <scott@kangaroopunch.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
*/
#ifndef FRAMEFILE_H
#define FRAMEFILE_H
#include <SDL2/SDL.h>
#include "common.h"
int64_t frameFileGetFrame(int32_t frameFileHandle, int32_t videoHandle);
int32_t frameFileInit(void);
int32_t frameFileLoad(char *filename, char *indexPath, bool stretchVideo, SDL_Renderer *renderer, bool showCalculated);
int32_t frameFileSeek(int32_t frameFileHandle, int64_t seekFrame, int32_t *videoHandle, int64_t *actualFrame);
int32_t frameFileQuit(void);
int32_t frameFileUnload(int32_t frameFileHandle);
int32_t frameFileUpdate(int32_t frameFileHandle, int32_t *videoHandle);
#endif // FRAMEFILE_H

1134
src/main.c Normal file

File diff suppressed because it is too large Load diff

39
src/main.h Normal file
View file

@ -0,0 +1,39 @@
/*
*
* Singe 2
* Copyright (C) 2006-2024 Scott Duensing <scott@kangaroopunch.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
*/
#ifndef MAIN_H
#define MAIN_H
#include "common.h"
#include "singe.h"
ConfigT *cloneConf(ConfigT *conf);
void destroyConf(ConfigT **confPointer);
bool parseSindenString(char **sindenStringPointer, ConfigT *conf);
void queueScript(ConfigT *conf);
#endif // MAIN_H

5662
src/singe.c Normal file

File diff suppressed because it is too large Load diff

82
src/singe.h Normal file
View file

@ -0,0 +1,82 @@
/*
*
* Singe 2
* Copyright (C) 2006-2024 Scott Duensing <scott@kangaroopunch.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
*/
#ifndef SINGE_H
#define SINGE_H
#include <SDL2/SDL.h>
#include "common.h"
// Don't forget to update singe.rc!
#define SINGE_VERSION 2.10
#define VERSION_STRING "v2.10"
#define COPYRIGHT_END_YEAR "2024"
enum {
SINDEN_WHITE = 1,
SINDEN_WHITE_BLACK = 2,
SINDEN_CUSTOM_WHITE = 4,
SINDEN_CUSTOM_WHITE_BLACK = 5,
SINDEN_CUSTOM_WHITE_CUSTOM_BLACK = 8,
SINDEN_OPTION_COUNT = 8
};
typedef struct ConfigS {
char *videoFile;
char *scriptFile;
char *dataDir;
char *dataDirBase;
bool resolutionWasCalculated;
bool isFrameFile;
bool stretchVideo;
bool noMouse;
bool noCrosshair;
bool noSound;
bool fullScreen;
bool fullScreenWindow;
bool showCalculated;
bool noConsole;
bool noLogos;
bool programTracing;
bool scriptTracing;
int32_t bestRatioIndex;
int32_t volumeVldp;
int32_t volumeNonVldp;
int32_t scaleFactor;
int32_t xResolution;
int32_t yResolution;
int32_t sindenArgc;
int32_t sindenArgv[SINDEN_OPTION_COUNT];
int32_t audioOutputTrack;
} ConfigT;
void singe(SDL_Window *window, SDL_Renderer *renderer, ConfigT *conf);
#endif // SINGE_H

24
src/singe.rc Normal file
View file

@ -0,0 +1,24 @@
101 ICON "/tmp/icon.ico"
1 VERSIONINFO
FILEVERSION 2,1,0,0
PRODUCTVERSION 2,1,0,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "CompanyName", "Kangaroo Punch Studios"
VALUE "FileDescription", "Somewhat Interactive Nostalgic Game Engine"
VALUE "FileVersion", "2.10"
VALUE "InternalName", "Singe"
VALUE "LegalCopyright", "Copyright 2006-2024 Scott C. Duensing"
VALUE "OriginalFilename", "singe.exe"
VALUE "ProductName", "Singe"
VALUE "ProductVersion", "2.10"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1252
END
END

513
src/util.c Normal file
View file

@ -0,0 +1,513 @@
/*
*
* Singe 2
* Copyright (C) 2006-2024 Scott Duensing <scott@kangaroopunch.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
*/
#ifdef _WIN32
#include <windows.h>
#include <stdio.h>
#include <fcntl.h>
#include <io.h>
#define ourMkdir(p,m) mkdir(p)
static const int CONSOLE_LINES = 1000;
#else
#define ourMkdir mkdir
#endif
#include <stdlib.h>
#include <dirent.h>
#include <string.h>
#include <ctype.h>
#include "util.h"
static bool _consoleEnabled = true;
static bool _outputHappened = false;
static FILE *_utilTraceFile = NULL;
bool utilChMod(const char *path, const mode_t mode) {
bool result = true;
#ifdef _WIN32
(void)path;
(void)mode;
#else
result = (chmod(path, mode) >= 0);
#endif
return result;
}
char *utilCreateString(char *format, ...) {
va_list args;
char *string;
va_start(args, format);
string = utilCreateStringVArgs(format, args);
va_end(args);
return string;
}
__attribute__((__format__(__printf__, 1, 0)))
char *utilCreateStringVArgs(char *format, va_list args) {
va_list argsCopy;
int32_t size = 0;
char *buffer = NULL;
va_copy(argsCopy, args);
size = vsnprintf(NULL, 0, format, argsCopy) + 1;
va_end(argsCopy);
buffer = calloc(1, (size_t)size);
if (buffer) {
vsnprintf(buffer, (size_t)size, format, args);
}
return buffer;
}
__attribute__((__format__(__printf__, 1, 0)))
__attribute__((noreturn))
void utilDie(char *fmt, ...) {
va_list args;
if (_consoleEnabled) {
va_start(args, fmt);
vfprintf(stderr, fmt, args);
va_end(args);
printf("\n");
fflush(stderr);
#ifdef _WIN32
getchar();
#endif
}
exit(1);
}
void utilEnableConsole(bool enable) {
_consoleEnabled = enable;
}
bool utilFileExists(char *filename) {
FILE *file;
if ((file = fopen(filename, "r+"))) {
fclose(file);
return true;
}
return false;
}
void utilFixPathSeparators(char **path, bool slash) {
int32_t i = 0;
int32_t j = 0;
char *work = *path;
char *temp = NULL;
// Flip path separators to whatever our OS wants & remove repeated separators.
while (work[i] != 0) {
// Correct separator
if (work[i] == '\\' || work[i] == '/') {
// Was the prior character a seprator?
if (j == 0) {
work[j++] = utilGetPathSeparator();
} else {
if (work[j - 1] != utilGetPathSeparator()) {
// No, accept it.
work[j++] = utilGetPathSeparator();
}
}
} else {
work[j++] = work[i];
}
i++;
}
work[j] = 0;
if (slash) {
// Does this string end with a path separator?
if (work[strlen(work) - 1] != utilGetPathSeparator()) {
// No - append one.
temp = strdup(work);
free(work);
work = malloc(sizeof(char) * (strlen(temp) + 2));
strcpy(work, temp);
work[strlen(temp)] = utilGetPathSeparator();
work[strlen(temp) + 1] = 0;
free(temp);
}
}
*path = work;
}
bool utilGetConsoleEnabled(void) {
return _consoleEnabled && _outputHappened;
}
char *utilGetFileExtension(char *filename) {
char *start = filename + strlen(filename);
int32_t x;
// Scan through name and find the last '.'
for (x=0; x<(int32_t)strlen(filename); x++) {
if (filename[x] == '.') {
start = &filename[x + 1];
}
// Reset if we find a path separator
if (filename[x] == '\\' || filename[x] == '/') {
start = filename + strlen(filename);
}
}
return start;
}
char *utilGetLastPathComponent(char *pathname) {
static char *start;
int32_t x;
start = pathname;
// Scan through name and find the last path separator
for (x=0; x<(int32_t)strlen(pathname); x++) {
if (pathname[x] == '\\' || pathname[x] == '/') {
start = &pathname[x + 1];
}
}
return start;
}
char utilGetPathSeparator(void) {
#ifdef _WIN32
return '\\';
#else
return '/';
#endif
}
char *utilGetUpToLastPathComponent(char *pathname) {
static char *copy = NULL;
bool dumb = false; // Using (copy == NULL) below didn't work after optimizations, so enter the dummy.
int32_t x;
x = (int32_t)(strlen(pathname) - strlen(utilGetLastPathComponent(pathname))) - 1;
if (x < 0) x = 0;
if (dumb) {
free(copy);
copy = NULL;
} else {
dumb = true;
}
copy = strdup(pathname);
copy[x] = 0;
utilFixPathSeparators(&copy, true);
return copy;
}
bool utilMkDirP(const char *dir, const mode_t mode) {
char tmp[UTIL_PATH_MAX];
char *p = NULL;
struct stat sb;
size_t len;
// Make copy of dir.
len = strnlen(dir, UTIL_PATH_MAX);
if (len == 0 || len == UTIL_PATH_MAX) {
return -1;
}
memcpy(tmp, dir, len);
tmp[len] = '\0';
// Remove trailing slash.
if (tmp[len - 1] == utilGetPathSeparator()) {
tmp[len - 1] = '\0';
}
// Does it already exist?
if (stat(tmp, &sb) == 0) {
if (S_ISDIR (sb.st_mode)) {
return true;
}
}
// Recursive mkdir.
for (p = tmp + 1; *p; p++) {
if (*p == utilGetPathSeparator()) {
*p = 0;
if (stat(tmp, &sb) != 0) {
// Does not exist - create it.
if (ourMkdir(tmp, mode) < 0) {
return false;
}
} else {
if (!S_ISDIR(sb.st_mode)) {
// Not a directory
return false;
}
}
*p = utilGetPathSeparator();
}
}
// Check path
if (stat(tmp, &sb) != 0) {
// Does not exist - create it.
if (ourMkdir(tmp, mode) < 0) {
return false;
}
} else {
if (!S_ISDIR(sb.st_mode)) {
// Not a directory
return false;
}
}
return true;
}
bool utilPathExists(char *pathname) {
DIR *dir = opendir(pathname);
if (dir) {
closedir(dir);
return true;
}
return false;
}
char *utilReadFile(char *filename, size_t *bytes) {
char *data = NULL;
FILE *in = fopen(filename, "rb");
size_t read = 0;
(void)read;
*bytes = 0;
if (in) {
fseek(in, 0, SEEK_END);
*bytes = ftell(in);
fseek(in, 0, SEEK_SET);
data = malloc(sizeof(char) * (*bytes));
read = fread(data, sizeof(char), *bytes, in);
fclose(in);
}
return data;
}
char *utilReadLine(char *haystack, size_t length, char **offset) {
size_t bytes = 0;
char *temp = *offset;
char *tail = temp;
char *result = NULL;
// They didn't know where to start
if (temp == NULL) {
temp = haystack;
tail = temp;
}
// Is there still data to read?
while ((size_t)(tail - haystack) < length) {
// Is this the end of a line?
if ((tail[0] == 10) || (tail[0] == 13)) {
// Yep!
bytes = tail - temp + 1;
result = malloc(sizeof(char) * bytes);
memcpy(result, temp, bytes - 1);
result[bytes - 1] = 0;
// Read past any additional CR/LFs
while ((tail[0] == 10) || (tail[0] == 13)) {
tail++;
}
// Return where we left off
temp = tail;
*offset = temp;
return result;
}
// Next character
tail++;
}
// Was there data at the end of the block with no CR/LF?
if (tail > temp) {
// Yep. Treat it as a line.
bytes = tail - temp + 1;
result = malloc(sizeof(char) * bytes);
memcpy(result, temp, bytes - 1);
result[bytes - 1] = 0;
temp = tail;
*offset = temp;
}
// Didn't find anything
return result;
}
void utilRedirectConsole(void) {
#ifdef _WIN32
// http://dslweb.nwnexus.com/~ast/dload/guicon.htm
int hConHandle; // Not changing this int.
intptr_t lStdHandle;
CONSOLE_SCREEN_BUFFER_INFO coninfo;
FILE *fp;
static bool consoleOpen = false;
if (!consoleOpen) {
consoleOpen = true;
// allocate a console for this app
AllocConsole();
// set the screen buffer to be big enough to let us scroll text
GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &coninfo);
coninfo.dwSize.Y = CONSOLE_LINES;
SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), coninfo.dwSize);
// redirect unbuffered STDOUT to the console
lStdHandle = (intptr_t)GetStdHandle(STD_OUTPUT_HANDLE);
hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);
fp = _fdopen(hConHandle, "w");
*stdout = *fp;
setvbuf(stdout, NULL, _IONBF, 0);
// redirect unbuffered STDIN to the console
lStdHandle = (intptr_t)GetStdHandle(STD_INPUT_HANDLE);
hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);
fp = _fdopen(hConHandle, "r");
*stdin = *fp;
setvbuf(stdin, NULL, _IONBF, 0);
// redirect unbuffered STDERR to the console
lStdHandle = (intptr_t)GetStdHandle(STD_ERROR_HANDLE);
hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);
fp = _fdopen(hConHandle, "w");
*stderr = *fp;
setvbuf(stderr, NULL, _IONBF, 0);
}
#endif
}
__attribute__((__format__(__printf__, 1, 0)))
void utilSay(char *fmt, ...) {
va_list args;
if (_consoleEnabled) {
va_start(args, fmt);
vfprintf(stdout, fmt, args);
va_end(args);
printf("\n");
fflush(stdout);
_outputHappened = true;
}
}
bool utilStartsWith(char *string, char *start) {
return strncmp(start, string, strlen(start)) == 0;
}
int utilStricmp(char *a, char *b) {
for (;; a++, b++) {
int d = tolower((unsigned char)*a) - tolower((unsigned char)*b);
if (d != 0 || !*a) {
return d;
}
}
}
// Windows does not have strndup() so we implement our own.
char *utilStrndup( const char *s1, size_t n) {
char *copy = (char *)malloc(n + 1);
memcpy(copy, s1, n);
copy[n] = 0;
return copy;
}
void utilTrace(char *fmt, ...) {
va_list args;
if (_utilTraceFile) {
va_start(args, fmt);
utilTraceVArgs(fmt, args);
va_end(args);
}
}
void utilTraceEnd(void) {
if (_utilTraceFile) fclose(_utilTraceFile);
}
FILE *utilTraceGetFile(void) {
return _utilTraceFile;
}
void utilTraceStart(char *filename) {
_utilTraceFile = fopen(filename, "wt");
if (!_utilTraceFile) utilDie("Unable to create trace file: %s", filename);
}
__attribute__((__format__(__printf__, 1, 0)))
void utilTraceVArgs(char *fmt, va_list args) {
#if defined(va_copy)
va_list args2;
#endif
if (_utilTraceFile) {
#if defined(va_copy)
va_copy(args2, args);
vprintf(fmt, args2);
printf("\n");
va_end(args2);
#endif
vfprintf(_utilTraceFile, fmt, args);
fprintf(_utilTraceFile, "\n");
fflush(_utilTraceFile);
}
}

66
src/util.h Normal file
View file

@ -0,0 +1,66 @@
/*
*
* Singe 2
* Copyright (C) 2006-2024 Scott Duensing <scott@kangaroopunch.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
*/
#ifndef UTIL_H
#define UTIL_H
#include <stdio.h>
#include <stdarg.h>
#include <sys/stat.h>
#include "common.h"
#define UTIL_PATH_MAX 1024
bool utilChMod(const char *path, const mode_t mode);
char *utilCreateString(char *format, ...);
char *utilCreateStringVArgs(char *format, va_list args);
void utilDie(char *fmt, ...);
void utilEnableConsole(bool enable);
bool utilFileExists(char *filename);
void utilFixPathSeparators(char **path, bool slash);
bool utilGetConsoleEnabled(void);
char *utilGetFileExtension(char *filename);
char *utilGetLastPathComponent(char *pathname);
char utilGetPathSeparator(void);
char *utilGetUpToLastPathComponent(char *pathname);
bool utilMkDirP(const char *dir, const mode_t mode);
bool utilPathExists(char *pathname);
char *utilReadFile(char *filename, size_t *bytes);
char *utilReadLine(char *haystack, size_t length, char **offset);
void utilRedirectConsole(void);
void utilSay(char *fmt, ...);
bool utilStartsWith(char *string, char *start);
int utilStricmp(char *a, char *b);
char *utilStrndup( const char *s1, size_t n);
void utilTrace(char *fmt, ...);
void utilTraceEnd(void);
FILE *utilTraceGetFile(void);
void utilTraceStart(char *filename);
void utilTraceVArgs(char *fmt, va_list args);
#endif // UTIL_H

795
src/videoPlayer.c Normal file
View file

@ -0,0 +1,795 @@
/*
*
* Singe 2
* Copyright (C) 2006-2024 Scott Duensing <scott@kangaroopunch.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
*/
#include "include/SDL2/SDL_mixer.h"
#include "../thirdparty/ffms2/include/ffms.h"
#include "../thirdparty/uthash/src/uthash.h"
#include "../thirdparty/ffmpeg/libavformat/avformat.h"
#include "../thirdparty/ffmpeg/libavutil/dict.h"
#include "util.h"
#include "videoPlayer.h"
// This is kinda ugly but it lets us use the language
// data from VLC without changing their files.
#define VLC_API
#define N_(x) x
typedef struct iso639_lang_t iso639_lang_t;
#include "../thirdparty/vlc/vlc_iso_lang.h"
#include "../thirdparty/vlc/iso-639_def.h"
#undef N_
#undef VLC_API
#define AUDIO_STREAM_LOW_WATERMARK (24 * 1024)
#define AUDIO_SAMPLE_PREREAD 1024
#define AUDIO_SILENCE_SECONDS 2
typedef struct AudioStreamS {
FFMS_AudioSource *audioSource;
const FFMS_AudioProperties *audioProps;
char *language;
} AudioStreamT;
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpadded"
typedef struct VideoPlayerS {
int32_t id;
bool playing;
bool resetTime;
byte *audioBuffer;
byte audioSampleBytes;
byte *audioSilenceRaw;
char errMsg[1024];
int32_t volumeLeft;
int32_t volumeRight;
int32_t videoTrack;
int32_t audioSampleSize;
int32_t mixSampleSize;
int32_t audioSilenceChannel;
int64_t frame;
int64_t audioBufferSize;
int64_t frameDeltaTime;
int64_t lastFrameTime;
int64_t timestamp;
int64_t audioDelta;
int64_t audioPosition;
int64_t framesPlayed;
Uint16 audioFormat;
Uint32 lastTickTime;
Uint32 audioSilenceSize;
//double audioAdjustment;
Mix_Chunk *silenceChunk;
SDL_AudioStream *audioStream;
SDL_Texture *videoTexture;
FFMS_ErrorInfo errInfo;
int32_t currentAudioTrack;
int32_t audioSourceCount;
AudioStreamT *audio;
FFMS_VideoSource *videoSource;
const FFMS_VideoProperties *videoProps;
const FFMS_Frame *propFrame;
const FFMS_TrackTimeBase *videoTimeBase;
const FFMS_Frame *frameData;
const FFMS_FrameInfo *frameInfo;
UT_hash_handle hh;
} VideoPlayerT;
#pragma GCC diagnostic pop
FFMS_Index *_createIndex(char *filename, char *indexPath, bool hasVideo, bool hasAudio, VideoPlayerT *v);
void _dequeueVideoAudio(int channel, void *stream, int len, void *udata); // Callback. Not changing ints.
int FFMS_CC _indexCallBack(int64_t Current, int64_t Total, void *ICPrivate); // Callback. Not changing int.
int32_t _loadVideoAndAudio(char *vFilename, char *aFilename, char *indexPath, bool stretchVideo, SDL_Renderer *renderer);
static videoIndexingCallback _indexingFunction = NULL;
static VideoPlayerT *_videoPlayerHash = NULL;
static int32_t _nextId = 0;
static int32_t _mixRate = -1;
static Uint8 _mixChannels = 0;
static SDL_AudioFormat _mixFormat = 0;
void _dequeueVideoAudio(int channel, void *stream, int bytes, void *udata) { // Callback. Not changing ints.
VideoPlayerT *v = (VideoPlayerT *)udata;
int32_t bytesToCopy = bytes;
int32_t available = SDL_AudioStreamAvailable(v->audioStream);
int32_t remainder = 0;
int32_t bytesRead = 0;
int32_t i = 0;
Sint16 *data = stream;
(void)channel;
// Don't copy more than we have room for
if (bytesToCopy > available) {
bytesToCopy = available;
}
// Ensure we only copy complete samples (Is this needed?)
remainder = bytesToCopy % v->audioSampleSize;
bytesToCopy -= remainder;
//utilSay("B: %d R: %d W: %ld", bytes, remainder, SDL_AudioStreamAvailable(v->audioStream));
// Read audio data
bytesRead = SDL_AudioStreamGet(v->audioStream, stream, bytesToCopy);
if (bytesRead < 0) utilDie("%s", SDL_GetError());
// We do our own volume per channel here in the mixer
if (_mixChannels < 2) {
// Mono output, average volume levels together
Mix_Volume(channel, (int32_t)((float)MIX_MAX_VOLUME * ((float)v->volumeLeft * (float)v->volumeRight / (float)2) * (float)0.01));
} else {
// Stereo output. Assumes MIX_DEFAULT_FORMAT for now.
Mix_Volume(channel, MIX_MAX_VOLUME);
for (i=0; i<bytesRead / 2; i+=2) {
data[i] = (Sint16)((float)data[i] * (float)v->volumeLeft * (float)0.01);
data[i + 1] = (Sint16)((float)data[i + 1] * (float)v->volumeRight * (float)0.01);
}
}
}
int FFMS_CC _indexCallBack(int64_t current, int64_t total, void *ICPrivate) { // Callback. Not changing int.
static int32_t lastPercent = 0;
int32_t thisPercent = 0;
VideoPlayerT *v = (VideoPlayerT *)ICPrivate;
(void)v;
if ((current == 0) && (total == 0)) {
lastPercent = 0; // Reset
} else {
thisPercent = (int32_t)((double)current / (double)total * 100.0);
if (thisPercent != lastPercent) {
lastPercent = thisPercent;
// GUI
if (_indexingFunction) {
_indexingFunction(thisPercent);
}
}
}
return 0;
}
FFMS_Index *_createIndex(char *filename, char *indexPath, bool hasVideo, bool hasAudio, VideoPlayerT *v) {
char *indexName = NULL;
FFMS_Index *index = NULL;
FFMS_Indexer *indexer = NULL;
// Index file
indexName = utilCreateString("%s%c%s.index", indexPath, utilGetPathSeparator(), utilGetLastPathComponent(filename));
utilFixPathSeparators(&indexName, false);
index = FFMS_ReadIndex(indexName, &v->errInfo);
if (index) {
if (FFMS_IndexBelongsToFile(index, filename, &v->errInfo)) {
FFMS_DestroyIndex(index);
index = NULL;
}
}
if (!index) {
indexer = FFMS_CreateIndexer(filename, &v->errInfo);
if (indexer == NULL) utilDie("%s", v->errInfo.Buffer);
if (hasAudio) FFMS_TrackTypeIndexSettings(indexer, FFMS_TYPE_AUDIO, 1, 0);
if (hasVideo) FFMS_TrackTypeIndexSettings(indexer, FFMS_TYPE_VIDEO, 1, 0);
_indexCallBack(0, 0, v);
FFMS_SetProgressCallback(indexer, _indexCallBack, v);
index = FFMS_DoIndexing2(indexer, FFMS_IEH_ABORT, &v->errInfo);
if (index == NULL) utilDie("%s", v->errInfo.Buffer);
if (FFMS_WriteIndex(indexName, index, &v->errInfo)) utilDie("%s", v->errInfo.Buffer);
}
free(indexName);
return index;
}
int32_t _loadVideoAndAudio(char *vFilename, char *aFilename, char *indexPath, bool stretchVideo, SDL_Renderer *renderer) {
int32_t pixelFormats[2];
int32_t result = -1;
FFMS_Index *vIndex = NULL;
FFMS_Index *aIndex = NULL;
VideoPlayerT *v = NULL;
int32_t x = 0;
int32_t count = 0;
FFMS_Track *track = NULL;
int32_t ttype = FFMS_TYPE_UNKNOWN;
AVFormatContext *fmt_ctx = NULL;
AVDictionaryEntry *tag = NULL;
// Create new videoPlayer
v = calloc(1, sizeof(VideoPlayerT));
if (!v) utilDie("Unable to allocate new video player.");
// Set some starting values
v->audioSourceCount = 0;
v->currentAudioTrack = -1;
v->videoTrack = -1;
v->audioSilenceChannel = -1;
v->playing = false; // Start paused
v->errInfo.Buffer = v->errMsg;
v->errInfo.BufferSize = sizeof(v->errMsg);
v->errInfo.ErrorType = FFMS_ERROR_SUCCESS;
v->errInfo.SubType = FFMS_ERROR_SUCCESS;
if (aFilename) {
vIndex = _createIndex(vFilename, indexPath, true, false, v);
aIndex = _createIndex(aFilename, indexPath, false, true, v);
} else {
vIndex = _createIndex(vFilename, indexPath, true, true, v);
aIndex = vIndex;
aFilename = vFilename;
}
// Find video track
v->videoTrack = FFMS_GetFirstTrackOfType(vIndex, FFMS_TYPE_VIDEO, &v->errInfo);
if (v->videoTrack < 0) utilDie("%s", v->errInfo.Buffer);
v->videoSource = FFMS_CreateVideoSource(vFilename, v->videoTrack, vIndex, -1, FFMS_SEEK_NORMAL, &v->errInfo);
if (v->videoSource == NULL) utilDie("%s", v->errInfo.Buffer);
// Get video properties
v->videoProps = FFMS_GetVideoProperties(v->videoSource);
v->propFrame = FFMS_GetFrame(v->videoSource, 0, &v->errInfo);
if (v->propFrame == NULL) utilDie("%s", v->errInfo.Buffer);
v->videoTimeBase = FFMS_GetTimeBase(FFMS_GetTrackFromVideo(v->videoSource));
// Set up output video format
pixelFormats[0] = FFMS_GetPixFmt("bgra");
pixelFormats[1] = -1;
if (FFMS_SetOutputFormatV2(v->videoSource, pixelFormats, v->propFrame->EncodedWidth, v->propFrame->EncodedHeight, FFMS_RESIZER_BICUBIC, &v->errInfo)) utilDie("%s", v->errInfo.Buffer);
// Find audio track(s)
for (x=0; x<FFMS_GetNumTracks(aIndex); x++) {
track = FFMS_GetTrackFromIndex(aIndex, x);
ttype = FFMS_GetTrackType(track);
// Just count the tracks for now.
if (ttype == FFMS_TYPE_AUDIO) count++;
}
if (count > 0) {
// Allocate space for the tracks.
v->audio = (AudioStreamT *)calloc(count, sizeof(AudioStreamT));
// Now create them.
for (x=0; x<FFMS_GetNumTracks(aIndex); x++) {
if (FFMS_GetTrackType(FFMS_GetTrackFromIndex(aIndex, x)) == FFMS_TYPE_AUDIO) {
v->audio[v->audioSourceCount].audioSource = FFMS_CreateAudioSource(aFilename, x, aIndex, FFMS_DELAY_FIRST_VIDEO_TRACK, &v->errInfo);
if (v->audio[v->audioSourceCount].audioSource == NULL) utilDie("%s", v->errInfo.Buffer);
v->audio[v->audioSourceCount].audioProps = FFMS_GetAudioProperties(v->audio[v->audioSourceCount].audioSource);
v->audioSourceCount++;
}
}
// Use ffmpeg directly to figure out language IDs for audio tracks
if (avformat_open_input(&fmt_ctx, aFilename, NULL, NULL) >= 0) {
count = 0;
for (x=0; x<fmt_ctx->nb_streams; x++) {
if (fmt_ctx->streams[x]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
tag = NULL;
while ((tag = (AVDictionaryEntry *)av_dict_iterate(fmt_ctx->streams[x]->metadata, tag))) {
if (utilStricmp("language", tag->key) == 0) {
v->audio[count++].language = strdup(tag->value);
break;
}
}
}
}
avformat_close_input(&fmt_ctx);
}
// Current audio track.
v->currentAudioTrack = 0;
}
// Indicies are now part of audioSource & videoSource, so release these
FFMS_DestroyIndex(vIndex);
vIndex = NULL;
if ((aFilename != vFilename) && (aIndex)) {
FFMS_DestroyIndex(aIndex);
}
aIndex = NULL;
// Create video texture
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear");
v->videoTexture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_BGRA32, SDL_TEXTUREACCESS_TARGET, v->propFrame->EncodedWidth, v->propFrame->EncodedHeight);
if (v->videoTexture == NULL) utilDie("%s", SDL_GetError());
if (!stretchVideo) {
//***TODO*** Is this the best place for this? What if we have videos of multiple sizes?
SDL_RenderSetLogicalSize(renderer, v->propFrame->EncodedWidth, v->propFrame->EncodedHeight);
}
// Do we have audio? All audio streams must have the same format!
if (v->audioSourceCount > 0) {
// Determine audio format
switch (v->audio[0].audioProps->SampleFormat) {
case FFMS_FMT_U8:
v->audioFormat = AUDIO_U8;
v->audioSampleBytes = 1;
break;
case FFMS_FMT_S16:
v->audioFormat = AUDIO_S16SYS;
v->audioSampleBytes = 2;
break;
case FFMS_FMT_S32:
v->audioFormat = AUDIO_S32SYS;
v->audioSampleBytes = 4;
break;
case FFMS_FMT_FLT:
v->audioFormat = AUDIO_F32SYS;
v->audioSampleBytes = 4;
break;
default:
utilDie("Unknown audio sample format.");
break;
}
if (v->audio[0].audioProps->Channels > 2) utilDie("Only mono and stereo audio are supported.");
// Create audio stream to convert audio to our desired format
v->audioStream = SDL_NewAudioStream(v->audioFormat, (Uint8)v->audio[0].audioProps->Channels, v->audio[0].audioProps->SampleRate, _mixFormat, _mixChannels, _mixRate);
if (!v->audioStream) utilDie("%s", SDL_GetError());
// Create a buffer to read audio into before conversion
v->mixSampleSize = SDL_AUDIO_BITSIZE(_mixFormat) / 8 * _mixChannels;
v->audioSampleSize = v->audioSampleBytes * v->audio[0].audioProps->Channels;
v->audioBufferSize = v->audioSampleSize * AUDIO_SAMPLE_PREREAD;
v->audioBuffer = (byte *)malloc((size_t)v->audioBufferSize * sizeof(byte));
if (!v->audioBuffer) utilDie("Unable to allocate %ld byte audio buffer.", (size_t)v->audioBufferSize * sizeof(byte));
// Create a block of silent audio to overlay with video stream audio
v->audioSilenceSize = (Uint32)(_mixRate * SDL_AUDIO_BITSIZE(_mixFormat) / 8 * AUDIO_SILENCE_SECONDS);
v->audioSilenceRaw = (byte *)calloc(1, (size_t)v->audioSilenceSize * sizeof(byte));
if (!v->audioSilenceRaw) utilDie("Unable to allocate %ld silence buffer.", v->audioSilenceSize);
// Load silent audio
v->silenceChunk = Mix_QuickLoad_RAW(v->audioSilenceRaw, v->audioSilenceSize);
if (!v->silenceChunk) utilDie("%s", Mix_GetError());
// Start silent audio playback & immediately pause it
v->audioSilenceChannel = Mix_PlayChannel(-1, v->silenceChunk, -1);
if (v->audioSilenceChannel < 0) utilDie("%s", Mix_GetError());
// Register effect to provide video stream audio on this channel
Mix_RegisterEffect(v->audioSilenceChannel, _dequeueVideoAudio, NULL, v);
}
// Default volume, in percent
v->volumeLeft = 100;
v->volumeRight = 100;
/*
utilSay("Frames: %d (%dx%d) Audio Samples: %ld (%d Hz) %d Channel%s",
v->videoProps->NumFrames,
v->propFrame->EncodedWidth,
v->propFrame->EncodedHeight,
v->audioProps->NumSamples,
v->audioProps->SampleRate,
v->audioProps->Channels,
v->audioProps->Channels == 1 ? "" : "s"
);
*/
// Add to player hash
v->id = _nextId;
HASH_ADD_INT(_videoPlayerHash, id, v);
result = _nextId++;
return result;
}
int32_t videoInit(void) {
int32_t channels = _mixChannels;
// Start FFMS
FFMS_Init(0, 0);
// Fetch mixer settings
if (!Mix_QuerySpec(&_mixRate, &_mixFormat, &channels)) utilDie("%s", Mix_GetError());
_mixChannels = (Uint8)channels;
// Volume only works with MIX_DEFAULT_FORMAT
if (_mixFormat != MIX_DEFAULT_FORMAT) utilDie("videoInit: Only MIX_DEFAULT_FORMAT audio is supported.");
return 0;
}
int32_t videoIsPlaying(int32_t playerHandle) {
VideoPlayerT *v = NULL;
// Get our player structure
HASH_FIND_INT(_videoPlayerHash, &playerHandle, v);
if (!v) utilDie("No video player at index %d in videoIsPlaying.", playerHandle);
return v->playing;
}
int32_t videoGetAudioTrack(int32_t playerHandle) {
VideoPlayerT *v = NULL;
// Get our player structure
HASH_FIND_INT(_videoPlayerHash, &playerHandle, v);
if (!v) utilDie("No video player at index %d in videoGetAudioTrack.", playerHandle);
return v->currentAudioTrack;
}
int32_t videoGetAudioTracks(int32_t playerHandle) {
VideoPlayerT *v = NULL;
// Get our player structure
HASH_FIND_INT(_videoPlayerHash, &playerHandle, v);
if (!v) utilDie("No video player at index %d in videoGetAudioTracks.", playerHandle);
return v->audioSourceCount;
}
int64_t videoGetFrame(int32_t playerHandle) {
VideoPlayerT *v = NULL;
// Get our player structure
HASH_FIND_INT(_videoPlayerHash, &playerHandle, v);
if (!v) utilDie("No video player at index %d in videoGetFrame.", playerHandle);
return v->frame;
}
int64_t videoGetFrameCount(int32_t playerHandle) {
VideoPlayerT *v = NULL;
// Get our player structure
HASH_FIND_INT(_videoPlayerHash, &playerHandle, v);
if (!v) utilDie("No video player at index %d in videoGetFrameCount.", playerHandle);
return v->videoProps->NumFrames;
}
char *videoGetLanguage(int32_t playerHandle, int32_t audioTrack) {
VideoPlayerT *v = NULL;
static char *u = "unk"; // Unknown Language
char *r = u;
// Get our player structure
HASH_FIND_INT(_videoPlayerHash, &playerHandle, v);
if (!v) utilDie("No video player at index %d in videoGetHeight.", playerHandle);
if ((audioTrack >= 0) && (audioTrack < v->audioSourceCount)) {
r = v->audio[audioTrack].language;
if ((r == NULL) || (strlen(r) != 3)) {
r = u;
}
} else {
utilDie("Invalid audio track in videoSetAudioTrack.");
}
return r;
}
char *videoGetLanguageDescription(char *languageCode) {
static char *u = "Unknown";
char *r = u;
int32_t i = 0;
while (p_languages[i].psz_eng_name != NULL) {
if ((utilStricmp(languageCode, (char *)p_languages[i].psz_iso639_1) == 0) ||
(utilStricmp(languageCode, (char *)p_languages[i].psz_iso639_2T) == 0) ||
(utilStricmp(languageCode, (char *)p_languages[i].psz_iso639_2B) == 0)) {
r = (char *)p_languages[i].psz_eng_name;
break;
}
i++;
}
return r;
}
int32_t videoGetHeight(int32_t playerHandle) {
VideoPlayerT *v = NULL;
// Get our player structure
HASH_FIND_INT(_videoPlayerHash, &playerHandle, v);
if (!v) utilDie("No video player at index %d in videoGetHeight.", playerHandle);
return v->propFrame->EncodedHeight;
}
int32_t videoGetWidth(int32_t playerHandle) {
VideoPlayerT *v = NULL;
// Get our player structure
HASH_FIND_INT(_videoPlayerHash, &playerHandle, v);
if (!v) utilDie("No video player at index %d in videoGetWidth.", playerHandle);
return v->propFrame->EncodedWidth;
}
int32_t videoGetVolume(int32_t playerHandle, int32_t *leftPercent, int32_t *rightPercent) {
VideoPlayerT *v = NULL;
// Get our player structure
HASH_FIND_INT(_videoPlayerHash, &playerHandle, v);
if (!v) utilDie("No video player at index %d in videoGetVolume.", playerHandle);
if (leftPercent != NULL) *leftPercent = v->volumeLeft;
if (rightPercent != NULL) *rightPercent = v->volumeRight;
return 0;
}
int32_t videoLoad(char *filename, char *indexPath, bool stretchVideo, SDL_Renderer *renderer) {
return _loadVideoAndAudio(filename, NULL, indexPath, stretchVideo, renderer);
}
int32_t videoLoadWithAudio(char *vFilename, char *aFilename, char *indexPath, bool stretchVideo, SDL_Renderer *renderer) {
return _loadVideoAndAudio(vFilename, aFilename, indexPath, stretchVideo, renderer);
}
int32_t videoPause(int32_t playerHandle) {
VideoPlayerT *v = NULL;
// Get our player structure
HASH_FIND_INT(_videoPlayerHash, &playerHandle, v);
if (!v) utilDie("No video player at index %d in videoPause.", playerHandle);
v->playing = false;
v->resetTime = true;
return 0;
}
int32_t videoPlay(int32_t playerHandle) {
VideoPlayerT *v = NULL;
// Get our player structure
HASH_FIND_INT(_videoPlayerHash, &playerHandle, v);
if (!v) utilDie("No video player at index %d in videoPlay.", playerHandle);
v->playing = true;
v->resetTime = true;
return 0;
}
int32_t videoQuit(void) {
VideoPlayerT *v = NULL;
VideoPlayerT *t = NULL;
// Unload any remaining videos
HASH_ITER(hh, _videoPlayerHash, v, t) {
videoUnload(v->id);
}
FFMS_Deinit();
return 0;
}
int32_t videoSeek(int32_t playerHandle, int64_t seekFrame) {
VideoPlayerT *v = NULL;
// Get our player structure
HASH_FIND_INT(_videoPlayerHash, &playerHandle, v);
if (!v) utilDie("No video player at index %d in videoSeek.", playerHandle);
while (seekFrame >= v->videoProps->NumFrames) {
seekFrame -= v->videoProps->NumFrames;
}
while (seekFrame < 0) {
seekFrame += v->videoProps->NumFrames;
}
v->frame = seekFrame;
v->resetTime = true;
return 0;
}
int32_t videoSetAudioTrack(int32_t playerHandle, int32_t track) {
VideoPlayerT *v = NULL;
// Get our player structure
HASH_FIND_INT(_videoPlayerHash, &playerHandle, v);
if (!v) utilDie("No video player at index %d in videoSetAudioTrack.", playerHandle);
if ((track >= 0) && (track < v->audioSourceCount)) {
v->currentAudioTrack = track;
} else {
utilDie("Invalid audio track in videoSetAudioTrack.");
}
return 0;
}
int32_t videoSetIndexCallback(videoIndexingCallback callback) {
_indexingFunction = callback;
return 0;
}
int32_t videoSetVolume(int32_t playerHandle, int32_t leftPercent, int32_t rightPercent) {
VideoPlayerT *v = NULL;
// Get our player structure
HASH_FIND_INT(_videoPlayerHash, &playerHandle, v);
if (!v) utilDie("No video player at index %d in videoSetVolume.", playerHandle);
v->volumeLeft = leftPercent;
v->volumeRight = rightPercent;
return 0;
}
int32_t videoUnload(int32_t playerHandle) {
VideoPlayerT *v = NULL;
int32_t x = 0;
// Get our player structure
HASH_FIND_INT(_videoPlayerHash, &playerHandle, v);
if (!v) utilDie("No video player at index %d in videoStop.", playerHandle);
if (v->audioSourceCount > 0) {
Mix_HaltChannel(v->audioSilenceChannel);
Mix_UnregisterEffect(v->audioSilenceChannel, _dequeueVideoAudio);
Mix_FreeChunk(v->silenceChunk);
free(v->audioSilenceRaw);
SDL_FreeAudioStream(v->audioStream);
free(v->audioBuffer);
for (x=0; x<v->audioSourceCount; x++) {
if (v->audio[x].language) free(v->audio[x].language);
FFMS_DestroyAudioSource(v->audio[x].audioSource);
}
free(v->audio);
}
FFMS_DestroyVideoSource(v->videoSource);
SDL_DestroyTexture(v->videoTexture);
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-align"
HASH_DEL(_videoPlayerHash, v);
#pragma GCC diagnostic pop
free(v);
return 0;
}
int32_t videoUpdate(int32_t playerHandle, SDL_Texture **texture) {
int32_t result = -1;
int64_t count = 0;
int64_t threshold = 0;
VideoPlayerT *v = NULL;
// Get our player structure
HASH_FIND_INT(_videoPlayerHash, &playerHandle, v);
if (!v) utilDie("No video player at index %d in videoUpdate.", playerHandle);
// Audio drift limit
threshold = v->audio[v->currentAudioTrack].audioSource ? (v->audio[v->currentAudioTrack].audioProps->SampleRate / 2) : 99999;
// Handle video frames (and time)
//if ((SDL_GetTicks() - v->lastTickTime >= v->frameDeltaTime) || (v->audioDelta > threshold) || v->resetTime) {
if ((SDL_GetTicks() - v->lastTickTime >= v->frameDeltaTime) || v->resetTime) {
if (v->frameData) {
SDL_UpdateTexture(v->videoTexture, NULL, v->frameData->Data[0], v->frameData->Linesize[0]);
}
*texture = v->videoTexture;
result = v->frame;
v->framesPlayed++;
v->frameData = FFMS_GetFrame(v->videoSource, v->frame, &v->errInfo);
if (v->frameData == NULL) utilDie("%s", v->errInfo.Buffer);
v->frameInfo = FFMS_GetFrameInfo(FFMS_GetTrackFromVideo(v->videoSource), v->frame);
v->timestamp = (int64_t)((double)v->frameInfo->PTS * (double)v->videoTimeBase->Num / (double)v->videoTimeBase->Den); // Convert to milliseconds
v->frameDeltaTime = (v->timestamp - v->lastFrameTime); // - (v->audioAdjustment * v->framesPlayed);
v->lastFrameTime = v->timestamp;
if (v->playing) {
if (++v->frame >= v->videoProps->NumFrames) {
v->frame = 0;
v->timestamp = 0;
v->resetTime = true;
}
}
v->lastTickTime = SDL_GetTicks();
if (v->resetTime) {
if (v->audioSourceCount > 0) {
SDL_AudioStreamClear(v->audioStream);
v->audioPosition = (int64_t)((double)v->timestamp * 0.001 * (double)v->audio[v->currentAudioTrack].audioProps->SampleRate);
v->audioDelta = 0;
}
v->lastTickTime = 0;
v->frameDeltaTime = 0;
v->resetTime = false;
v->framesPlayed = 0;
}
}
// Handle audio samples
if (v->audioSourceCount > 0) {
// Add more samples to queue?
if ((v->playing) && (SDL_AudioStreamAvailable(v->audioStream) < AUDIO_STREAM_LOW_WATERMARK) && (v->audioPosition < v->audio[v->currentAudioTrack].audioProps->NumSamples)) {
// Maximum samples we can read at a time
count = AUDIO_SAMPLE_PREREAD;
// Don't read past end of audio data
if (v->audioPosition + count >= v->audio[v->currentAudioTrack].audioProps->NumSamples) {
count = v->audio[v->currentAudioTrack].audioProps->NumSamples - v->audioPosition - 1;
}
// Are we reading anything?
if (count > 0) {
// Get audio from video stream
if (FFMS_GetAudio(v->audio[v->currentAudioTrack].audioSource, v->audioBuffer, v->audioPosition, count, &v->errInfo)) utilDie("%s", v->errInfo.Buffer);
// Feed it to the mixer stream
if (SDL_AudioStreamPut(v->audioStream, v->audioBuffer, (int32_t)(count * v->audioSampleSize)) < 0) utilDie("%s", SDL_GetError());
v->audioPosition += count;
}
}
// Used to determine if we should play two frames rapidly to catch up to audio
v->audioDelta = labs((long)(v->audioPosition - (int64_t)((double)v->timestamp * 0.001 * (double)v->audio[v->currentAudioTrack].audioProps->SampleRate)));
// Did we trip the audio sync compensation?
if (v->audioDelta > threshold) {
v->frameDeltaTime *= 0.5;
//utilSay("Adjusting delta %f", v->frameDeltaTime);
/*
// Adjust frame rate to try and match
if (v->audioDelta > 0) {
v->audioAdjustment += 0.000001;
} else {
v->audioAdjustment -= 0.000001;
}
*/
}
//utilSay("D %ld T %ld A %f F %f", v->audioDelta, threshold, v->audioAdjustment, v->frameDeltaTime);
}
return result;
}

60
src/videoPlayer.h Normal file
View file

@ -0,0 +1,60 @@
/*
*
* Singe 2
* Copyright (C) 2006-2024 Scott Duensing <scott@kangaroopunch.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
*/
#ifndef VIDEOPLAYER_H
#define VIDEOPLAYER_H
#include <SDL2/SDL.h>
#include "common.h"
typedef void (*videoIndexingCallback)(int32_t);
int32_t videoInit(void);
int32_t videoIsPlaying(int32_t playerHandle);
int32_t videoGetAudioTrack(int32_t playerHandle);
int32_t videoGetAudioTracks(int32_t playerHandle);
int64_t videoGetFrame(int32_t playerHandle);
int64_t videoGetFrameCount(int32_t playerHandle);
int32_t videoGetHeight(int32_t playerHandle);
char *videoGetLanguage(int32_t playerHandle, int32_t audioTrack);
char *videoGetLanguageDescription(char *languageCode);
int32_t videoGetWidth(int32_t playerHandle);
int32_t videoGetVolume(int32_t playerHandle, int32_t *leftPercent, int32_t *rightPercent);
int32_t videoLoad(char *filename, char *indexPath, bool stretchVideo, SDL_Renderer *renderer);
int32_t videoLoadWithAudio(char *vFilename, char *aFilename, char *indexPath, bool stretchVideo, SDL_Renderer *renderer);
int32_t videoPause(int32_t playerHandle);
int32_t videoPlay(int32_t playerHandle);
int32_t videoQuit(void);
int32_t videoSeek(int32_t playerHandle, int64_t seekFrame);
int32_t videoSetAudioTrack(int32_t playerHandle, int32_t track);
int32_t videoSetIndexCallback(videoIndexingCallback callback);
int32_t videoSetVolume(int32_t playerHandle, int32_t leftPercent, int32_t rightPercent);
int32_t videoUnload(int32_t playerHandle);
int32_t videoUpdate(int32_t playerHandle, SDL_Texture **texture);
#endif // VIDEOPLAYER_H

90
thirdparty/SDL2/.clang-format vendored Normal file
View file

@ -0,0 +1,90 @@
---
AlignConsecutiveMacros: Consecutive
AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: None
AlignConsecutiveDeclarations: None
AlignEscapedNewlines: Right
AlignOperands: Align
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortEnumsOnASingleLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
# Custom brace breaking
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Never
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: false
BeforeElse: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
# Make the closing brace of container literals go to a new line
Cpp11BracedListStyle: false
# Never format includes
IncludeBlocks: Preserve
# clang-format version 4.0 through 12.0:
#SortIncludes: false
# clang-format version 13.0+:
#SortIncludes: Never
# No length limit, in case it breaks macros, you can
# disable it with /* clang-format off/on */ comments
ColumnLimit: 0
IndentWidth: 4
ContinuationIndentWidth: 4
IndentCaseLabels: false
IndentCaseBlocks: false
IndentGotoLabels: true
IndentPPDirectives: None
IndentExternBlock: NoIndent
PointerAlignment: Right
SpaceAfterCStyleCast: false
SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeParens: ControlStatements
SpaceAroundPointerQualifiers: Default
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
UseCRLF: false
UseTab: Never
ForEachMacros:
[
"spa_list_for_each",
"spa_list_for_each_safe",
"wl_list_for_each",
"wl_array_for_each",
"udev_list_entry_foreach",
]
---

79
thirdparty/SDL2/.editorconfig vendored Normal file
View file

@ -0,0 +1,79 @@
# For format see editorconfig.org
# Copyright 2022 Collabora Ltd.
# SPDX-License-Identifier: Zlib
root = true
[*.{c,cg,cpp,gradle,h,java,m,metal,pl,py,S,sh,txt}]
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.{html,js,json,m4,yml,yaml,vcxproj,vcxproj.filters}]
indent_size = 2
indent_style = space
[*.xml]
indent_size = 4
indent_style = space
[{CMakeLists.txt,sdl2-config*.cmake.in,cmake/*.cmake}]
indent_size = 2
indent_style = space
[{cmake_uninstall.cmake.in,test/CMakeLists.txt}]
indent_size = 4
indent_style = space
[configure.ac]
# Inconsistently 2-, 4- or occasionally 3-space indented, but mostly 4,
# so let's use 4 for new code
indent_size = 4
indent_style = space
[{Makefile.*,*.mk,*.sln,*.pbxproj,*.plist}]
indent_size = 8
indent_style = tab
tab_width = 8
[Makefile.os2]
indent_size = 4
indent_style = space
[test/Makefile.os2]
indent_size = 2
indent_style = space
[{src/core/os2/geniconv/makefile,src/core/os2/geniconv/os2cp.c}]
indent_size = 2
indent_style = space
[src/joystick/controller_type.*]
indent_style = tab
[src/joystick/hidapi/steam/*.h]
indent_style = tab
[src/libm/*.c]
indent_style = tab
[src/test/SDL_test_{crc32,md5,random}.c]
indent_size = 2
indent_style = space
[src/video/yuv2rgb/*.{c,h}]
indent_style = tab
[wayland-protocols/*.xml]
indent_size = 2
indent_style = space
[*.{markdown,md}]
indent_size = 4
indent_style = space
# Markdown syntax treats tabs as 4 spaces
tab_width = 4
[{*.bat,*.rc}]
end_of_line = crlf

188
thirdparty/SDL2/.gitignore vendored Normal file
View file

@ -0,0 +1,188 @@
aclocal.m4
autom4te*
config.cache
config.log
config.status
libtool
Makefile
Makefile.rules
sdl2-config
sdl2-config.cmake
sdl2-config-version.cmake
sdl2.pc
SDL2.spec
build
gen
Build
buildbot
/VERSION.txt
*.so
*.so.*
*.dll
*.exe
*.o
*.obj
*.res
*.lib
*.a
*.la
*.dSYM
*,e1f
*,ff8
*.lnk
*.err
*.exp
*.map
*.orig
*~
*.swp
*.tmp
*.rej
# for CMake
CMakeFiles/
CMakeCache.txt
cmake_install.cmake
cmake_uninstall.cmake
SDL2ConfigVersion.cmake
.ninja_*
*.ninja
# for CLion
.idea
cmake-build-*
# for Xcode
*.mode1*
*.perspective*
*.pbxuser
(^|/)build($|/)
.DS_Store
xcuserdata
*.xcworkspace
# for QtCreator
CMakeLists.txt.user
build*/
*.pro.user*
# for Visual C++
.vs
Debug
Release
*.user
*.ncb
*.suo
*.sdf
VisualC/tests/controllermap/axis.bmp
VisualC/tests/controllermap/button.bmp
VisualC/tests/controllermap/controllermap.bmp
VisualC/tests/controllermap/controllermap_back.bmp
VisualC/tests/loopwave/sample.wav
VisualC/tests/testautomation/CompareSurfaces0001_Reference.bmp
VisualC/tests/testautomation/CompareSurfaces0001_TestOutput.bmp
VisualC/tests/testgamecontroller/axis.bmp
VisualC/tests/testgamecontroller/button.bmp
VisualC/tests/testgamecontroller/controllermap.bmp
VisualC/tests/testgamecontroller/controllermap_back.bmp
VisualC/tests/testoverlay2/moose.dat
VisualC/tests/testrendertarget/icon.bmp
VisualC/tests/testrendertarget/sample.bmp
VisualC/tests/testscale/icon.bmp
VisualC/tests/testscale/sample.bmp
VisualC/tests/testsprite2/icon.bmp
VisualC/tests/testyuv/testyuv.bmp
VisualC/visualtest/icon.bmp
VisualC/visualtest/testquit.actions
VisualC/visualtest/testquit.config
VisualC/visualtest/testquit.exe
VisualC/visualtest/testquit.parameters
VisualC/visualtest/testsprite2.exe
VisualC/visualtest/testsprite2_sample.actions
VisualC/visualtest/testsprite2_sample.config
VisualC/visualtest/testsprite2_sample.parameters
VisualC-GDK/**/Layout
# for Android
android-project/local.properties
android-project/.gradle/
test/checkkeys
test/checkkeysthreads
test/controllermap
test/loopwave
test/loopwavequeue
test/testatomic
test/testaudiocapture
test/testaudiohotplug
test/testaudioinfo
test/testautomation
test/testbounds
test/testcustomcursor
test/testdisplayinfo
test/testdraw2
test/testdrawchessboard
test/testdropfile
test/testerror
test/testevdev
test/testfile
test/testfilesystem
test/testgamecontroller
test/testgeometry
test/testgesture
test/testgl2
test/testgles
test/testgles2
test/testhaptic
test/testhittesting
test/testhotplug
test/testiconv
test/testime
test/testintersections
test/testjoystick
test/testkeys
test/testloadso
test/testlocale
test/testlock
test/testmessage
test/testmouse
test/testmultiaudio
test/testnative
test/testoverlay2
test/testplatform
test/testpower
test/testqsort
test/testrelative
test/testrendercopyex
test/testrendertarget
test/testresample
test/testrumble
test/testscale
test/testsem
test/testsensor
test/testshader
test/testshape
test/testsprite2
test/testspriteminimal
test/teststreaming
test/testsurround
test/testthread
test/testtimer
test/testurl
test/testver
test/testviewport
test/testvulkan
test/testwm2
test/testyuv
test/torturethread
builddir/
!build-scripts/
debian/*.debhelper.log
debian/*.substvars
debian/*.tar.gz
debian/.debhelper/
debian/files
debian/libsdl*/
debian/tmp/

17
thirdparty/SDL2/.wikiheaders-options vendored Normal file
View file

@ -0,0 +1,17 @@
projectfullname = SDL2
projectshortname = SDL2
incsubdir = include
wikisubdir = SDL2
readmesubdir = docs
apiprefixregex = (SDL_|SDLK_|KMOD_|AUDIO_)
mainincludefname = SDL.h
versionfname = include/SDL_version.h
versionmajorregex = \A\#define\s+SDL_MAJOR_VERSION\s+(\d+)\Z
versionminorregex = \A\#define\s+SDL_MINOR_VERSION\s+(\d+)\Z
versionpatchregex = \A\#define\s+SDL_PATCHLEVEL\s+(\d+)\Z
selectheaderregex = \ASDL.*?\.h\Z
projecturl = https://libsdl.org/
wikiurl = https://wiki.libsdl.org/SDL2
bugreporturl = https://github.com/libsdl-org/sdlwiki/issues/new
warn_about_missing = 0
wikipreamble = (This is the legacy documentation for stable SDL2, the current stable version; [SDL3](https://wiki.libsdl.org/SDL3/) is the current development version.)

130
thirdparty/SDL2/Android.mk vendored Normal file
View file

@ -0,0 +1,130 @@
LOCAL_PATH := $(call my-dir)
###########################
#
# SDL shared library
#
###########################
include $(CLEAR_VARS)
LOCAL_MODULE := SDL2
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
LOCAL_SRC_FILES := \
$(subst $(LOCAL_PATH)/,, \
$(wildcard $(LOCAL_PATH)/src/*.c) \
$(wildcard $(LOCAL_PATH)/src/audio/*.c) \
$(wildcard $(LOCAL_PATH)/src/audio/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/audio/dummy/*.c) \
$(wildcard $(LOCAL_PATH)/src/audio/aaudio/*.c) \
$(wildcard $(LOCAL_PATH)/src/audio/openslES/*.c) \
$(LOCAL_PATH)/src/atomic/SDL_atomic.c.arm \
$(LOCAL_PATH)/src/atomic/SDL_spinlock.c.arm \
$(wildcard $(LOCAL_PATH)/src/core/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/cpuinfo/*.c) \
$(wildcard $(LOCAL_PATH)/src/dynapi/*.c) \
$(wildcard $(LOCAL_PATH)/src/events/*.c) \
$(wildcard $(LOCAL_PATH)/src/file/*.c) \
$(wildcard $(LOCAL_PATH)/src/haptic/*.c) \
$(wildcard $(LOCAL_PATH)/src/haptic/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/hidapi/*.c) \
$(wildcard $(LOCAL_PATH)/src/hidapi/android/*.cpp) \
$(wildcard $(LOCAL_PATH)/src/joystick/*.c) \
$(wildcard $(LOCAL_PATH)/src/joystick/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/joystick/hidapi/*.c) \
$(wildcard $(LOCAL_PATH)/src/joystick/virtual/*.c) \
$(wildcard $(LOCAL_PATH)/src/loadso/dlopen/*.c) \
$(wildcard $(LOCAL_PATH)/src/locale/*.c) \
$(wildcard $(LOCAL_PATH)/src/locale/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/misc/*.c) \
$(wildcard $(LOCAL_PATH)/src/misc/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/power/*.c) \
$(wildcard $(LOCAL_PATH)/src/power/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/filesystem/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/sensor/*.c) \
$(wildcard $(LOCAL_PATH)/src/sensor/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/render/*.c) \
$(wildcard $(LOCAL_PATH)/src/render/*/*.c) \
$(wildcard $(LOCAL_PATH)/src/stdlib/*.c) \
$(wildcard $(LOCAL_PATH)/src/thread/*.c) \
$(wildcard $(LOCAL_PATH)/src/thread/pthread/*.c) \
$(wildcard $(LOCAL_PATH)/src/timer/*.c) \
$(wildcard $(LOCAL_PATH)/src/timer/unix/*.c) \
$(wildcard $(LOCAL_PATH)/src/video/*.c) \
$(wildcard $(LOCAL_PATH)/src/video/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/video/yuv2rgb/*.c) \
$(wildcard $(LOCAL_PATH)/src/test/*.c))
LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES
LOCAL_CFLAGS += \
-Wall -Wextra \
-Wdocumentation \
-Wmissing-prototypes \
-Wunreachable-code-break \
-Wunneeded-internal-declaration \
-Wmissing-variable-declarations \
-Wfloat-conversion \
-Wshorten-64-to-32 \
-Wunreachable-code-return \
-Wshift-sign-overflow \
-Wstrict-prototypes \
-Wkeyword-macro \
# Warnings we haven't fixed (yet)
LOCAL_CFLAGS += -Wno-unused-parameter -Wno-sign-compare
LOCAL_CXXFLAGS += -std=gnu++11
LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid
LOCAL_LDFLAGS := -Wl,--no-undefined
ifeq ($(NDK_DEBUG),1)
cmd-strip :=
endif
LOCAL_STATIC_LIBRARIES := cpufeatures
include $(BUILD_SHARED_LIBRARY)
###########################
#
# SDL static library
#
###########################
LOCAL_MODULE := SDL2_static
LOCAL_MODULE_FILENAME := libSDL2
LOCAL_LDLIBS :=
LOCAL_LDFLAGS :=
LOCAL_EXPORT_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
include $(BUILD_STATIC_LIBRARY)
###########################
#
# SDL main static library
#
###########################
include $(CLEAR_VARS)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_MODULE := SDL2_main
LOCAL_MODULE_FILENAME := libSDL2main
include $(BUILD_STATIC_LIBRARY)
$(call import-module,android/cpufeatures)

16
thirdparty/SDL2/BUGS.txt vendored Normal file
View file

@ -0,0 +1,16 @@
Bugs are now managed in the SDL issue tracker, here:
https://github.com/libsdl-org/SDL/issues
You may report bugs there, and search to see if a given issue has already
been reported, discussed, and maybe even fixed.
You may also find help at the SDL forums/mailing list:
https://discourse.libsdl.org/
Bug reports are welcome here, but we really appreciate if you use the issue
tracker, as bugs discussed on the mailing list may be forgotten or missed.

3678
thirdparty/SDL2/CMakeLists.txt vendored Normal file

File diff suppressed because it is too large Load diff

53
thirdparty/SDL2/CREDITS.txt vendored Normal file
View file

@ -0,0 +1,53 @@
Simple DirectMedia Layer CREDITS
Thanks to everyone who made this possible, including:
* Cliff Matthews, for giving me a reason to start this project. :)
-- Executor rocks! *grin*
* Ryan Gordon for helping everybody out and keeping the dream alive. :)
* Gabriel Jacobo for his work on the Android port and generally helping out all around.
* Philipp Wiesemann for his attention to detail reviewing the entire SDL code base and proposes patches.
* Andreas Schiffler for his dedication to unit tests, Visual Studio projects, and managing the Google Summer of Code.
* Mike Sartain for incorporating SDL into Team Fortress 2 and cheering me on at Valve.
* Alfred Reynolds for the game controller API and general (in)sanity
* Jørgen Tjernø for numerous magical Mac OS X fixes.
* Pierre-Loup Griffais for his deep knowledge of OpenGL drivers.
* Julian Winter for the SDL 2.0 website.
* Sheena Smith for many months of great work on the SDL wiki creating the API documentation and style guides.
* Paul Hunkin for his port of SDL to Android during the Google Summer of Code 2010.
* Eli Gottlieb for his work on shaped windows during the Google Summer of Code 2010.
* Jim Grandpre for his work on multi-touch and gesture recognition during
the Google Summer of Code 2010.
* Edgar "bobbens" Simo for his force feedback API development during the
Google Summer of Code 2008.
* Aaron Wishnick for his work on audio resampling and pitch shifting during
the Google Summer of Code 2008.
* Holmes Futrell for his port of SDL to the iPhone and iPod Touch during the
Google Summer of Code 2008.
* Jon Atkins for SDL_image, SDL_mixer and SDL_net documentation.
* Everybody at Loki Software, Inc. for their great contributions!
And a big hand to everyone else who has contributed over the years.
THANKS! :)
-- Sam Lantinga <slouken@libsdl.org>

41
thirdparty/SDL2/INSTALL.txt vendored Normal file
View file

@ -0,0 +1,41 @@
To compile and install SDL:
1. Windows with Visual Studio:
* Read ./docs/README-visualc.md
Windows with gcc, either native or cross-compiling:
* Read the FAQ at https://wiki.libsdl.org/FAQWindows
* Run './configure; make; make install'
macOS with Xcode:
* Read docs/README-macosx.md
macOS from the command line:
* Run './configure; make; make install'
Linux and other UNIX systems:
* Run './configure; make; make install'
Android:
* Read docs/README-android.md
iOS:
* Read docs/README-ios.md
Using Cmake:
* Read docs/README-cmake.md
2. Look at the example programs in ./test, and check out the online
documentation at https://wiki.libsdl.org/
3. Join the SDL developer discussions, sign up on
https://discourse.libsdl.org/
and go to the development forum
https://discourse.libsdl.org/c/sdl-development/6
4. Sign up for the announcement list through the web interface:
https://www.libsdl.org/mailing-list.php
That's it!
Sam Lantinga <slouken@libsdl.org>

18
thirdparty/SDL2/LICENSE.txt vendored Normal file
View file

@ -0,0 +1,18 @@
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.

263
thirdparty/SDL2/Makefile.in vendored Normal file
View file

@ -0,0 +1,263 @@
# Makefile to build and install the SDL library
top_builddir = .
srcdir = @srcdir@
objects = build
gen = gen
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
includedir = @includedir@
datarootdir = @datarootdir@
datadir = @datadir@
auxdir = @ac_aux_dir@
distpath = $(srcdir)/..
distdir = SDL2-@SDL_VERSION@
distfile = $(distdir).tar.gz
@SET_MAKE@
SHELL = @SHELL@
CC = @CC@
CXX = @CXX@
INCLUDE = @INCLUDE@
CFLAGS = @BUILD_CFLAGS@
EXTRA_CFLAGS = @EXTRA_CFLAGS@
LDFLAGS = @BUILD_LDFLAGS@
EXTRA_LDFLAGS = @EXTRA_LDFLAGS@
LIBTOOL = @LIBTOOL@
INSTALL = @INSTALL@
FGREP = @FGREP@
AR = @AR@
RANLIB = @RANLIB@
RC = @RC@
LINKER = @LINKER@
LIBTOOLLINKERTAG = @LIBTOOLLINKERTAG@
SDL_VENDOR_INFO = @SDL_VENDOR_INFO@
TARGET = libSDL2.la
OBJECTS = @OBJECTS@
GEN_HEADERS = @GEN_HEADERS@
GEN_OBJECTS = @GEN_OBJECTS@
VERSION_OBJECTS = @VERSION_OBJECTS@
SDLMAIN_TARGET = libSDL2main.la
SDLMAIN_OBJECTS = @SDLMAIN_OBJECTS@
SDLTEST_TARGET = libSDL2_test.la
SDLTEST_OBJECTS = @SDLTEST_OBJECTS@
WAYLAND_SCANNER = @WAYLAND_SCANNER@
WAYLAND_SCANNER_CODE_MODE = @WAYLAND_SCANNER_CODE_MODE@
INSTALL_SDL2_CONFIG = @INSTALL_SDL2_CONFIG@
SRC_DIST = *.md *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.ac docs include Makefile.* mingw sdl2-config.cmake.in sdl2-config-version.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake.in src test VisualC VisualC-WinRT Xcode Xcode-iOS wayland-protocols
GEN_DIST = SDL2.spec
ifneq ($V,1)
RUN_CMD_AR = @echo " AR " $@;
RUN_CMD_CC = @echo " CC " $@;
RUN_CMD_CXX = @echo " CXX " $@;
RUN_CMD_LTLINK = @echo " LTLINK" $@;
RUN_CMD_RANLIB = @echo " RANLIB" $@;
RUN_CMD_RC = @echo " RC " $@;
RUN_CMD_GEN = @echo " GEN " $@;
LIBTOOL += --quiet
endif
HDRS = \
SDL.h \
SDL_assert.h \
SDL_atomic.h \
SDL_audio.h \
SDL_bits.h \
SDL_blendmode.h \
SDL_clipboard.h \
SDL_cpuinfo.h \
SDL_egl.h \
SDL_endian.h \
SDL_error.h \
SDL_events.h \
SDL_filesystem.h \
SDL_gamecontroller.h \
SDL_gesture.h \
SDL_guid.h \
SDL_haptic.h \
SDL_hidapi.h \
SDL_hints.h \
SDL_joystick.h \
SDL_keyboard.h \
SDL_keycode.h \
SDL_loadso.h \
SDL_locale.h \
SDL_log.h \
SDL_main.h \
SDL_messagebox.h \
SDL_metal.h \
SDL_misc.h \
SDL_mouse.h \
SDL_mutex.h \
SDL_name.h \
SDL_opengl.h \
SDL_opengl_glext.h \
SDL_opengles.h \
SDL_opengles2_gl2ext.h \
SDL_opengles2_gl2.h \
SDL_opengles2_gl2platform.h \
SDL_opengles2.h \
SDL_opengles2_khrplatform.h \
SDL_pixels.h \
SDL_platform.h \
SDL_power.h \
SDL_quit.h \
SDL_rect.h \
SDL_render.h \
SDL_rwops.h \
SDL_scancode.h \
SDL_sensor.h \
SDL_shape.h \
SDL_stdinc.h \
SDL_surface.h \
SDL_system.h \
SDL_syswm.h \
SDL_thread.h \
SDL_timer.h \
SDL_touch.h \
SDL_types.h \
SDL_version.h \
SDL_video.h \
SDL_vulkan.h \
begin_code.h \
close_code.h
SDLTEST_HDRS = $(shell ls $(srcdir)/include | $(FGREP) SDL_test)
LT_AGE = @LT_AGE@
LT_CURRENT = @LT_CURRENT@
LT_RELEASE = @LT_RELEASE@
LT_REVISION = @LT_REVISION@
LT_LDFLAGS = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
all: $(srcdir)/configure Makefile $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
$(srcdir)/configure: $(srcdir)/configure.ac
@echo "Warning, configure is out of date, please re-run autogen.sh"
Makefile: $(srcdir)/Makefile.in
$(SHELL) config.status $@
Makefile.in:;
$(objects)/.created:
$(SHELL) $(auxdir)/mkinstalldirs $(objects)
touch $@
update-revision:
$(SHELL) $(auxdir)/updaterev.sh --vendor "$(SDL_VENDOR_INFO)"
.PHONY: all update-revision install install-bin install-hdrs install-lib install-data uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data clean distclean dist $(OBJECTS:.lo=.d)
$(objects)/$(TARGET): $(GEN_HEADERS) $(GEN_OBJECTS) $(OBJECTS) $(VERSION_OBJECTS)
$(RUN_CMD_LTLINK)$(LIBTOOL) --tag=$(LIBTOOLLINKERTAG) --mode=link $(LINKER) -o $@ $(OBJECTS) $(GEN_OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
$(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
$(RUN_CMD_LTLINK)$(LIBTOOL) --tag=$(LIBTOOLLINKERTAG) --mode=link $(LINKER) -static -o $@ $(SDLMAIN_OBJECTS) -rpath $(libdir)
$(objects)/$(SDLTEST_TARGET): $(SDLTEST_OBJECTS)
$(RUN_CMD_LTLINK)$(LIBTOOL) --tag=$(LIBTOOLLINKERTAG) --mode=link $(LINKER) -static -o $@ $(SDLTEST_OBJECTS) -rpath $(libdir)
install: all install-bin install-hdrs install-lib install-data
install-bin:
ifeq ($(INSTALL_SDL2_CONFIG),TRUE)
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir)
$(INSTALL) -m 755 sdl2-config $(DESTDIR)$(bindir)/sdl2-config
endif
install-hdrs: update-revision
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL2
for file in $(HDRS) $(SDLTEST_HDRS); do \
$(INSTALL) -m 644 $(srcdir)/include/$$file $(DESTDIR)$(includedir)/SDL2/$$file; \
done
$(INSTALL) -m 644 include/SDL_config.h $(DESTDIR)$(includedir)/SDL2/SDL_config.h
if test -f include/SDL_revision.h; then \
$(INSTALL) -m 644 include/SDL_revision.h $(DESTDIR)$(includedir)/SDL2/SDL_revision.h; \
else \
$(INSTALL) -m 644 $(srcdir)/include/SDL_revision.h $(DESTDIR)$(includedir)/SDL2/SDL_revision.h; \
fi
install-lib: $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)
$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET)
$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(SDLTEST_TARGET) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
install-data:
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(datadir)/aclocal
$(INSTALL) -m 644 $(srcdir)/sdl2.m4 $(DESTDIR)$(datadir)/aclocal/sdl2.m4
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig
$(INSTALL) -m 644 sdl2.pc $(DESTDIR)$(libdir)/pkgconfig
ifeq ($(INSTALL_SDL2_CONFIG),TRUE)
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/cmake/SDL2
$(INSTALL) -m 644 sdl2-config.cmake $(DESTDIR)$(libdir)/cmake/SDL2
$(INSTALL) -m 644 sdl2-config-version.cmake $(DESTDIR)$(libdir)/cmake/SDL2
endif
uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data
uninstall-bin:
rm -f $(DESTDIR)$(bindir)/sdl2-config
uninstall-hdrs:
for file in $(HDRS) $(SDLTEST_HDRS); do \
rm -f $(DESTDIR)$(includedir)/SDL2/$$file; \
done
rm -f $(DESTDIR)$(includedir)/SDL2/SDL_config.h
rm -f $(DESTDIR)$(includedir)/SDL2/SDL_revision.h
-rmdir $(DESTDIR)$(includedir)/SDL2
uninstall-lib:
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(TARGET)
rm -f $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
rm -f $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
uninstall-data:
rm -f $(DESTDIR)$(datadir)/aclocal/sdl2.m4
rm -f $(DESTDIR)$(libdir)/pkgconfig/sdl2.pc
rm -f $(DESTDIR)$(libdir)/cmake/SDL2/sdl2-config.cmake
rm -f $(DESTDIR)$(libdir)/cmake/SDL2/sdl2-config-version.cmake
clean:
rm -rf $(objects)
rm -rf $(gen)
if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
distclean: clean
rm -f Makefile Makefile.rules sdl2-config
rm -f config.status config.cache config.log libtool
rm -rf $(srcdir)/autom4te*
find $(srcdir) \( \
-name '*~' -o \
-name '*.bak' -o \
-name '*.old' -o \
-name '*.rej' -o \
-name '*.orig' -o \
-name '.#*' \) \
-exec rm -f {} \;
if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
dist $(distfile):
$(SHELL) $(auxdir)/mkinstalldirs $(distdir)
(cd $(srcdir); tar cf - $(SRC_DIST)) | (cd $(distdir); tar xf -)
tar cf - $(GEN_DIST) | (cd $(distdir); tar xf -)
find $(distdir) \( \
-name '*~' -o \
-name '*.bak' -o \
-name '*.old' -o \
-name '*.rej' -o \
-name '*.orig' -o \
-name '.#*' \) \
-exec rm -f {} \;
if test -f $(distdir)/test/Makefile; then (cd $(distdir)/test && make distclean); fi
# Intentionally no vendor suffix: that's a property of the build, not the source
(cd $(distdir); $(srcdir)/build-scripts/updaterev.sh --dist)
tar cvf - $(distdir) | gzip --best >$(distfile)
rm -rf $(distdir)
rpm: $(distfile)
rpmbuild -ta $?

61
thirdparty/SDL2/Makefile.minimal vendored Normal file
View file

@ -0,0 +1,61 @@
# Makefile to build the SDL library
CPPFLAGS = -I./include
CFLAGS = -g -O2
AR = ar
RANLIB = ranlib
TARGET = libSDL2.a
TESTTARGET = libSDL2_test.a
SOURCES = \
src/*.c \
src/atomic/*.c \
src/audio/*.c \
src/audio/dummy/*.c \
src/cpuinfo/*.c \
src/events/*.c \
src/file/*.c \
src/haptic/*.c \
src/haptic/dummy/*.c \
src/hidapi/*.c \
src/joystick/*.c \
src/joystick/dummy/*.c \
src/loadso/dummy/*.c \
src/power/*.c \
src/filesystem/dummy/*.c \
src/locale/*.c \
src/locale/dummy/*.c \
src/misc/*.c \
src/misc/dummy/*.c \
src/render/*.c \
src/render/software/*.c \
src/sensor/*.c \
src/sensor/dummy/*.c \
src/stdlib/*.c \
src/libm/*.c \
src/thread/*.c \
src/thread/generic/*.c \
src/timer/*.c \
src/timer/dummy/*.c \
src/video/*.c \
src/video/yuv2rgb/*.c \
src/video/dummy/*.c \
TSOURCES = src/test/*.c
OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
TOBJECTS= $(shell echo $(TSOURCES) | sed -e 's,\.c,\.o,g')
all: $(TARGET) $(TESTTARGET)
$(TARGET): $(OBJECTS)
$(AR) crv $@ $^
$(RANLIB) $@
$(TESTTARGET): $(TOBJECTS)
$(AR) crv $@ $^
$(RANLIB) $@
clean:
rm -f $(TARGET) $(TESTTARGET) $(OBJECTS) $(TOBJECTS)

296
thirdparty/SDL2/Makefile.os2 vendored Normal file
View file

@ -0,0 +1,296 @@
# Open Watcom makefile to build SDL2.dll for OS/2
# wmake -f Makefile.os2
#
# If you have GNU libiconv installed (iconv2.dll), you
# can compile against it by specifying LIBICONV=1, e.g.:
# wmake -f Makefile.os2 LIBICONV=1
#
# If you have libusb-1.0 installed (usb100.dll, libusb.h), you
# can compile hidapi joystick support against it (experimental)
# by specifying HIDAPI=1, e.g.:
# wmake -f Makefile.os2 HIDAPI=1
#
# To error out upon warnings: wmake -f Makefile.os2 ENABLE_WERROR=1
LIBNAME = SDL2
MAJOR_VERSION = 2
MINOR_VERSION = 29
MICRO_VERSION = 0
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
DESCRIPTION = Simple DirectMedia Layer 2
LIBICONV=0
ICONVLIB=$(LIBICONV_LIB)
LIBHOME = .
DLLFILE = $(LIBHOME)/$(LIBNAME).dll
LIBFILE = $(LIBHOME)/$(LIBNAME).lib
LNKFILE = $(LIBNAME).lnk
INCPATH = -I"$(%WATCOM)/h/os2" -I"$(%WATCOM)/h"
INCPATH+= -Iinclude
LIBM = SDL2libm.lib
TLIB = SDL2test.lib
LIBS = mmpm2.lib $(LIBM)
CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oeatxhn -ei
# Debug options:
# - debug messages from OS/2 related code to stdout:
#CFLAGS+= -DOS2DEBUG
# - debug messages from OS/2 code via SDL_LogDebug():
#CFLAGS+= -DOS2DEBUG=2
# max warnings:
CFLAGS+= -wx
!ifeq ENABLE_WERROR 1
CFLAGS+= -we
!endif
# newer OpenWatcom versions enable W303 by default
CFLAGS+= -wcd=303
# the include paths :
CFLAGS+= $(INCPATH)
CFLAGS_STATIC=$(CFLAGS)
# building dll:
CFLAGS_DLL =$(CFLAGS)
CFLAGS_DLL+= -bd
# iconv:
LIBICONV_LIB=iconv2.lib
!ifeq LIBICONV 1
CFLAGS_DLL+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1
LIBS+= $(ICONVLIB)
!else
LIBS+= libuls.lib libconv.lib
!endif
# hidapi (libusb):
!ifeq HIDAPI 1
CFLAGS_DLL+= -DHAVE_LIBUSB_H=1
!endif
# building SDL itself (for DECLSPEC):
CFLAGS_DLL+= -DBUILD_SDL
CFLAGS_DLL+= -DSDL_BUILD_MAJOR_VERSION=$(MAJOR_VERSION)
CFLAGS_DLL+= -DSDL_BUILD_MINOR_VERSION=$(MINOR_VERSION)
CFLAGS_DLL+= -DSDL_BUILD_MICRO_VERSION=$(MICRO_VERSION)
SRCS = SDL.c SDL_assert.c SDL_error.c SDL_guid.c SDL_log.c SDL_dataqueue.c SDL_hints.c SDL_list.c SDL_utils.c
SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_qsort.c SDL_stdlib.c SDL_string.c SDL_strtokr.c SDL_crc16.c SDL_crc32.c
SRCS+= SDL_cpuinfo.c SDL_atomic.c SDL_spinlock.c SDL_thread.c SDL_timer.c
SRCS+= SDL_rwops.c SDL_power.c
SRCS+= SDL_audio.c SDL_audiocvt.c SDL_audiodev.c SDL_audiotypecvt.c SDL_mixer.c SDL_wave.c
SRCS+= SDL_events.c SDL_quit.c SDL_keyboard.c SDL_mouse.c SDL_windowevents.c &
SDL_clipboardevents.c SDL_dropevents.c SDL_displayevents.c SDL_gesture.c &
SDL_sensor.c SDL_touch.c
SRCS+= SDL_haptic.c SDL_hidapi.c SDL_gamecontroller.c SDL_joystick.c controller_type.c
SRCS+= SDL_render.c yuv_rgb.c SDL_yuv.c SDL_yuv_sw.c SDL_blendfillrect.c &
SDL_blendline.c SDL_blendpoint.c SDL_drawline.c SDL_drawpoint.c &
SDL_render_sw.c SDL_rotate.c SDL_triangle.c
SRCS+= SDL_blit.c SDL_blit_0.c SDL_blit_1.c SDL_blit_A.c SDL_blit_auto.c &
SDL_blit_copy.c SDL_blit_N.c SDL_blit_slow.c SDL_fillrect.c SDL_bmp.c &
SDL_pixels.c SDL_rect.c SDL_RLEaccel.c SDL_shape.c SDL_stretch.c &
SDL_surface.c SDL_video.c SDL_clipboard.c SDL_vulkan_utils.c SDL_egl.c
SRCS+= SDL_syscond.c SDL_sysmutex.c SDL_syssem.c SDL_systhread.c SDL_systls.c
SRCS+= SDL_systimer.c
SRCS+= SDL_sysloadso.c
SRCS+= SDL_sysfilesystem.c
SRCS+= SDL_os2joystick.c SDL_syshaptic.c SDL_sysjoystick.c SDL_virtualjoystick.c
SRCS+= SDL_hidapijoystick.c SDL_hidapi_rumble.c SDL_hidapi_combined.c SDL_hidapi_gamecube.c SDL_hidapi_luna.c SDL_hidapi_ps3.c SDL_hidapi_ps4.c SDL_hidapi_ps5.c SDL_hidapi_shield.c SDL_hidapi_stadia.c SDL_hidapi_switch.c SDL_hidapi_wii.c SDL_hidapi_xbox360.c SDL_hidapi_xbox360w.c SDL_hidapi_xboxone.c SDL_hidapi_steam.c
SRCS+= SDL_dummyaudio.c SDL_diskaudio.c
SRCS+= SDL_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c
SRCS+= SDL_dummysensor.c
SRCS+= SDL_locale.c SDL_syslocale.c
SRCS+= SDL_url.c SDL_sysurl.c
SRCS+= SDL_os2.c
!ifeq LIBICONV 0
SRCS+= geniconv.c os2cp.c os2iconv.c sys2utf8.c
!endif
SRCS+= SDL_os2audio.c
SRCS+= SDL_os2video.c SDL_os2util.c SDL_os2dive.c SDL_os2vman.c &
SDL_os2mouse.c SDL_os2messagebox.c
SRCS+= SDL_dynapi.c
OBJS = $(SRCS:.c=.obj)
.extensions:
.extensions: .lib .dll .obj .c .asm
.c: ./src;./src/dynapi;./src/audio;./src/cpuinfo;./src/events;./src/file;./src/haptic;./src/joystick;./src/power;./src/render;./src/render/software;./src/sensor;./src/stdlib;./src/thread;./src/timer;./src/video;./src/video/yuv2rgb;./src/atomic;./src/audio/disk;
.c: ./src/haptic/dummy;./src/joystick/dummy;./src/joystick/virtual;./src/audio/dummy;./src/video/dummy;./src/sensor/dummy;
.c: ./src/core/os2;./src/audio/os2;./src/loadso/os2;./src/filesystem/os2;./src/joystick/os2;./src/thread/os2;./src/timer/os2;./src/video/os2;
.c: ./src/core/os2/geniconv;
.c: ./src/locale/;./src/locale/unix;./src/misc;./src/misc/dummy;./src/joystick/hidapi;./src/hidapi
all: $(DLLFILE) $(LIBFILE) $(TLIB) .symbolic
build_dll: .symbolic
@echo * Compiling dll objects
$(DLLFILE): build_dll $(OBJS) $(LIBM) $(LIBICONV_LIB) $(LNKFILE)
@echo * Linking: $@
wlink @$(LNKFILE)
$(LIBFILE): $(DLLFILE)
@echo * Creating LIB file: $@
wlib -q -b -n -c -pa -s -t -zld -ii -io $* $(DLLFILE)
.c.obj:
wcc386 $(CFLAGS_DLL) -fo=$^@ $<
SDL_syscond.obj: "src/thread/generic/SDL_syscond.c"
wcc386 $(CFLAGS_DLL) -fo=$^@ $<
SDL_cpuinfo.obj: SDL_cpuinfo.c
wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
SDL_wave.obj: SDL_wave.c
wcc386 $(CFLAGS_DLL) -wcd=124 -fo=$^@ $<
SDL_blendfillrect.obj: SDL_blendfillrect.c
wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
SDL_blendline.obj: SDL_blendline.c
wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
SDL_blendpoint.obj: SDL_blendpoint.c
wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
SDL_RLEaccel.obj: SDL_RLEaccel.c
wcc386 $(CFLAGS_DLL) -wcd=201 -fo=$^@ $<
!ifeq HIDAPI 1
# c99 mode needed because of structs with flexible array members in libusb.h
SDL_hidapi.obj: SDL_hidapi.c
wcc386 $(CFLAGS_DLL) -za99 -fo=$^@ $<
!endif
$(LIBICONV_LIB): "src/core/os2/iconv2.lbc"
@echo * Creating: $@
wlib -q -b -n -c -pa -s -t -zld -ii -io $@ @$<
# SDL2libm
MSRCS= e_atan2.c e_exp.c e_fmod.c e_log10.c e_log.c e_pow.c e_rem_pio2.c e_sqrt.c &
k_cos.c k_rem_pio2.c k_sin.c k_tan.c &
s_atan.c s_copysign.c s_cos.c s_fabs.c s_floor.c s_scalbn.c s_sin.c s_tan.c
MOBJS= $(MSRCS:.c=.obj)
.c: ./src/libm;
e_atan2.obj: e_atan2.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
e_exp.obj: e_exp.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
e_fmod.obj: e_fmod.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
e_log10.obj: e_log10.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
e_log.obj: e_log.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
e_pow.obj: e_pow.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
e_rem_pio2.obj: e_rem_pio2.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
e_sqrt.obj: e_sqrt.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
k_cos.obj: k_cos.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
k_rem_pio2.obj: k_rem_pio2.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
k_sin.obj: k_sin.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
k_tan.obj: k_tan.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
s_atan.obj: s_atan.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
s_copysign.obj: s_copysign.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
s_cos.obj: s_cos.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
s_fabs.obj: s_fabs.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
s_floor.obj: s_floor.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
s_scalbn.obj: s_scalbn.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
s_sin.obj: s_sin.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
s_tan.obj: s_tan.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
build_libm: .symbolic
@echo * Compiling libm objects
$(LIBM): build_libm $(MOBJS)
@echo * Creating: $@
wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(MOBJS)
# SDL2test
TSRCS = SDL_test_assert.c SDL_test_common.c SDL_test_compare.c &
SDL_test_crc32.c SDL_test_font.c SDL_test_fuzzer.c SDL_test_harness.c &
SDL_test_imageBlit.c SDL_test_imageBlitBlend.c SDL_test_imageFace.c &
SDL_test_imagePrimitives.c SDL_test_imagePrimitivesBlend.c &
SDL_test_log.c SDL_test_md5.c SDL_test_random.c SDL_test_memory.c
TOBJS= $(TSRCS:.c=.obj)
.c: ./src/test;
SDL_test_assert.obj: SDL_test_assert.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_common.obj: SDL_test_common.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_compare.obj: SDL_test_compare.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_crc32.obj: SDL_test_crc32.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_font.obj: SDL_test_font.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_fuzzer.obj: SDL_test_fuzzer.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_harness.obj: SDL_test_harness.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_imageBlit.obj: SDL_test_imageBlit.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_imageBlitBlend.obj: SDL_test_imageBlitBlend.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_imageFace.obj: SDL_test_imageFace.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_imagePrimitives.obj: SDL_test_imagePrimitives.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_imagePrimitivesBlend.obj: SDL_test_imagePrimitivesBlend.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_log.obj: SDL_test_log.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_md5.obj: SDL_test_md5.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_random.obj: SDL_test_random.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_memory.obj: SDL_test_memory.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
build_tlib: .symbolic
@echo * Compiling testlib objects
$(TLIB): build_tlib $(TOBJS)
@echo * Creating: $@
wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(TOBJS)
$(LNKFILE):
@echo * Creating linker file: $@
@%create $@
@%append $@ SYSTEM os2v2_dll INITINSTANCE TERMINSTANCE
@%append $@ NAME $(DLLFILE)
@for %i in ($(OBJS)) do @%append $@ FILE %i
@for %i in ($(LIBS)) do @%append $@ LIB %i
@%append $@ OPTION QUIET
@%append $@ OPTION IMPF=$(LIBHOME)/$^&.exp
@%append $@ OPTION MAP=$(LIBHOME)/$^&.map
@%append $@ OPTION DESCRIPTION '@$#libsdl org:$(VERSION)$#@$(DESCRIPTION)'
@%append $@ OPTION ELIMINATE
@%append $@ OPTION MANYAUTODATA
@%append $@ OPTION OSNAME='OS/2 and eComStation'
@%append $@ OPTION SHOWDEAD
clean: .SYMBOLIC
@echo * Clean: $(LIBNAME)
@if exist *.obj rm *.obj
@if exist *.err rm *.err
@if exist $(LNKFILE) rm $(LNKFILE)
@if exist $(LIBM) rm $(LIBM)
@if exist $(LIBICONV_LIB) rm $(LIBICONV_LIB)
distclean: .SYMBOLIC clean
@if exist $(LIBHOME)/*.exp rm $(LIBHOME)/*.exp
@if exist $(LIBHOME)/*.map rm $(LIBHOME)/*.map
@if exist $(LIBFILE) rm $(LIBFILE)
@if exist $(DLLFILE) rm $(DLLFILE)
@if exist $(TLIB) rm $(TLIB)

64
thirdparty/SDL2/Makefile.pandora vendored Normal file
View file

@ -0,0 +1,64 @@
# Makefile to build the pandora SDL library
AR = arm-none-linux-gnueabi-ar
RANLIB = arm-none-linux-gnueabi-ranlib
CC = arm-none-linux-gnueabi-gcc
CXX = arm-none-linux-gnueabi-g++
STRIP = arm-none-linux-gnueabi-strip
CFLAGS = -O3 -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfloat-abi=softfp \
-mfpu=neon -ftree-vectorize -ffast-math -fomit-frame-pointer -fno-strict-aliasing -fsingle-precision-constant \
-I./include -I$(PNDSDK)/usr/include
TARGET = libSDL2.a
SOURCES =
./src/*.c \
./src/atomic/*.c \
./src/audio/*.c \
./src/audio/disk/*.c \
./src/audio/dsp/*.c \
./src/audio/dummy/*.c \
./src/cpuinfo/*.c \
./src/events/*.c \
./src/file/*.c \
./src/filesystem/unix/*.c \
./src/haptic/*.c \
./src/haptic/linux/*.c \
./src/hidapi/*.c \
./src/joystick/*.c \
./src/joystick/linux/*.c \
./src/loadso/dlopen/*.c \
./src/locale/*.c \
./src/locale/unix/*.c \
./src/misc/*.c \
./src/misc/unix/*.c \
./src/power/*.c \
./src/sensor/*.c \
./src/sensor/dummy/*.c \
./src/stdlib/*.c \
./src/thread/*.c \
./src/thread/pthread/SDL_syscond.c \
./src/thread/pthread/SDL_sysmutex.c \
./src/thread/pthread/SDL_syssem.c \
./src/thread/pthread/SDL_systhread.c \
./src/timer/*.c \
./src/timer/unix/*.c \
./src/video/*.c \
./src/video/yuv2rgb/*.c \
./src/video/dummy/*.c \
./src/video/x11/*.c \
./src/video/pandora/*.c
OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
CONFIG_H = $(shell cp include/SDL_config_pandora.h include/SDL_config.h)
all: $(TARGET)
$(TARGET): $(CONFIG_H) $(OBJECTS)
$(AR) crv $@ $^
$(RANLIB) $@
clean:
rm -f $(TARGET) $(OBJECTS)

280
thirdparty/SDL2/Makefile.w32 vendored Normal file
View file

@ -0,0 +1,280 @@
# Open Watcom makefile to build SDL2.dll for Win32
# wmake -f Makefile.w32
#
# To error out upon warnings: wmake -f Makefile.w32 ENABLE_WERROR=1
LIBNAME = SDL2
MAJOR_VERSION = 2
MINOR_VERSION = 29
MICRO_VERSION = 0
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
LIBHOME = .
DLLFILE = $(LIBHOME)/$(LIBNAME).dll
LIBFILE = $(LIBHOME)/$(LIBNAME).lib
EXPFILE = $(LIBHOME)/$(LIBNAME).exp
LNKFILE = $(LIBNAME).lnk
INCPATH = -I"$(%WATCOM)/h/nt" -I"$(%WATCOM)/h/nt/directx" -I"$(%WATCOM)/h"
INCPATH+= -Iinclude
INCPATH+= -I"src/video/khronos"
LIBM = SDL2libm.lib
TLIB = SDL2test.lib
# user32.lib, gdi32.lib, ole32.lib and oleaut32.lib are actually
# among the default libraries in wlink.lnk for nt_dll linkage...
LIBS = user32.lib gdi32.lib winmm.lib imm32.lib ole32.lib oleaut32.lib shell32.lib setupapi.lib version.lib uuid.lib dxguid.lib $(LIBM)
CFLAGS = -bt=nt -d0 -q -bm -5s -fp5 -fpi87 -sg -oeatxhn -ei
# max warnings:
CFLAGS+= -wx
!ifeq ENABLE_WERROR 1
CFLAGS+= -we
!endif
# newer OpenWatcom versions enable W303 by default
CFLAGS+= -wcd=303
# new vulkan headers result in lots of W202 warnings
CFLAGS+= -wcd=202
# the include paths :
CFLAGS+= $(INCPATH)
CFLAGS_STATIC=$(CFLAGS)
# building dll:
CFLAGS_DLL =$(CFLAGS)
CFLAGS_DLL+= -bd
# we override the DECLSPEC define in begin_code.h, because we are using
# an exports file to remove the _cdecl '_' prefix from the symbol names
CFLAGS_DLL+= -DDECLSPEC=
CFLAGS_DLL+= -DSDL_BUILD_MAJOR_VERSION=$(MAJOR_VERSION)
CFLAGS_DLL+= -DSDL_BUILD_MINOR_VERSION=$(MINOR_VERSION)
CFLAGS_DLL+= -DSDL_BUILD_MICRO_VERSION=$(MICRO_VERSION)
RCFLAGS = -q -r -bt=nt $(INCPATH)
SRCS = SDL.c SDL_assert.c SDL_error.c SDL_guid.c SDL_log.c SDL_dataqueue.c SDL_hints.c SDL_list.c SDL_utils.c
SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_qsort.c SDL_stdlib.c SDL_string.c SDL_strtokr.c SDL_crc16.c SDL_crc32.c
SRCS+= SDL_cpuinfo.c SDL_atomic.c SDL_spinlock.c SDL_thread.c SDL_timer.c
SRCS+= SDL_rwops.c SDL_power.c
SRCS+= SDL_audio.c SDL_audiocvt.c SDL_audiodev.c SDL_audiotypecvt.c SDL_mixer.c SDL_wave.c
SRCS+= SDL_events.c SDL_quit.c SDL_keyboard.c SDL_mouse.c SDL_windowevents.c &
SDL_clipboardevents.c SDL_dropevents.c SDL_displayevents.c SDL_gesture.c &
SDL_sensor.c SDL_touch.c
SRCS+= SDL_haptic.c SDL_hidapi.c SDL_gamecontroller.c SDL_joystick.c controller_type.c
SRCS+= SDL_render.c yuv_rgb.c SDL_yuv.c SDL_yuv_sw.c SDL_blendfillrect.c &
SDL_blendline.c SDL_blendpoint.c SDL_drawline.c SDL_drawpoint.c &
SDL_render_sw.c SDL_rotate.c SDL_triangle.c
SRCS+= SDL_blit.c SDL_blit_0.c SDL_blit_1.c SDL_blit_A.c SDL_blit_auto.c &
SDL_blit_copy.c SDL_blit_N.c SDL_blit_slow.c SDL_fillrect.c SDL_bmp.c &
SDL_pixels.c SDL_rect.c SDL_RLEaccel.c SDL_shape.c SDL_stretch.c &
SDL_surface.c SDL_video.c SDL_clipboard.c SDL_vulkan_utils.c SDL_egl.c
SRCS+= SDL_syscond.c SDL_sysmutex.c SDL_syssem.c SDL_systhread.c SDL_systls.c
SRCS+= SDL_systimer.c
SRCS+= SDL_sysloadso.c
SRCS+= SDL_sysfilesystem.c
SRCS+= SDL_syshaptic.c SDL_sysjoystick.c SDL_virtualjoystick.c
SRCS+= SDL_hidapijoystick.c SDL_hidapi_rumble.c SDL_hidapi_combined.c SDL_hidapi_gamecube.c SDL_hidapi_luna.c SDL_hidapi_ps3.c SDL_hidapi_ps4.c SDL_hidapi_ps5.c SDL_hidapi_shield.c SDL_hidapi_stadia.c SDL_hidapi_switch.c SDL_hidapi_wii.c SDL_hidapi_xbox360.c SDL_hidapi_xbox360w.c SDL_hidapi_xboxone.c SDL_hidapi_steam.c
SRCS+= SDL_dummyaudio.c SDL_diskaudio.c
SRCS+= SDL_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c
SRCS+= SDL_dummysensor.c
SRCS+= SDL_locale.c SDL_syslocale.c
SRCS+= SDL_url.c SDL_sysurl.c
SRCS+= SDL_winmm.c SDL_directsound.c SDL_wasapi.c SDL_wasapi_win32.c
SRCS+= SDL_hid.c SDL_immdevice.c SDL_windows.c SDL_xinput.c
SRCS+= SDL_dinputhaptic.c SDL_windowshaptic.c SDL_xinputhaptic.c
SRCS+= SDL_dinputjoystick.c SDL_rawinputjoystick.c SDL_windowsjoystick.c SDL_windows_gaming_input.c SDL_xinputjoystick.c
SRCS+= SDL_syspower.c
SRCS+= SDL_d3dmath.c
SRCS+= SDL_render_d3d.c SDL_shaders_d3d.c
SRCS+= SDL_render_d3d11.c SDL_shaders_d3d11.c
SRCS+= SDL_render_d3d12.c SDL_shaders_d3d12.c
SRCS+= SDL_render_gl.c SDL_shaders_gl.c
SRCS+= SDL_render_gles2.c SDL_shaders_gles2.c
SRCS+= SDL_windowssensor.c
SRCS+= SDL_syscond_cv.c
SRCS+= SDL_windowsclipboard.c SDL_windowsevents.c SDL_windowsframebuffer.c SDL_windowskeyboard.c SDL_windowsmessagebox.c SDL_windowsmodes.c SDL_windowsmouse.c SDL_windowsopengl.c SDL_windowsopengles.c SDL_windowsshape.c SDL_windowsvideo.c SDL_windowsvulkan.c SDL_windowswindow.c
SRCS+= SDL_dynapi.c
RCSRCS = version.rc
OBJS = $(SRCS:.c=.obj)
RCOBJS= $(RCSRCS:.rc=.res)
.extensions:
.extensions: .lib .dll .obj .res .c .rc .asm
.c: ./src;./src/dynapi;./src/audio;./src/cpuinfo;./src/events;./src/file;./src/haptic;./src/joystick;./src/power;./src/render;./src/render/software;./src/sensor;./src/stdlib;./src/thread;./src/timer;./src/video;./src/video/yuv2rgb;./src/atomic;./src/audio/disk;
.c: ./src/haptic/dummy;./src/joystick/dummy;./src/joystick/virtual;./src/audio/dummy;./src/video/dummy;./src/sensor/dummy;
.c: ./src/core/windows;./src/audio/winmm;./src/audio/directsound;./src/audio/wasapi;./src/loadso/windows;./src/filesystem/windows;./src/haptic/windows;./src/joystick/windows;./src/sensor/windows;./src/thread/windows;./src/timer/windows;./src/video/windows;
.c: ./src/locale/;./src/locale/windows;./src/misc;./src/misc/windows;./src/power/windows;./src/joystick/hidapi;./src/hidapi;./src/render/direct3d;./src/render/direct3d11;./src/render/direct3d12;./src/render/opengl;./src/render/opengles2
.rc: ./src/main/windows
all: $(DLLFILE) $(LIBFILE) $(TLIB) .symbolic
build_dll: .symbolic
@echo * Compiling dll objects
$(DLLFILE): build_dll $(OBJS) $(LIBM) $(RCOBJS) $(LNKFILE)
@echo * Linking: $@
wlink @$(LNKFILE)
$(LIBFILE): $(DLLFILE)
@echo * Creating LIB file: $@
wlib -q -b -n -c -pa -s -t -zld -ii -io $* @$(EXPFILE)
.c.obj:
wcc386 $(CFLAGS_DLL) -fo=$^@ $<
.rc.res:
wrc $(RCFLAGS) -fo=$^@ $<
SDL_syscond.obj: "src/thread/generic/SDL_syscond.c"
wcc386 $(CFLAGS_DLL) -fo=$^@ $<
SDL_cpuinfo.obj: SDL_cpuinfo.c
wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
SDL_wave.obj: SDL_wave.c
wcc386 $(CFLAGS_DLL) -wcd=124 -fo=$^@ $<
SDL_blendfillrect.obj: SDL_blendfillrect.c
wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
SDL_blendline.obj: SDL_blendline.c
wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
SDL_blendpoint.obj: SDL_blendpoint.c
wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
SDL_RLEaccel.obj: SDL_RLEaccel.c
wcc386 $(CFLAGS_DLL) -wcd=201 -fo=$^@ $<
SDL_malloc.obj: SDL_malloc.c
wcc386 $(CFLAGS_DLL) -wcd=201 -fo=$^@ $<
# SDL2libm
MSRCS= e_atan2.c e_exp.c e_fmod.c e_log10.c e_log.c e_pow.c e_rem_pio2.c e_sqrt.c &
k_cos.c k_rem_pio2.c k_sin.c k_tan.c &
s_atan.c s_copysign.c s_cos.c s_fabs.c s_floor.c s_scalbn.c s_sin.c s_tan.c
MOBJS= $(MSRCS:.c=.obj)
.c: ./src/libm;
e_atan2.obj: e_atan2.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
e_exp.obj: e_exp.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
e_fmod.obj: e_fmod.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
e_log10.obj: e_log10.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
e_log.obj: e_log.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
e_pow.obj: e_pow.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
e_rem_pio2.obj: e_rem_pio2.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
e_sqrt.obj: e_sqrt.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
k_cos.obj: k_cos.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
k_rem_pio2.obj: k_rem_pio2.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
k_sin.obj: k_sin.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
k_tan.obj: k_tan.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
s_atan.obj: s_atan.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
s_copysign.obj: s_copysign.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
s_cos.obj: s_cos.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
s_fabs.obj: s_fabs.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
s_floor.obj: s_floor.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
s_scalbn.obj: s_scalbn.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
s_sin.obj: s_sin.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
s_tan.obj: s_tan.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
build_libm: .symbolic
@echo * Compiling libm objects
$(LIBM): build_libm $(MOBJS)
@echo * Creating: $@
wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(MOBJS)
# SDL2test
TSRCS = SDL_test_assert.c SDL_test_common.c SDL_test_compare.c &
SDL_test_crc32.c SDL_test_font.c SDL_test_fuzzer.c SDL_test_harness.c &
SDL_test_imageBlit.c SDL_test_imageBlitBlend.c SDL_test_imageFace.c &
SDL_test_imagePrimitives.c SDL_test_imagePrimitivesBlend.c &
SDL_test_log.c SDL_test_md5.c SDL_test_random.c SDL_test_memory.c
TOBJS= $(TSRCS:.c=.obj)
.c: ./src/test;
SDL_test_assert.obj: SDL_test_assert.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_common.obj: SDL_test_common.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_compare.obj: SDL_test_compare.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_crc32.obj: SDL_test_crc32.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_font.obj: SDL_test_font.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_fuzzer.obj: SDL_test_fuzzer.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_harness.obj: SDL_test_harness.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_imageBlit.obj: SDL_test_imageBlit.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_imageBlitBlend.obj: SDL_test_imageBlitBlend.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_imageFace.obj: SDL_test_imageFace.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_imagePrimitives.obj: SDL_test_imagePrimitives.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_imagePrimitivesBlend.obj: SDL_test_imagePrimitivesBlend.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_log.obj: SDL_test_log.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_md5.obj: SDL_test_md5.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_random.obj: SDL_test_random.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
SDL_test_memory.obj: SDL_test_memory.c
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
build_tlib: .symbolic
@echo * Compiling testlib objects
$(TLIB): build_tlib $(TOBJS)
@echo * Creating: $@
wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(TOBJS)
$(LNKFILE): Makefile.w32
@echo * Creating linker file: $@
@%create $@
@%append $@ SYSTEM nt_dll INITINSTANCE TERMINSTANCE
@%append $@ NAME $(DLLFILE)
@for %i in ($(OBJS)) do @%append $@ FILE %i
@for %i in ($(LIBS)) do @%append $@ LIB %i
@%append $@ OPTION RESOURCE=$(RCOBJS)
@%append $@ EXPORT=src/dynapi/SDL2.exports
@%append $@ OPTION QUIET
@%append $@ OPTION IMPF=$(EXPFILE)
@%append $@ OPTION MAP=$(LIBHOME)/$^&.map
@%append $@ OPTION ELIMINATE
@%append $@ OPTION SHOWDEAD
clean: .SYMBOLIC
@echo * Clean: $(LIBNAME)
@if exist *.obj rm *.obj
@if exist *.res rm *.res
@if exist *.err rm *.err
@if exist $(LNKFILE) rm $(LNKFILE)
@if exist $(LIBM) rm $(LIBM)
distclean: .SYMBOLIC clean
@if exist $(LIBHOME)/*.exp rm $(LIBHOME)/*.exp
@if exist $(LIBHOME)/*.map rm $(LIBHOME)/*.map
@if exist $(LIBFILE) rm $(LIBFILE)
@if exist $(DLLFILE) rm $(DLLFILE)
@if exist $(TLIB) rm $(TLIB)

13
thirdparty/SDL2/README-SDL.txt vendored Normal file
View file

@ -0,0 +1,13 @@
Please distribute this file with the SDL runtime environment:
The Simple DirectMedia Layer (SDL for short) is a cross-platform library
designed to make it easy to write multi-media software, such as games
and emulators.
The Simple DirectMedia Layer library source code is available from:
https://www.libsdl.org/
This library is distributed under the terms of the zlib license:
http://www.zlib.net/zlib_license.html

17
thirdparty/SDL2/README.md vendored Normal file
View file

@ -0,0 +1,17 @@
# Simple DirectMedia Layer (SDL) Version 2.0
https://www.libsdl.org/
Simple DirectMedia Layer is a cross-platform development library designed
to provide low level access to audio, keyboard, mouse, joystick, and graphics
hardware via OpenGL and Direct3D. It is used by video playback software,
emulators, and popular games including Valve's award winning catalog
and many Humble Bundle games.
More extensive documentation is available in the docs directory, starting
with README.md
Enjoy!
Sam Lantinga (slouken@libsdl.org)

119
thirdparty/SDL2/SDL2.spec.in vendored Normal file
View file

@ -0,0 +1,119 @@
Summary: Simple DirectMedia Layer
Name: SDL2
Version: @SDL_VERSION@
Release: 2
Source: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
URL: http://www.libsdl.org/
License: zlib
Group: System Environment/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
Prefix: %{_prefix}
%ifos linux
Provides: libSDL2-2.0.so.0
%endif
%define __defattr %defattr(-,root,root)
%define __soext so
%description
This is the Simple DirectMedia Layer, a generic API that provides low
level access to audio, keyboard, mouse, and display framebuffer across
multiple platforms.
%package devel
Summary: Libraries, includes and more to develop SDL applications.
Group: Development/Libraries
Requires: %{name} = %{version}
%description devel
This is the Simple DirectMedia Layer, a generic API that provides low
level access to audio, keyboard, mouse, and display framebuffer across
multiple platforms.
This is the libraries, include files and other resources you can use
to develop SDL applications.
%prep
%setup -q
%build
%ifos linux
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} --disable-video-directfb
%else
%configure
%endif
make
%install
rm -rf $RPM_BUILD_ROOT
%ifos linux
make install prefix=$RPM_BUILD_ROOT%{prefix} \
bindir=$RPM_BUILD_ROOT%{_bindir} \
libdir=$RPM_BUILD_ROOT%{_libdir} \
includedir=$RPM_BUILD_ROOT%{_includedir} \
datadir=$RPM_BUILD_ROOT%{_datadir} \
mandir=$RPM_BUILD_ROOT%{_mandir}
%else
%makeinstall
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%files
%{__defattr}
%doc README*.txt LICENSE.txt CREDITS.txt BUGS.txt
%{_libdir}/lib*.%{__soext}.*
%files devel
%{__defattr}
%doc docs/README*.md
%{_bindir}/*-config
%{_libdir}/lib*.a
%{_libdir}/lib*.la
%{_libdir}/lib*.%{__soext}
%{_includedir}/*/*.h
%{_libdir}/cmake/*
%{_libdir}/pkgconfig/SDL2/*
%{_datadir}/aclocal/*
%changelog
* Thu Jun 04 2015 Ryan C. Gordon <icculus@icculus.org>
- Fixed README paths.
* Sun Dec 07 2014 Simone Contini <s.contini@oltrelinux.com>
- Fixed changelog date issue and docs filenames
* Sun Jan 22 2012 Sam Lantinga <slouken@libsdl.org>
- Updated for SDL 2.0
* Tue May 16 2006 Sam Lantinga <slouken@libsdl.org>
- Removed support for Darwin, due to build problems on ps2linux
* Sat Jan 03 2004 Anders Bjorklund <afb@algonet.se>
- Added support for Darwin, updated spec file
* Wed Jan 19 2000 Sam Lantinga <slouken@libsdl.org>
- Re-integrated spec file into SDL distribution
- 'name' and 'version' come from configure
- Some of the documentation is devel specific
- Removed SMP support from %build - it doesn't work with libtool anyway
* Tue Jan 18 2000 Hakan Tandogan <hakan@iconsult.com>
- Hacked Mandrake sdl spec to build 1.1
* Sun Dec 19 1999 John Buswell <johnb@mandrakesoft.com>
- Build Release
* Sat Dec 18 1999 John Buswell <johnb@mandrakesoft.com>
- Add symlink for libSDL-1.0.so.0 required by sdlbomber
- Added docs
* Thu Dec 09 1999 Lenny Cartier <lenny@mandrakesoft.com>
- v 1.0.0
* Mon Nov 1 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- First spec file for Mandrake distribution.
# end of file

77
thirdparty/SDL2/SDL2Config.cmake.in vendored Normal file
View file

@ -0,0 +1,77 @@
# sdl2 cmake project-config input for CMakeLists.txt script
include(FeatureSummary)
set_package_properties(SDL2 PROPERTIES
URL "https://www.libsdl.org/"
DESCRIPTION "low level access to audio, keyboard, mouse, joystick, and graphics hardware"
)
@PACKAGE_INIT@
set(SDL2_FOUND TRUE)
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2Targets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/SDL2Targets.cmake")
set(SDL2_SDL2_FOUND TRUE)
endif()
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2staticTargets.cmake")
if(ANDROID)
enable_language(CXX)
endif()
include("${CMAKE_CURRENT_LIST_DIR}/SDL2staticTargets.cmake")
set(SDL2_SDL2-static_FOUND TRUE)
endif()
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2mainTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/SDL2mainTargets.cmake")
set(SDL2_SDL2main_FOUND TRUE)
endif()
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2testTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/SDL2testTargets.cmake")
set(SDL2_SDL2test_FOUND TRUE)
endif()
include("${CMAKE_CURRENT_LIST_DIR}/sdlfind.cmake")
set(SDL_ALSA @SDL_ALSA@)
set(SDL_ALSA_SHARED @SDL_ALSA_SHARED@)
if(SDL_ALSA AND NOT SDL_ALSA_SHARED AND TARGET SDL2::SDL2-static)
sdlFindALSA()
endif()
unset(SDL_ALSA)
unset(SDL_ALSA_SHARED)
check_required_components(SDL2)
# Create SDL2::SDL2 alias for static-only builds
if(TARGET SDL2::SDL2-static AND NOT TARGET SDL2::SDL2)
if(CMAKE_VERSION VERSION_LESS "3.18")
# FIXME: Aliasing local targets is not supported on CMake < 3.18, so make it global.
add_library(SDL2::SDL2 INTERFACE IMPORTED)
set_target_properties(SDL2::SDL2 PROPERTIES INTERFACE_LINK_LIBRARIES "SDL2::SDL2-static")
else()
add_library(SDL2::SDL2 ALIAS SDL2::SDL2-static)
endif()
endif()
# For compatibility with autotools sdl2-config.cmake, provide SDL2_* variables.
set(SDL2_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@")
set(SDL2_EXEC_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@")
set(SDL2_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@/SDL2")
set(SDL2_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@;@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@/SDL2")
set(SDL2_BINDIR "@PACKAGE_CMAKE_INSTALL_FULL_BINDIR@")
set(SDL2_LIBDIR "@PACKAGE_CMAKE_INSTALL_FULL_LIBDIR@")
set(SDL2_LIBRARIES SDL2::SDL2)
set(SDL2_STATIC_LIBRARIES SDL2::SDL2-static)
set(SDL2_STATIC_PRIVATE_LIBS)
set(SDL2MAIN_LIBRARY)
if(TARGET SDL2::SDL2main)
set(SDL2MAIN_LIBRARY SDL2::SDL2main)
list(INSERT SDL2_LIBRARIES 0 SDL2::SDL2main)
list(INSERT SDL2_STATIC_LIBRARIES 0 SDL2::SDL2main)
endif()
set(SDL2TEST_LIBRARY SDL2::SDL2test)

10
thirdparty/SDL2/TODO.txt vendored Normal file
View file

@ -0,0 +1,10 @@
Future work roadmap:
* http://wiki.libsdl.org/Roadmap
* Check 1.2 revisions:
3554 - Need to resolve semantics for locking keys on different platforms
4874 - Do we want screen rotation? At what level?
4974 - Windows file code needs to convert UTF-8 to Unicode, but we don't need to tap dance for Windows 95/98
4865 - See if this is still needed (mouse coordinate clamping)
4866 - See if this is still needed (blocking window repositioning)

131
thirdparty/SDL2/VisualC-GDK/SDL.sln vendored Normal file
View file

@ -0,0 +1,131 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32414.318
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{D69D5741-611F-4E14-8541-1FEE94F50B5A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2", "SDL\SDL.vcxproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2main", "SDLmain\SDLmain.vcxproj", "{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsprite2", "tests\testsprite2\testsprite2.vcxproj", "{40FB7794-D3C3-4CFE-BCF4-A80C96635682}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2test", "SDLtest\SDLtest.vcxproj", "{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgamecontroller", "tests\testgamecontroller\testgamecontroller.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08305}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgdk", "tests\testgdk\testgdk.vcxproj", "{1C9A3F71-35A5-4C56-B292-F4375B3C3649}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Gaming.Desktop.x64 = Debug|Gaming.Desktop.x64
Debug|Gaming.Xbox.Scarlett.x64 = Debug|Gaming.Xbox.Scarlett.x64
Debug|Gaming.Xbox.XboxOne.x64 = Debug|Gaming.Xbox.XboxOne.x64
Release|Gaming.Desktop.x64 = Release|Gaming.Desktop.x64
Release|Gaming.Xbox.Scarlett.x64 = Release|Gaming.Xbox.Scarlett.x64
Release|Gaming.Xbox.XboxOne.x64 = Release|Gaming.Xbox.XboxOne.x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Gaming.Desktop.x64.ActiveCfg = Debug|Gaming.Desktop.x64
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Gaming.Desktop.x64.Build.0 = Debug|Gaming.Desktop.x64
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Gaming.Xbox.Scarlett.x64.ActiveCfg = Debug|Gaming.Xbox.Scarlett.x64
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Gaming.Xbox.Scarlett.x64.Build.0 = Debug|Gaming.Xbox.Scarlett.x64
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Gaming.Xbox.XboxOne.x64.ActiveCfg = Debug|Gaming.Xbox.XboxOne.x64
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Gaming.Xbox.XboxOne.x64.Build.0 = Debug|Gaming.Xbox.XboxOne.x64
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Gaming.Desktop.x64.ActiveCfg = Release|Gaming.Desktop.x64
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Gaming.Desktop.x64.Build.0 = Release|Gaming.Desktop.x64
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Gaming.Xbox.Scarlett.x64.ActiveCfg = Release|Gaming.Xbox.Scarlett.x64
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Gaming.Xbox.Scarlett.x64.Build.0 = Release|Gaming.Xbox.Scarlett.x64
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Gaming.Xbox.XboxOne.x64.ActiveCfg = Release|Gaming.Xbox.XboxOne.x64
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Gaming.Xbox.XboxOne.x64.Build.0 = Release|Gaming.Xbox.XboxOne.x64
{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Gaming.Desktop.x64.ActiveCfg = Debug|Gaming.Desktop.x64
{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Gaming.Desktop.x64.Build.0 = Debug|Gaming.Desktop.x64
{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Gaming.Xbox.Scarlett.x64.ActiveCfg = Debug|Gaming.Xbox.Scarlett.x64
{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Gaming.Xbox.Scarlett.x64.Build.0 = Debug|Gaming.Xbox.Scarlett.x64
{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Gaming.Xbox.XboxOne.x64.ActiveCfg = Debug|Gaming.Xbox.XboxOne.x64
{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Gaming.Xbox.XboxOne.x64.Build.0 = Debug|Gaming.Xbox.XboxOne.x64
{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Gaming.Desktop.x64.ActiveCfg = Release|Gaming.Desktop.x64
{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Gaming.Desktop.x64.Build.0 = Release|Gaming.Desktop.x64
{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Gaming.Xbox.Scarlett.x64.ActiveCfg = Release|Gaming.Xbox.Scarlett.x64
{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Gaming.Xbox.Scarlett.x64.Build.0 = Release|Gaming.Xbox.Scarlett.x64
{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Gaming.Xbox.XboxOne.x64.ActiveCfg = Release|Gaming.Xbox.XboxOne.x64
{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Gaming.Xbox.XboxOne.x64.Build.0 = Release|Gaming.Xbox.XboxOne.x64
{40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|Gaming.Desktop.x64.ActiveCfg = Debug|Gaming.Desktop.x64
{40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|Gaming.Desktop.x64.Build.0 = Debug|Gaming.Desktop.x64
{40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|Gaming.Desktop.x64.Deploy.0 = Debug|Gaming.Desktop.x64
{40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|Gaming.Xbox.Scarlett.x64.ActiveCfg = Debug|Gaming.Xbox.Scarlett.x64
{40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|Gaming.Xbox.Scarlett.x64.Build.0 = Debug|Gaming.Xbox.Scarlett.x64
{40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|Gaming.Xbox.Scarlett.x64.Deploy.0 = Debug|Gaming.Xbox.Scarlett.x64
{40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|Gaming.Xbox.XboxOne.x64.ActiveCfg = Debug|Gaming.Xbox.XboxOne.x64
{40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|Gaming.Xbox.XboxOne.x64.Build.0 = Debug|Gaming.Xbox.XboxOne.x64
{40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|Gaming.Xbox.XboxOne.x64.Deploy.0 = Debug|Gaming.Xbox.XboxOne.x64
{40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|Gaming.Desktop.x64.ActiveCfg = Release|Gaming.Desktop.x64
{40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|Gaming.Desktop.x64.Build.0 = Release|Gaming.Desktop.x64
{40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|Gaming.Desktop.x64.Deploy.0 = Release|Gaming.Desktop.x64
{40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|Gaming.Xbox.Scarlett.x64.ActiveCfg = Release|Gaming.Xbox.Scarlett.x64
{40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|Gaming.Xbox.Scarlett.x64.Build.0 = Release|Gaming.Xbox.Scarlett.x64
{40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|Gaming.Xbox.Scarlett.x64.Deploy.0 = Release|Gaming.Xbox.Scarlett.x64
{40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|Gaming.Xbox.XboxOne.x64.ActiveCfg = Release|Gaming.Xbox.XboxOne.x64
{40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|Gaming.Xbox.XboxOne.x64.Build.0 = Release|Gaming.Xbox.XboxOne.x64
{40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|Gaming.Xbox.XboxOne.x64.Deploy.0 = Release|Gaming.Xbox.XboxOne.x64
{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|Gaming.Desktop.x64.ActiveCfg = Debug|Gaming.Desktop.x64
{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|Gaming.Desktop.x64.Build.0 = Debug|Gaming.Desktop.x64
{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|Gaming.Xbox.Scarlett.x64.ActiveCfg = Debug|Gaming.Xbox.Scarlett.x64
{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|Gaming.Xbox.Scarlett.x64.Build.0 = Debug|Gaming.Xbox.Scarlett.x64
{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|Gaming.Xbox.XboxOne.x64.ActiveCfg = Debug|Gaming.Xbox.XboxOne.x64
{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|Gaming.Xbox.XboxOne.x64.Build.0 = Debug|Gaming.Xbox.XboxOne.x64
{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|Gaming.Desktop.x64.ActiveCfg = Release|Gaming.Desktop.x64
{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|Gaming.Desktop.x64.Build.0 = Release|Gaming.Desktop.x64
{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|Gaming.Xbox.Scarlett.x64.ActiveCfg = Release|Gaming.Xbox.Scarlett.x64
{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|Gaming.Xbox.Scarlett.x64.Build.0 = Release|Gaming.Xbox.Scarlett.x64
{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|Gaming.Xbox.XboxOne.x64.ActiveCfg = Release|Gaming.Xbox.XboxOne.x64
{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|Gaming.Xbox.XboxOne.x64.Build.0 = Release|Gaming.Xbox.XboxOne.x64
{55812185-D13C-4022-9C81-32E0F4A08305}.Debug|Gaming.Desktop.x64.ActiveCfg = Debug|Gaming.Desktop.x64
{55812185-D13C-4022-9C81-32E0F4A08305}.Debug|Gaming.Desktop.x64.Build.0 = Debug|Gaming.Desktop.x64
{55812185-D13C-4022-9C81-32E0F4A08305}.Debug|Gaming.Desktop.x64.Deploy.0 = Debug|Gaming.Desktop.x64
{55812185-D13C-4022-9C81-32E0F4A08305}.Debug|Gaming.Xbox.Scarlett.x64.ActiveCfg = Debug|Gaming.Xbox.Scarlett.x64
{55812185-D13C-4022-9C81-32E0F4A08305}.Debug|Gaming.Xbox.Scarlett.x64.Build.0 = Debug|Gaming.Xbox.Scarlett.x64
{55812185-D13C-4022-9C81-32E0F4A08305}.Debug|Gaming.Xbox.Scarlett.x64.Deploy.0 = Debug|Gaming.Xbox.Scarlett.x64
{55812185-D13C-4022-9C81-32E0F4A08305}.Debug|Gaming.Xbox.XboxOne.x64.ActiveCfg = Debug|Gaming.Xbox.XboxOne.x64
{55812185-D13C-4022-9C81-32E0F4A08305}.Debug|Gaming.Xbox.XboxOne.x64.Build.0 = Debug|Gaming.Xbox.XboxOne.x64
{55812185-D13C-4022-9C81-32E0F4A08305}.Debug|Gaming.Xbox.XboxOne.x64.Deploy.0 = Debug|Gaming.Xbox.XboxOne.x64
{55812185-D13C-4022-9C81-32E0F4A08305}.Release|Gaming.Desktop.x64.ActiveCfg = Release|Gaming.Desktop.x64
{55812185-D13C-4022-9C81-32E0F4A08305}.Release|Gaming.Desktop.x64.Build.0 = Release|Gaming.Desktop.x64
{55812185-D13C-4022-9C81-32E0F4A08305}.Release|Gaming.Desktop.x64.Deploy.0 = Release|Gaming.Desktop.x64
{55812185-D13C-4022-9C81-32E0F4A08305}.Release|Gaming.Xbox.Scarlett.x64.ActiveCfg = Release|Gaming.Xbox.Scarlett.x64
{55812185-D13C-4022-9C81-32E0F4A08305}.Release|Gaming.Xbox.Scarlett.x64.Build.0 = Release|Gaming.Xbox.Scarlett.x64
{55812185-D13C-4022-9C81-32E0F4A08305}.Release|Gaming.Xbox.Scarlett.x64.Deploy.0 = Release|Gaming.Xbox.Scarlett.x64
{55812185-D13C-4022-9C81-32E0F4A08305}.Release|Gaming.Xbox.XboxOne.x64.ActiveCfg = Release|Gaming.Xbox.XboxOne.x64
{55812185-D13C-4022-9C81-32E0F4A08305}.Release|Gaming.Xbox.XboxOne.x64.Build.0 = Release|Gaming.Xbox.XboxOne.x64
{55812185-D13C-4022-9C81-32E0F4A08305}.Release|Gaming.Xbox.XboxOne.x64.Deploy.0 = Release|Gaming.Xbox.XboxOne.x64
{1C9A3F71-35A5-4C56-B292-F4375B3C3649}.Debug|Gaming.Desktop.x64.ActiveCfg = Debug|Gaming.Desktop.x64
{1C9A3F71-35A5-4C56-B292-F4375B3C3649}.Debug|Gaming.Desktop.x64.Build.0 = Debug|Gaming.Desktop.x64
{1C9A3F71-35A5-4C56-B292-F4375B3C3649}.Debug|Gaming.Desktop.x64.Deploy.0 = Debug|Gaming.Desktop.x64
{1C9A3F71-35A5-4C56-B292-F4375B3C3649}.Debug|Gaming.Xbox.Scarlett.x64.ActiveCfg = Debug|Gaming.Xbox.Scarlett.x64
{1C9A3F71-35A5-4C56-B292-F4375B3C3649}.Debug|Gaming.Xbox.Scarlett.x64.Build.0 = Debug|Gaming.Xbox.Scarlett.x64
{1C9A3F71-35A5-4C56-B292-F4375B3C3649}.Debug|Gaming.Xbox.Scarlett.x64.Deploy.0 = Debug|Gaming.Xbox.Scarlett.x64
{1C9A3F71-35A5-4C56-B292-F4375B3C3649}.Debug|Gaming.Xbox.XboxOne.x64.ActiveCfg = Debug|Gaming.Xbox.XboxOne.x64
{1C9A3F71-35A5-4C56-B292-F4375B3C3649}.Debug|Gaming.Xbox.XboxOne.x64.Build.0 = Debug|Gaming.Xbox.XboxOne.x64
{1C9A3F71-35A5-4C56-B292-F4375B3C3649}.Debug|Gaming.Xbox.XboxOne.x64.Deploy.0 = Debug|Gaming.Xbox.XboxOne.x64
{1C9A3F71-35A5-4C56-B292-F4375B3C3649}.Release|Gaming.Desktop.x64.ActiveCfg = Release|Gaming.Desktop.x64
{1C9A3F71-35A5-4C56-B292-F4375B3C3649}.Release|Gaming.Desktop.x64.Build.0 = Release|Gaming.Desktop.x64
{1C9A3F71-35A5-4C56-B292-F4375B3C3649}.Release|Gaming.Desktop.x64.Deploy.0 = Release|Gaming.Desktop.x64
{1C9A3F71-35A5-4C56-B292-F4375B3C3649}.Release|Gaming.Xbox.Scarlett.x64.ActiveCfg = Release|Gaming.Xbox.Scarlett.x64
{1C9A3F71-35A5-4C56-B292-F4375B3C3649}.Release|Gaming.Xbox.Scarlett.x64.Build.0 = Release|Gaming.Xbox.Scarlett.x64
{1C9A3F71-35A5-4C56-B292-F4375B3C3649}.Release|Gaming.Xbox.Scarlett.x64.Deploy.0 = Release|Gaming.Xbox.Scarlett.x64
{1C9A3F71-35A5-4C56-B292-F4375B3C3649}.Release|Gaming.Xbox.XboxOne.x64.ActiveCfg = Release|Gaming.Xbox.XboxOne.x64
{1C9A3F71-35A5-4C56-B292-F4375B3C3649}.Release|Gaming.Xbox.XboxOne.x64.Build.0 = Release|Gaming.Xbox.XboxOne.x64
{1C9A3F71-35A5-4C56-B292-F4375B3C3649}.Release|Gaming.Xbox.XboxOne.x64.Deploy.0 = Release|Gaming.Xbox.XboxOne.x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{40FB7794-D3C3-4CFE-BCF4-A80C96635682} = {D69D5741-611F-4E14-8541-1FEE94F50B5A}
{55812185-D13C-4022-9C81-32E0F4A08305} = {D69D5741-611F-4E14-8541-1FEE94F50B5A}
{1C9A3F71-35A5-4C56-B292-F4375B3C3649} = {D69D5741-611F-4E14-8541-1FEE94F50B5A}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C320C9F2-1A8F-41D7-B02B-6338F872BCAD}
EndGlobalSection
EndGlobal

View file

@ -0,0 +1,763 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Gaming.Desktop.x64">
<Configuration>Debug</Configuration>
<Platform>Gaming.Desktop.x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Gaming.Xbox.Scarlett.x64">
<Configuration>Debug</Configuration>
<Platform>Gaming.Xbox.Scarlett.x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Gaming.Xbox.XboxOne.x64">
<Configuration>Debug</Configuration>
<Platform>Gaming.Xbox.XboxOne.x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Gaming.Desktop.x64">
<Configuration>Release</Configuration>
<Platform>Gaming.Desktop.x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Gaming.Xbox.Scarlett.x64">
<Configuration>Release</Configuration>
<Platform>Gaming.Xbox.Scarlett.x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Gaming.Xbox.XboxOne.x64">
<Configuration>Release</Configuration>
<Platform>Gaming.Xbox.XboxOne.x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>SDL2</ProjectName>
<ProjectGuid>{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}</ProjectGuid>
<RootNamespace>SDL</RootNamespace>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">$(Platform)\$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">$(Platform)\$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">$(Platform)\$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">$(Platform)\$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">$(Platform)\$(Configuration)\</IntDir>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TypeLibraryName>.\Debug/SDL.tlb</TypeLibraryName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>DLL_EXPORT;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BufferSecurityCheck>false</BufferSecurityCheck>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<OmitDefaultLibName>true</OmitDefaultLibName>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>setupapi.lib;winmm.lib;imm32.lib;version.lib;xgameruntime.lib;vcruntimed.lib;msvcrtd.lib;ucrtd.lib;msvcprtd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TypeLibraryName>.\Debug/SDL.tlb</TypeLibraryName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>DLL_EXPORT;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BufferSecurityCheck>false</BufferSecurityCheck>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<OmitDefaultLibName>true</OmitDefaultLibName>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>setupapi.lib;winmm.lib;imm32.lib;version.lib;xgameruntime.lib;d3d12_xs.lib;uuid.lib;vcruntimed.lib;msvcrtd.lib;ucrtd.lib;msvcprtd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TypeLibraryName>.\Debug/SDL.tlb</TypeLibraryName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>DLL_EXPORT;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BufferSecurityCheck>false</BufferSecurityCheck>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<OmitDefaultLibName>true</OmitDefaultLibName>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>setupapi.lib;winmm.lib;imm32.lib;version.lib;xgameruntime.lib;d3d12_x.lib;uuid.lib;vcruntimed.lib;msvcrtd.lib;ucrtd.lib;msvcprtd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TypeLibraryName>.\Release/SDL.tlb</TypeLibraryName>
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>DLL_EXPORT;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BufferSecurityCheck>false</BufferSecurityCheck>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<OmitDefaultLibName>true</OmitDefaultLibName>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>setupapi.lib;winmm.lib;imm32.lib;version.lib;xgameruntime.lib;vcruntime.lib;msvcrt.lib;ucrt.lib;msvcprt.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TypeLibraryName>.\Release/SDL.tlb</TypeLibraryName>
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>DLL_EXPORT;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BufferSecurityCheck>false</BufferSecurityCheck>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<OmitDefaultLibName>true</OmitDefaultLibName>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>setupapi.lib;winmm.lib;imm32.lib;version.lib;xgameruntime.lib;d3d12_xs.lib;uuid.lib;vcruntime.lib;msvcrt.lib;ucrt.lib;msvcprt.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TypeLibraryName>.\Release/SDL.tlb</TypeLibraryName>
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>DLL_EXPORT;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BufferSecurityCheck>false</BufferSecurityCheck>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<OmitDefaultLibName>true</OmitDefaultLibName>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>setupapi.lib;winmm.lib;imm32.lib;version.lib;xgameruntime.lib;d3d12_x.lib;uuid.lib;vcruntime.lib;msvcrt.lib;ucrt.lib;msvcprt.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\..\include\begin_code.h" />
<ClInclude Include="..\..\include\close_code.h" />
<ClInclude Include="..\..\include\SDL.h" />
<ClInclude Include="..\..\include\SDL_assert.h" />
<ClInclude Include="..\..\include\SDL_atomic.h" />
<ClInclude Include="..\..\include\SDL_audio.h" />
<ClInclude Include="..\..\include\SDL_bits.h" />
<ClInclude Include="..\..\include\SDL_blendmode.h" />
<ClInclude Include="..\..\include\SDL_clipboard.h" />
<ClInclude Include="..\..\include\SDL_config.h" />
<ClInclude Include="..\..\include\SDL_config_wingdk.h" />
<ClInclude Include="..\..\include\SDL_copying.h" />
<ClInclude Include="..\..\include\SDL_cpuinfo.h" />
<ClInclude Include="..\..\include\SDL_egl.h" />
<ClInclude Include="..\..\include\SDL_endian.h" />
<ClInclude Include="..\..\include\SDL_error.h" />
<ClInclude Include="..\..\include\SDL_events.h" />
<ClInclude Include="..\..\include\SDL_filesystem.h" />
<ClInclude Include="..\..\include\SDL_gamecontroller.h" />
<ClInclude Include="..\..\include\SDL_gesture.h" />
<ClInclude Include="..\..\include\SDL_guid.h" />
<ClInclude Include="..\..\include\SDL_haptic.h" />
<ClInclude Include="..\..\include\SDL_hints.h" />
<ClInclude Include="..\..\include\SDL_hidapi.h" />
<ClInclude Include="..\..\include\SDL_joystick.h" />
<ClInclude Include="..\..\include\SDL_keyboard.h" />
<ClInclude Include="..\..\include\SDL_keycode.h" />
<ClInclude Include="..\..\include\SDL_loadso.h" />
<ClInclude Include="..\..\include\SDL_locale.h" />
<ClInclude Include="..\..\include\SDL_log.h" />
<ClInclude Include="..\..\include\SDL_main.h" />
<ClInclude Include="..\..\include\SDL_messagebox.h" />
<ClInclude Include="..\..\include\SDL_metal.h" />
<ClInclude Include="..\..\include\SDL_misc.h" />
<ClInclude Include="..\..\include\SDL_mouse.h" />
<ClInclude Include="..\..\include\SDL_mutex.h" />
<ClInclude Include="..\..\include\SDL_name.h" />
<ClInclude Include="..\..\include\SDL_opengl.h" />
<ClInclude Include="..\..\include\SDL_opengl_glext.h" />
<ClInclude Include="..\..\include\SDL_opengles.h" />
<ClInclude Include="..\..\include\SDL_opengles2.h" />
<ClInclude Include="..\..\include\SDL_opengles2_gl2.h" />
<ClInclude Include="..\..\include\SDL_opengles2_gl2ext.h" />
<ClInclude Include="..\..\include\SDL_opengles2_gl2platform.h" />
<ClInclude Include="..\..\include\SDL_opengles2_khrplatform.h" />
<ClInclude Include="..\..\include\SDL_pixels.h" />
<ClInclude Include="..\..\include\SDL_platform.h" />
<ClInclude Include="..\..\include\SDL_power.h" />
<ClInclude Include="..\..\include\SDL_quit.h" />
<ClInclude Include="..\..\include\SDL_rect.h" />
<ClInclude Include="..\..\include\SDL_render.h" />
<ClInclude Include="..\..\include\SDL_revision.h" />
<ClInclude Include="..\..\include\SDL_rwops.h" />
<ClInclude Include="..\..\include\SDL_scancode.h" />
<ClInclude Include="..\..\include\SDL_sensor.h" />
<ClInclude Include="..\..\include\SDL_shape.h" />
<ClInclude Include="..\..\include\SDL_stdinc.h" />
<ClInclude Include="..\..\include\SDL_surface.h" />
<ClInclude Include="..\..\include\SDL_system.h" />
<ClInclude Include="..\..\include\SDL_syswm.h" />
<ClInclude Include="..\..\include\SDL_test.h" />
<ClInclude Include="..\..\include\SDL_test_assert.h" />
<ClInclude Include="..\..\include\SDL_test_common.h" />
<ClInclude Include="..\..\include\SDL_test_compare.h" />
<ClInclude Include="..\..\include\SDL_test_crc32.h" />
<ClInclude Include="..\..\include\SDL_test_font.h" />
<ClInclude Include="..\..\include\SDL_test_fuzzer.h" />
<ClInclude Include="..\..\include\SDL_test_harness.h" />
<ClInclude Include="..\..\include\SDL_test_images.h" />
<ClInclude Include="..\..\include\SDL_test_log.h" />
<ClInclude Include="..\..\include\SDL_test_md5.h" />
<ClInclude Include="..\..\include\SDL_test_memory.h" />
<ClInclude Include="..\..\include\SDL_test_random.h" />
<ClInclude Include="..\..\include\SDL_thread.h" />
<ClInclude Include="..\..\include\SDL_timer.h" />
<ClInclude Include="..\..\include\SDL_touch.h" />
<ClInclude Include="..\..\include\SDL_types.h" />
<ClInclude Include="..\..\include\SDL_version.h" />
<ClInclude Include="..\..\include\SDL_video.h" />
<ClInclude Include="..\..\include\SDL_vulkan.h" />
<ClInclude Include="..\..\src\audio\directsound\SDL_directsound.h" />
<ClInclude Include="..\..\src\audio\disk\SDL_diskaudio.h" />
<ClInclude Include="..\..\src\audio\dummy\SDL_dummyaudio.h" />
<ClInclude Include="..\..\src\audio\SDL_audio_c.h" />
<ClInclude Include="..\..\src\audio\SDL_audiodev_c.h" />
<ClInclude Include="..\..\src\audio\SDL_sysaudio.h" />
<ClInclude Include="..\..\src\audio\SDL_wave.h" />
<ClInclude Include="..\..\src\audio\wasapi\SDL_wasapi.h" />
<ClInclude Include="..\..\src\audio\winmm\SDL_winmm.h" />
<ClInclude Include="..\..\src\core\gdk\SDL_gdk.h" />
<ClInclude Include="..\..\src\core\windows\SDL_directx.h" />
<ClInclude Include="..\..\src\core\windows\SDL_hid.h" />
<ClInclude Include="..\..\src\core\windows\SDL_immdevice.h" />
<ClInclude Include="..\..\src\core\windows\SDL_windows.h" />
<ClInclude Include="..\..\src\core\windows\SDL_xinput.h" />
<ClInclude Include="..\..\src\dynapi\SDL_dynapi.h" />
<ClInclude Include="..\..\src\dynapi\SDL_dynapi_overrides.h" />
<ClInclude Include="..\..\src\dynapi\SDL_dynapi_procs.h" />
<ClInclude Include="..\..\src\events\blank_cursor.h" />
<ClInclude Include="..\..\src\events\default_cursor.h" />
<ClInclude Include="..\..\src\events\scancodes_windows.h" />
<ClInclude Include="..\..\src\events\SDL_clipboardevents_c.h" />
<ClInclude Include="..\..\src\events\SDL_displayevents_c.h" />
<ClInclude Include="..\..\src\events\SDL_dropevents_c.h" />
<ClInclude Include="..\..\src\events\SDL_events_c.h" />
<ClInclude Include="..\..\src\events\SDL_gesture_c.h" />
<ClInclude Include="..\..\src\events\SDL_keyboard_c.h" />
<ClInclude Include="..\..\src\events\SDL_mouse_c.h" />
<ClInclude Include="..\..\src\events\SDL_touch_c.h" />
<ClInclude Include="..\..\src\events\SDL_windowevents_c.h" />
<ClInclude Include="..\..\src\haptic\SDL_haptic_c.h" />
<ClInclude Include="..\..\src\haptic\SDL_syshaptic.h" />
<ClInclude Include="..\..\src\haptic\windows\SDL_dinputhaptic_c.h" />
<ClInclude Include="..\..\src\haptic\windows\SDL_windowshaptic_c.h" />
<ClInclude Include="..\..\src\haptic\windows\SDL_xinputhaptic_c.h" />
<ClInclude Include="..\..\src\hidapi\hidapi\hidapi.h" />
<ClInclude Include="..\..\src\hidapi\SDL_hidapi_c.h" />
<ClInclude Include="..\..\src\joystick\controller_type.h" />
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.h" />
<ClInclude Include="..\..\src\joystick\SDL_gamecontrollerdb.h" />
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
<ClInclude Include="..\..\src\joystick\usb_ids.h" />
<ClInclude Include="..\..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
<ClInclude Include="..\..\src\joystick\windows\SDL_dinputjoystick_c.h" />
<ClInclude Include="..\..\src\joystick\windows\SDL_rawinputjoystick_c.h" />
<ClInclude Include="..\..\src\joystick\windows\SDL_windowsjoystick_c.h" />
<ClInclude Include="..\..\src\joystick\windows\SDL_xinputjoystick_c.h" />
<ClInclude Include="..\..\src\libm\math_libm.h" />
<ClInclude Include="..\..\src\libm\math_private.h" />
<ClInclude Include="..\..\src\locale\SDL_syslocale.h" />
<ClInclude Include="..\..\src\misc\SDL_sysurl.h" />
<ClInclude Include="..\..\src\power\SDL_syspower.h" />
<ClInclude Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.h" />
<ClInclude Include="..\..\src\render\direct3d12\SDL_render_d3d12_xbox.h" />
<ClInclude Include="..\..\src\render\direct3d12\SDL_shaders_d3d12.h" />
<ClInclude Include="..\..\src\render\direct3d\SDL_shaders_d3d.h" />
<ClInclude Include="..\..\src\render\opengles2\SDL_gles2funcs.h" />
<ClInclude Include="..\..\src\render\opengles2\SDL_shaders_gles2.h" />
<ClInclude Include="..\..\src\render\opengl\SDL_glfuncs.h" />
<ClInclude Include="..\..\src\render\opengl\SDL_shaders_gl.h" />
<ClInclude Include="..\..\src\render\SDL_d3dmath.h" />
<ClInclude Include="..\..\src\render\SDL_sysrender.h" />
<ClInclude Include="..\..\src\render\SDL_yuv_sw_c.h" />
<ClInclude Include="..\..\src\render\software\SDL_blendfillrect.h" />
<ClInclude Include="..\..\src\render\software\SDL_blendline.h" />
<ClInclude Include="..\..\src\render\software\SDL_blendpoint.h" />
<ClInclude Include="..\..\src\render\software\SDL_draw.h" />
<ClInclude Include="..\..\src\render\software\SDL_drawline.h" />
<ClInclude Include="..\..\src\render\software\SDL_drawpoint.h" />
<ClInclude Include="..\..\src\render\software\SDL_render_sw_c.h" />
<ClInclude Include="..\..\src\render\software\SDL_rotate.h" />
<ClInclude Include="..\..\src\render\software\SDL_triangle.h" />
<ClInclude Include="..\..\src\SDL_assert_c.h" />
<ClInclude Include="..\..\src\SDL_dataqueue.h" />
<ClInclude Include="..\..\src\SDL_error_c.h" />
<ClCompile Include="..\..\src\core\gdk\SDL_gdk.cpp" />
<ClCompile Include="..\..\src\render\direct3d12\SDL_render_d3d12_xbox.cpp" />
<ClCompile Include="..\..\src\render\direct3d12\SDL_shaders_d3d12_xboxone.cpp" />
<ClCompile Include="..\..\src\render\direct3d12\SDL_shaders_d3d12_xboxseries.cpp" />
<ClCompile Include="..\..\src\SDL_guid.c" />
<ClInclude Include="..\..\src\SDL_hints_c.h" />
<ClInclude Include="..\..\src\SDL_internal.h" />
<ClInclude Include="..\..\src\SDL_list.h" />
<ClInclude Include="..\..\src\SDL_log_c.h" />
<ClInclude Include="..\..\src\sensor\dummy\SDL_dummysensor.h" />
<ClInclude Include="..\..\src\sensor\SDL_sensor_c.h" />
<ClInclude Include="..\..\src\sensor\SDL_syssensor.h" />
<ClInclude Include="..\..\src\sensor\windows\SDL_windowssensor.h" />
<ClInclude Include="..\..\src\thread\SDL_systhread.h" />
<ClInclude Include="..\..\src\thread\SDL_thread_c.h" />
<ClInclude Include="..\..\src\thread\generic\SDL_syscond_c.h" />
<ClInclude Include="..\..\src\thread\windows\SDL_sysmutex_c.h" />
<ClInclude Include="..\..\src\thread\windows\SDL_systhread_c.h" />
<ClInclude Include="..\..\src\timer\SDL_timer_c.h" />
<ClInclude Include="..\..\src\video\dummy\SDL_nullevents_c.h" />
<ClInclude Include="..\..\src\video\dummy\SDL_nullframebuffer_c.h" />
<ClInclude Include="..\..\src\video\dummy\SDL_nullvideo.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_icd.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_layer.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_platform.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vk_sdk_platform.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan.hpp" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_android.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_beta.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_core.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_directfb.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_fuchsia.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_ggp.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_ios.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_macos.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_metal.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_vi.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_wayland.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_win32.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_xcb.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_xlib.h" />
<ClInclude Include="..\..\src\video\khronos\vulkan\vulkan_xlib_xrandr.h" />
<ClInclude Include="..\..\src\video\SDL_blit.h" />
<ClInclude Include="..\..\src\video\SDL_blit_auto.h" />
<ClInclude Include="..\..\src\video\SDL_blit_copy.h" />
<ClInclude Include="..\..\src\video\SDL_blit_slow.h" />
<ClInclude Include="..\..\src\video\SDL_egl_c.h" />
<ClInclude Include="..\..\src\video\SDL_pixels_c.h" />
<ClInclude Include="..\..\src\video\SDL_rect_c.h" />
<ClInclude Include="..\..\src\video\SDL_RLEaccel_c.h" />
<ClInclude Include="..\..\src\video\SDL_shape_internals.h" />
<ClInclude Include="..\..\src\video\SDL_sysvideo.h" />
<ClInclude Include="..\..\src\video\SDL_vulkan_internal.h" />
<ClInclude Include="..\..\src\video\SDL_yuv_c.h" />
<ClInclude Include="..\..\src\video\windows\SDL_msctf.h" />
<ClInclude Include="..\..\src\video\windows\SDL_vkeys.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsclipboard.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsevents.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsframebuffer.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowskeyboard.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsmessagebox.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsmodes.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsmouse.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsopengl.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsopengles.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsshape.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsvideo.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsvulkan.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowswindow.h" />
<ClInclude Include="..\..\src\video\windows\wmmsg.h" />
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb.h" />
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_sse_func.h" />
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb_std_func.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\atomic\SDL_atomic.c" />
<ClCompile Include="..\..\src\atomic\SDL_spinlock.c" />
<ClCompile Include="..\..\src\audio\directsound\SDL_directsound.c" />
<ClCompile Include="..\..\src\audio\disk\SDL_diskaudio.c" />
<ClCompile Include="..\..\src\audio\dummy\SDL_dummyaudio.c" />
<ClCompile Include="..\..\src\audio\SDL_audio.c" />
<ClCompile Include="..\..\src\audio\SDL_audiocvt.c" />
<ClCompile Include="..\..\src\audio\SDL_audiodev.c" />
<ClCompile Include="..\..\src\audio\SDL_audiotypecvt.c" />
<ClCompile Include="..\..\src\audio\SDL_mixer.c" />
<ClCompile Include="..\..\src\audio\SDL_wave.c" />
<ClCompile Include="..\..\src\audio\winmm\SDL_winmm.c" />
<ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi.c" />
<ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi_win32.c" />
<ClCompile Include="..\..\src\core\windows\SDL_hid.c" />
<ClCompile Include="..\..\src\core\windows\SDL_immdevice.c" />
<ClCompile Include="..\..\src\core\windows\SDL_windows.c" />
<ClCompile Include="..\..\src\core\windows\SDL_xinput.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">CompileAsCpp</CompileAs>
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">stdcpp17</LanguageStandard>
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">stdcpp17</LanguageStandard>
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">stdcpp17</LanguageStandard>
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">stdcpp17</LanguageStandard>
</ClCompile>
<ClCompile Include="..\..\src\cpuinfo\SDL_cpuinfo.c" />
<ClCompile Include="..\..\src\dynapi\SDL_dynapi.c" />
<ClCompile Include="..\..\src\events\SDL_clipboardevents.c" />
<ClCompile Include="..\..\src\events\SDL_displayevents.c" />
<ClCompile Include="..\..\src\events\SDL_dropevents.c" />
<ClCompile Include="..\..\src\events\SDL_events.c" />
<ClCompile Include="..\..\src\events\SDL_gesture.c" />
<ClCompile Include="..\..\src\events\SDL_keyboard.c" />
<ClCompile Include="..\..\src\events\SDL_mouse.c" />
<ClCompile Include="..\..\src\events\SDL_quit.c" />
<ClCompile Include="..\..\src\events\SDL_touch.c" />
<ClCompile Include="..\..\src\events\SDL_windowevents.c" />
<ClCompile Include="..\..\src\file\SDL_rwops.c" />
<ClCompile Include="..\..\src\filesystem\gdk\SDL_sysfilesystem.cpp" />
<ClCompile Include="..\..\src\haptic\dummy\SDL_syshaptic.c" />
<ClCompile Include="..\..\src\haptic\SDL_haptic.c" />
<ClCompile Include="..\..\src\haptic\windows\SDL_dinputhaptic.c" />
<ClCompile Include="..\..\src\haptic\windows\SDL_windowshaptic.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">CompileAsCpp</CompileAs>
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">stdcpp17</LanguageStandard>
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">stdcpp17</LanguageStandard>
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">stdcpp17</LanguageStandard>
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">stdcpp17</LanguageStandard>
</ClCompile>
<ClCompile Include="..\..\src\haptic\windows\SDL_xinputhaptic.c">
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">stdcpp17</LanguageStandard>
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">stdcpp17</LanguageStandard>
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">stdcpp17</LanguageStandard>
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">stdcpp17</LanguageStandard>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\..\src\hidapi\SDL_hidapi.c" />
<ClCompile Include="..\..\src\joystick\controller_type.c" />
<ClCompile Include="..\..\src\joystick\dummy\SDL_sysjoystick.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapijoystick.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_combined.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_gamecube.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_luna.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_ps3.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_ps4.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_ps5.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_shield.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_stadia.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_steam.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_wii.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360w.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
<ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" />
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
<ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c" />
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" />
<ClCompile Include="..\..\src\joystick\windows\SDL_rawinputjoystick.c" />
<ClCompile Include="..\..\src\joystick\windows\SDL_windowsjoystick.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">CompileAsCpp</CompileAs>
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">stdcpp17</LanguageStandard>
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">stdcpp17</LanguageStandard>
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">stdcpp17</LanguageStandard>
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">stdcpp17</LanguageStandard>
</ClCompile>
<ClCompile Include="..\..\src\joystick\windows\SDL_windows_gaming_input.c" />
<ClCompile Include="..\..\src\joystick\windows\SDL_xinputjoystick.c">
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">stdcpp17</LanguageStandard>
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">stdcpp17</LanguageStandard>
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">stdcpp17</LanguageStandard>
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">stdcpp17</LanguageStandard>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\..\src\libm\e_atan2.c" />
<ClCompile Include="..\..\src\libm\e_exp.c" />
<ClCompile Include="..\..\src\libm\e_fmod.c" />
<ClCompile Include="..\..\src\libm\e_log.c" />
<ClCompile Include="..\..\src\libm\e_log10.c" />
<ClCompile Include="..\..\src\libm\e_pow.c" />
<ClCompile Include="..\..\src\libm\e_rem_pio2.c" />
<ClCompile Include="..\..\src\libm\e_sqrt.c" />
<ClCompile Include="..\..\src\libm\k_cos.c" />
<ClCompile Include="..\..\src\libm\k_rem_pio2.c" />
<ClCompile Include="..\..\src\libm\k_sin.c" />
<ClCompile Include="..\..\src\libm\k_tan.c" />
<ClCompile Include="..\..\src\libm\s_atan.c" />
<ClCompile Include="..\..\src\libm\s_copysign.c" />
<ClCompile Include="..\..\src\libm\s_cos.c" />
<ClCompile Include="..\..\src\libm\s_fabs.c" />
<ClCompile Include="..\..\src\libm\s_floor.c" />
<ClCompile Include="..\..\src\libm\s_scalbn.c" />
<ClCompile Include="..\..\src\libm\s_sin.c" />
<ClCompile Include="..\..\src\libm\s_tan.c" />
<ClCompile Include="..\..\src\loadso\windows\SDL_sysloadso.c" />
<ClCompile Include="..\..\src\locale\SDL_locale.c" />
<ClCompile Include="..\..\src\locale\windows\SDL_syslocale.c" />
<ClCompile Include="..\..\src\misc\SDL_url.c" />
<ClCompile Include="..\..\src\misc\windows\SDL_sysurl.c" />
<ClCompile Include="..\..\src\power\SDL_power.c" />
<ClCompile Include="..\..\src\power\windows\SDL_syspower.c" />
<ClCompile Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.c" />
<ClCompile Include="..\..\src\render\direct3d12\SDL_render_d3d12.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\..\src\render\direct3d12\SDL_shaders_d3d12.c" />
<ClCompile Include="..\..\src\render\direct3d\SDL_render_d3d.c" />
<ClCompile Include="..\..\src\render\direct3d11\SDL_render_d3d11.c" />
<ClCompile Include="..\..\src\render\direct3d\SDL_shaders_d3d.c" />
<ClCompile Include="..\..\src\render\opengl\SDL_render_gl.c" />
<ClCompile Include="..\..\src\render\opengl\SDL_shaders_gl.c" />
<ClCompile Include="..\..\src\render\opengles2\SDL_render_gles2.c" />
<ClCompile Include="..\..\src\render\opengles2\SDL_shaders_gles2.c" />
<ClCompile Include="..\..\src\render\SDL_d3dmath.c" />
<ClCompile Include="..\..\src\render\SDL_render.c" />
<ClCompile Include="..\..\src\render\SDL_yuv_sw.c" />
<ClCompile Include="..\..\src\render\software\SDL_blendfillrect.c" />
<ClCompile Include="..\..\src\render\software\SDL_blendline.c" />
<ClCompile Include="..\..\src\render\software\SDL_blendpoint.c" />
<ClCompile Include="..\..\src\render\software\SDL_drawline.c" />
<ClCompile Include="..\..\src\render\software\SDL_drawpoint.c" />
<ClCompile Include="..\..\src\render\software\SDL_render_sw.c" />
<ClCompile Include="..\..\src\render\software\SDL_rotate.c" />
<ClCompile Include="..\..\src\render\software\SDL_triangle.c" />
<ClCompile Include="..\..\src\SDL.c" />
<ClCompile Include="..\..\src\SDL_assert.c" />
<ClCompile Include="..\..\src\SDL_dataqueue.c" />
<ClCompile Include="..\..\src\SDL_list.c" />
<ClCompile Include="..\..\src\SDL_error.c" />
<ClCompile Include="..\..\src\SDL_hints.c" />
<ClCompile Include="..\..\src\SDL_log.c" />
<ClCompile Include="..\..\src\SDL_utils.c" />
<ClCompile Include="..\..\src\sensor\dummy\SDL_dummysensor.c" />
<ClCompile Include="..\..\src\sensor\SDL_sensor.c" />
<ClCompile Include="..\..\src\sensor\windows\SDL_windowssensor.c" />
<ClCompile Include="..\..\src\stdlib\SDL_crc16.c" />
<ClCompile Include="..\..\src\stdlib\SDL_crc32.c" />
<ClCompile Include="..\..\src\stdlib\SDL_getenv.c" />
<ClCompile Include="..\..\src\stdlib\SDL_iconv.c" />
<ClCompile Include="..\..\src\stdlib\SDL_malloc.c" />
<ClCompile Include="..\..\src\stdlib\SDL_mslibc.c" />
<ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
<ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
<ClCompile Include="..\..\src\stdlib\SDL_string.c" />
<ClCompile Include="..\..\src\stdlib\SDL_strtokr.c" />
<ClCompile Include="..\..\src\thread\generic\SDL_syscond.c" />
<ClCompile Include="..\..\src\thread\SDL_thread.c" />
<ClCompile Include="..\..\src\thread\windows\SDL_syscond_cv.c" />
<ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c" />
<ClCompile Include="..\..\src\thread\windows\SDL_syssem.c" />
<ClCompile Include="..\..\src\thread\windows\SDL_systhread.c" />
<ClCompile Include="..\..\src\thread\windows\SDL_systls.c" />
<ClCompile Include="..\..\src\timer\SDL_timer.c" />
<ClCompile Include="..\..\src\timer\windows\SDL_systimer.c" />
<ClCompile Include="..\..\src\video\dummy\SDL_nullevents.c" />
<ClCompile Include="..\..\src\video\dummy\SDL_nullframebuffer.c" />
<ClCompile Include="..\..\src\video\dummy\SDL_nullvideo.c" />
<ClCompile Include="..\..\src\video\SDL_blit.c" />
<ClCompile Include="..\..\src\video\SDL_blit_0.c" />
<ClCompile Include="..\..\src\video\SDL_blit_1.c" />
<ClCompile Include="..\..\src\video\SDL_blit_A.c" />
<ClCompile Include="..\..\src\video\SDL_blit_auto.c" />
<ClCompile Include="..\..\src\video\SDL_blit_copy.c" />
<ClCompile Include="..\..\src\video\SDL_blit_N.c" />
<ClCompile Include="..\..\src\video\SDL_blit_slow.c" />
<ClCompile Include="..\..\src\video\SDL_bmp.c" />
<ClCompile Include="..\..\src\video\SDL_clipboard.c" />
<ClCompile Include="..\..\src\video\SDL_egl.c" />
<ClCompile Include="..\..\src\video\SDL_fillrect.c" />
<ClCompile Include="..\..\src\video\SDL_pixels.c" />
<ClCompile Include="..\..\src\video\SDL_rect.c" />
<ClCompile Include="..\..\src\video\SDL_RLEaccel.c" />
<ClCompile Include="..\..\src\video\SDL_shape.c" />
<ClCompile Include="..\..\src\video\SDL_stretch.c" />
<ClCompile Include="..\..\src\video\SDL_surface.c" />
<ClCompile Include="..\..\src\video\SDL_video.c" />
<ClCompile Include="..\..\src\video\SDL_vulkan_utils.c" />
<ClCompile Include="..\..\src\video\SDL_yuv.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsclipboard.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsevents.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsframebuffer.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowskeyboard.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsmessagebox.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsmodes.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsmouse.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsopengl.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsopengles.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsshape.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsvideo.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsvulkan.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowswindow.c" />
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb.c" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\src\main\windows\version.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,211 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Gaming.Desktop.x64">
<Configuration>Debug</Configuration>
<Platform>Gaming.Desktop.x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Gaming.Xbox.Scarlett.x64">
<Configuration>Debug</Configuration>
<Platform>Gaming.Xbox.Scarlett.x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Gaming.Xbox.XboxOne.x64">
<Configuration>Debug</Configuration>
<Platform>Gaming.Xbox.XboxOne.x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Gaming.Desktop.x64">
<Configuration>Release</Configuration>
<Platform>Gaming.Desktop.x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Gaming.Xbox.Scarlett.x64">
<Configuration>Release</Configuration>
<Platform>Gaming.Xbox.Scarlett.x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Gaming.Xbox.XboxOne.x64">
<Configuration>Release</Configuration>
<Platform>Gaming.Xbox.XboxOne.x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\main\gdk\SDL_gdk_main.c" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>SDL2main</ProjectName>
<ProjectGuid>{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}</ProjectGuid>
<RootNamespace>SDLmain</RootNamespace>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">$(Platform)\$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">$(Platform)\$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">$(Platform)\$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">$(Platform)\$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">$(Platform)\$(Configuration)\</IntDir>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">
<Midl />
<ClCompile>
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<OmitDefaultLibName>true</OmitDefaultLibName>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">
<Midl />
<ClCompile>
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<OmitDefaultLibName>true</OmitDefaultLibName>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">
<Midl />
<ClCompile>
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<OmitDefaultLibName>true</OmitDefaultLibName>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">
<Midl />
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<OmitDefaultLibName>true</OmitDefaultLibName>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">
<Midl />
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<OmitDefaultLibName>true</OmitDefaultLibName>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">
<Midl />
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<OmitDefaultLibName>true</OmitDefaultLibName>
</ClCompile>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View file

@ -0,0 +1,226 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Gaming.Desktop.x64">
<Configuration>Debug</Configuration>
<Platform>Gaming.Desktop.x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Gaming.Xbox.Scarlett.x64">
<Configuration>Debug</Configuration>
<Platform>Gaming.Xbox.Scarlett.x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Gaming.Xbox.XboxOne.x64">
<Configuration>Debug</Configuration>
<Platform>Gaming.Xbox.XboxOne.x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Gaming.Desktop.x64">
<Configuration>Release</Configuration>
<Platform>Gaming.Desktop.x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Gaming.Xbox.Scarlett.x64">
<Configuration>Release</Configuration>
<Platform>Gaming.Xbox.Scarlett.x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Gaming.Xbox.XboxOne.x64">
<Configuration>Release</Configuration>
<Platform>Gaming.Xbox.XboxOne.x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>SDL2test</ProjectName>
<ProjectGuid>{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}</ProjectGuid>
<RootNamespace>SDLtest</RootNamespace>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">$(Platform)\$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">$(Platform)\$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">$(Platform)\$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">$(Platform)\$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">$(Platform)\$(Configuration)\</IntDir>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">
<Midl />
<ClCompile>
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<OmitDefaultLibName>true</OmitDefaultLibName>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">
<Midl />
<ClCompile>
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<OmitDefaultLibName>true</OmitDefaultLibName>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">
<Midl />
<ClCompile>
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<OmitDefaultLibName>true</OmitDefaultLibName>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">
<Midl />
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<OmitDefaultLibName>true</OmitDefaultLibName>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">
<Midl />
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<OmitDefaultLibName>true</OmitDefaultLibName>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">
<Midl />
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<OmitDefaultLibName>true</OmitDefaultLibName>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\src\test\SDL_test_assert.c" />
<ClCompile Include="..\..\src\test\SDL_test_common.c" />
<ClCompile Include="..\..\src\test\SDL_test_compare.c" />
<ClCompile Include="..\..\src\test\SDL_test_crc32.c" />
<ClCompile Include="..\..\src\test\SDL_test_font.c" />
<ClCompile Include="..\..\src\test\SDL_test_fuzzer.c" />
<ClCompile Include="..\..\src\test\SDL_test_harness.c" />
<ClCompile Include="..\..\src\test\SDL_test_imageBlit.c" />
<ClCompile Include="..\..\src\test\SDL_test_imageBlitBlend.c" />
<ClCompile Include="..\..\src\test\SDL_test_imageFace.c" />
<ClCompile Include="..\..\src\test\SDL_test_imagePrimitives.c" />
<ClCompile Include="..\..\src\test\SDL_test_imagePrimitivesBlend.c" />
<ClCompile Include="..\..\src\test\SDL_test_log.c" />
<ClCompile Include="..\..\src\test\SDL_test_md5.c" />
<ClCompile Include="..\..\src\test\SDL_test_memory.c" />
<ClCompile Include="..\..\src\test\SDL_test_random.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

6
thirdparty/SDL2/VisualC-GDK/clean.sh vendored Executable file
View file

@ -0,0 +1,6 @@
#!/bin/sh
find . -type f \( -name '*.user' -o -name '*.sdf' -o -name '*.ncb' -o -name '*.suo' \) -print -delete
find . -type f \( -name '*.bmp' -o -name '*.wav' -o -name '*.dat' \) -print -delete
find . -depth -type d \( -name Gaming.Desktop.x64 \) -exec rm -rv {} \;
find . -depth -type d \( -name Gaming.Xbox.Scarlett.x64 \) -exec rm -rv {} \;
find . -depth -type d \( -name Gaming.Xbox.XboxOne.x64 \) -exec rm -rv {} \;

BIN
thirdparty/SDL2/VisualC-GDK/logos/Logo100x100.png (Stored with Git LFS) vendored Normal file

Binary file not shown.

BIN
thirdparty/SDL2/VisualC-GDK/logos/Logo150x150.png (Stored with Git LFS) vendored Normal file

Binary file not shown.

BIN
thirdparty/SDL2/VisualC-GDK/logos/Logo44x44.png (Stored with Git LFS) vendored Normal file

Binary file not shown.

BIN
thirdparty/SDL2/VisualC-GDK/logos/Logo480x480.png (Stored with Git LFS) vendored Normal file

Binary file not shown.

BIN
thirdparty/SDL2/VisualC-GDK/logos/SplashScreenImage.png (Stored with Git LFS) vendored Normal file

Binary file not shown.

View file

@ -0,0 +1,9 @@
<Package>
<Chunk Id="1000" Marker="Launch">
<FileGroup DestinationPath="." SourcePath="." Include="testgamecontroller.exe" />
<FileGroup DestinationPath="." SourcePath="." Include="MicrosoftGame.config" />
<FileGroup DestinationPath="." SourcePath="." Include="*.bmp" />
<FileGroup DestinationPath="." SourcePath="." Include="*.png" />
<FileGroup DestinationPath="." SourcePath="." Include="*.dll" />
</Chunk>
</Package>

View file

@ -0,0 +1,444 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Gaming.Desktop.x64">
<Configuration>Debug</Configuration>
<Platform>Gaming.Desktop.x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Gaming.Xbox.Scarlett.x64">
<Configuration>Debug</Configuration>
<Platform>Gaming.Xbox.Scarlett.x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Gaming.Xbox.XboxOne.x64">
<Configuration>Debug</Configuration>
<Platform>Gaming.Xbox.XboxOne.x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Gaming.Desktop.x64">
<Configuration>Release</Configuration>
<Platform>Gaming.Desktop.x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Gaming.Xbox.Scarlett.x64">
<Configuration>Release</Configuration>
<Platform>Gaming.Xbox.Scarlett.x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Gaming.Xbox.XboxOne.x64">
<Configuration>Release</Configuration>
<Platform>Gaming.Xbox.XboxOne.x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{55812185-D13C-4022-9C81-32E0F4A08305}</ProjectGuid>
<RootNamespace>testgamecontroller</RootNamespace>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
<UseDebugLibraries>true</UseDebugLibraries>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
<UseDebugLibraries>true</UseDebugLibraries>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">$(Platform)\$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">$(Platform)\$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">$(Platform)\$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">$(Platform)\$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">$(Platform)\$(Configuration)\</IntDir>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TypeLibraryName>.\Release/testgamecontroller.tlb</TypeLibraryName>
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.141.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TypeLibraryName>.\Release/testgamecontroller.tlb</TypeLibraryName>
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>xgameruntime.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TypeLibraryName>.\Release/testgamecontroller.tlb</TypeLibraryName>
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>xgameruntime.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TypeLibraryName>.\Debug/testgamecontroller.tlb</TypeLibraryName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>xgameruntime.lib;../Microsoft.Xbox.Services.141.GDK.C.Thunks.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TypeLibraryName>.\Debug/testgamecontroller.tlb</TypeLibraryName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>xgameruntime.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TypeLibraryName>.\Debug/testgamecontroller.tlb</TypeLibraryName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>xgameruntime.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
<Private>false</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\..\SDLmain\SDLmain.vcxproj">
<Project>{da956fd3-e142-46f2-9dd5-c78bebb56b7a}</Project>
<Private>false</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<CopyFileToFolders Include="..\..\..\test\axis.bmp">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">Copying %(Filename)%(Extension)</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">Copying %(Filename)%(Extension)</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">Copying %(Filename)%(Extension)</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">copy "%(FullPath)" "$(ProjectDir)\"
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">copy "%(FullPath)" "$(ProjectDir)\"
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">copy "%(FullPath)" "$(ProjectDir)\"
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">Copying %(Filename)%(Extension)</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">Copying %(Filename)%(Extension)</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">Copying %(Filename)%(Extension)</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">copy "%(FullPath)" "$(ProjectDir)\"
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">copy "%(FullPath)" "$(ProjectDir)\"
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">copy "%(FullPath)" "$(ProjectDir)\"
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
</CopyFileToFolders>
<CopyFileToFolders Include="..\..\..\test\button.bmp">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">Copying %(Filename)%(Extension)</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">Copying %(Filename)%(Extension)</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">Copying %(Filename)%(Extension)</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">copy "%(FullPath)" "$(ProjectDir)\"
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">copy "%(FullPath)" "$(ProjectDir)\"
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">copy "%(FullPath)" "$(ProjectDir)\"
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">Copying %(Filename)%(Extension)</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">Copying %(Filename)%(Extension)</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">Copying %(Filename)%(Extension)</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">copy "%(FullPath)" "$(ProjectDir)\"
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">copy "%(FullPath)" "$(ProjectDir)\"
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">copy "%(FullPath)" "$(ProjectDir)\"
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
</CopyFileToFolders>
<CopyFileToFolders Include="..\..\..\test\controllermap.bmp">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">Copying %(Filename)%(Extension)</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">Copying %(Filename)%(Extension)</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">Copying %(Filename)%(Extension)</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">copy "%(FullPath)" "$(ProjectDir)\"
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">copy "%(FullPath)" "$(ProjectDir)\"
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">copy "%(FullPath)" "$(ProjectDir)\"
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">Copying %(Filename)%(Extension)</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">Copying %(Filename)%(Extension)</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">Copying %(Filename)%(Extension)</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">copy "%(FullPath)" "$(ProjectDir)\"
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">copy "%(FullPath)" "$(ProjectDir)\"
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">copy "%(FullPath)" "$(ProjectDir)\"
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
</CopyFileToFolders>
<CopyFileToFolders Include="..\..\..\test\controllermap_back.bmp">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">Copying %(Filename)%(Extension)</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">Copying %(Filename)%(Extension)</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">Copying %(Filename)%(Extension)</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">copy "%(FullPath)" "$(ProjectDir)\"
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">copy "%(FullPath)" "$(ProjectDir)\"
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">copy "%(FullPath)" "$(ProjectDir)\"
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">Copying %(Filename)%(Extension)</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">Copying %(Filename)%(Extension)</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">Copying %(Filename)%(Extension)</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">copy "%(FullPath)" "$(ProjectDir)\"
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">copy "%(FullPath)" "$(ProjectDir)\"
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">copy "%(FullPath)" "$(ProjectDir)\"
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
</CopyFileToFolders>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\test\testgamecontroller.c" />
<ClCompile Include="..\..\..\test\testutils.c" />
</ItemGroup>
<ItemGroup>
<CopyFileToFolders Include="wingdk\MicrosoftGame.config">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">true</ExcludedFromBuild>
</CopyFileToFolders>
</ItemGroup>
<ItemGroup>
<CopyFileToFolders Include="PackageLayout.xml" />
</ItemGroup>
<ItemGroup>
<CopyFileToFolders Include="..\..\logos\Logo100x100.png" />
<CopyFileToFolders Include="..\..\logos\Logo150x150.png" />
<CopyFileToFolders Include="..\..\logos\Logo44x44.png" />
<CopyFileToFolders Include="..\..\logos\Logo480x480.png" />
</ItemGroup>
<ItemGroup>
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.141.GDK.C.Thunks.dll">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">true</ExcludedFromBuild>
</CopyFileToFolders>
</ItemGroup>
<ItemGroup>
<CopyFileToFolders Include="xboxseries\MicrosoftGame.config">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">true</ExcludedFromBuild>
</CopyFileToFolders>
</ItemGroup>
<ItemGroup>
<CopyFileToFolders Include="xboxone\MicrosoftGame.config">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Desktop.x64'">true</ExcludedFromBuild>
</CopyFileToFolders>
</ItemGroup>
<ItemGroup>
<CopyFileToFolders Include="..\..\logos\SplashScreenImage.png" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View file

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="..\..\..\test\testgamecontroller.c" />
<ClCompile Include="..\..\..\test\testutils.c" />
</ItemGroup>
<ItemGroup>
<CopyFileToFolders Include="..\..\..\test\controllermap_back.bmp" />
<CopyFileToFolders Include="..\..\..\test\axis.bmp" />
<CopyFileToFolders Include="..\..\..\test\button.bmp" />
<CopyFileToFolders Include="..\..\..\test\controllermap.bmp" />
<CopyFileToFolders Include="..\..\logos\Logo44x44.png">
<Filter>logos</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="..\..\logos\Logo100x100.png">
<Filter>logos</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="..\..\logos\Logo150x150.png">
<Filter>logos</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="..\..\logos\Logo480x480.png">
<Filter>logos</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.141.GDK.C.Thunks.dll">
<Filter>wingdk</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="wingdk\MicrosoftGame.config">
<Filter>wingdk</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="xboxseries\MicrosoftGame.config">
<Filter>xboxseries</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="xboxone\MicrosoftGame.config">
<Filter>xboxone</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="..\..\logos\SplashScreenImage.png">
<Filter>logos</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="PackageLayout.xml" />
</ItemGroup>
<ItemGroup>
<Filter Include="logos">
<UniqueIdentifier>{5e858cf0-6fba-498d-b33d-11c8ecbb79c7}</UniqueIdentifier>
</Filter>
<Filter Include="xboxseries">
<UniqueIdentifier>{5790a250-283e-4f51-8f28-6a977d3c7a6c}</UniqueIdentifier>
</Filter>
<Filter Include="wingdk">
<UniqueIdentifier>{a4d235e4-4017-4193-af62-ecb2ac249be4}</UniqueIdentifier>
</Filter>
<Filter Include="xboxone">
<UniqueIdentifier>{e704dcb9-c83c-4c94-a139-b0f3e3f428f2}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>

Some files were not shown because too many files have changed in this diff Show more