More progress on structures. Modify structure template.
Notice 'a' used for .TS/.TE will has effect on other columns, so used
once for it to have a space for its width then other columns could be
defined with just 'l'.
COVER.md
src/SDL_AudioCVT.3
src/SDL_AudioDeviceEvent.3
src/SDL_AudioSpec.3
src/SDL_AudioStream.3
src/SDL_Color.3
src/SDL_ControllerAxisEvent.3
src/SDL_ControllerButtonEvent.3
src/SDL_ControllerDeviceEvent.3
src/SDL_DisplayMode.3
src/SDL_DollarGestureEvent.3
src/SDL_StructureTemplate
More progress on Structures
Discovered .SS for sub-heading as compared to .SH.
Today has more complex layout to achieve in which leads me to learn more about roff/troff (I don't even know the differences for now :p) commands.
More discovery like
More progress for structures
Discover that we need to escape backslash character which can be
optained via \(rs (see http://man7.org/linux/man-pages/man7/groff.7.html)
More progress for structures
COVER.md
src/SDL_HapticLeftRight.3
src/SDL_HapticPeriodic.3
src/SDL_HapticRamp.3
src/SDL_JoyAxisEvent.3
src/SDL_JoyBallEvent.3
src/SDL_JoyButtonEvent.3
src/SDL_JoyDeviceEvent.3
src/SDL_JoyHatEvent.3
More progress on structures
COVER.md
src/SDL_KeyboardEvent.3
src/SDL_Keysym.3
src/SDL_MessageBoxButtonData.3
src/SDL_MessageBoxColor.3
src/SDL_MessageBoxColorScheme.3
src/SDL_MessageBoxData.3
src/SDL_MouseButtonEvent.3
src/SDL_MouseMotionEvent.3
src/SDL_MouseWheelEvent.3
src/SDL_MultiGestureEvent.3
src/SDL_Palette.3
More progress on structures
COVER.md
src/SDL_PixelFormat.3
src/SDL_Point.3
More progress on structures
COVER.md
src/SDL_QuitEvent.3
src/SDL_RWops.3
src/SDL_Rect.3
src/SDL_Renderer.3
src/SDL_RendererInfo.3
src/SDL_Surface.3
Complete structures section
COVER.md
src/SDL_SysWMEvent.3
src/SDL_SysWMInfo.3
src/SDL_SysWMmsg.3
src/SDL_TextEditingEvent.3
src/SDL_TextInputEvent.3
src/SDL_Texture.3
src/SDL_TouchFingerEvent.3
src/SDL_UserEvent.3
src/SDL_WindowEvent.3
src/SDL_assert_data.3
src/SDL_atomic_t.3
src/SDL_version.3
Made first progress on Functions section
COVER.md
src/SDL_AddEventWatch.3
src/SDL_AddHintCallback.3
src/SDL_AddTimer.3
src/SDL_AllocFormat.3
src/SDL_AllocPalette.3
src/SDL_AllocRW.3
src/SDL_AndroidGetActivity.3
src/SDL_FunctionTemplate
Started to gain benefit of previous sections which have been done in completing Functions section whenever I need to refer back to certain struct or don't know about certain references.
Trying to get NDK build workflow for SDL2 works but not yet.
To test the sample code for SDL_AndroidGetActivity
by building a real Android app via NDK. Still not work. Tried with several NDK versions without luck.
Make progress on Functions section
COVER.md
src/SDL_AndroidGetExternalStoragePath.3
src/SDL_AndroidGetExternalStorageState.3
src/SDL_AndroidGetInternalStoragePath.3
src/SDL_AndroidGetJNIEnv.3
--
Still didn't get NDK build working for Android-related functions.
Finally make it works!
I use 15c
ndk version. And slightly modified app/build.gradle to satisfy the build process (note about abiFilters for both debug and release target, I need to specify it then filter again in android domain to let it build all architectures in need) at https://gist.github.com/haxpor/7da795ef505ff65773dbd1af8a11e2d1
Result see attached image.
M COVER.md
M install.sh
M src/SDL_AddEventWatch.3
M src/SDL_AddHintCallback.3
M src/SDL_AddTimer.3
M src/SDL_AllocFormat.3
M src/SDL_AllocPalette.3
M src/SDL_AllocRW.3
M src/SDL_AndroidGetActivity.3
M src/SDL_AndroidGetExternalStoragePath.3
M src/SDL_AndroidGetExternalStorageState.3
M src/SDL_AndroidGetInternalStoragePath.3
M src/SDL_AndroidGetJNIEnv.3
D src/SDL_AtomicAdd.3
D src/SDL_AtomicCAS.3
D src/SDL_AtomicCASPtr.3
D src/SDL_AtomicDecRef.3
D src/SDL_AtomicGet.3
D src/SDL_AtomicGetPtr.3
D src/SDL_AtomicIncRef.3
D src/SDL_AtomicLock.3
D src/SDL_AtomicSet.3
D src/SDL_AtomicSetPtr.3
D src/SDL_AtomicTryLock.3
D src/SDL_AtomicUnlock.3
M src/SDL_FunctionTemplate
Made more progress on Function section
COVER.md
src/SDL_AudioInit.3
src/SDL_AudioQuit.3
src/SDL_BlitScaled.3
src/SDL_BlitSurface.3
src/SDL_BuildAudioCVT.3
src/SDL_COMPILEDVERSION.3
src/SDL_CalculateGammaRamp.3
src/SDL_CaptureMouse.3
Made progress on Functions section
COVER.md
src/SDL_ClearError.3
src/SDL_ClearHints.3
src/SDL_ClearQueuedAudio.3
src/SDL_CloseAudio.3
Now I'm at the point that learning more from lazyfoo's tutorial for enough time before going back to continue for sdl2-manpage is a better idea to grasp what necessary APIs to be used.
As well, finally complete sample 17 which is long overdue.
Add sample 17 with improved Makefile and added template.c source
17_mouseEvents/.gitignore
17_mouseEvents/LButton.c
17_mouseEvents/LButton.h
17_mouseEvents/LTexture.c
17_mouseEvents/LTexture.h
17_mouseEvents/Makefile
17_mouseEvents/README.md
17_mouseEvents/button.png
17_mouseEvents/common.c
17_mouseEvents/common.h
17_mouseEvents/mouseevents.c
17_mouseEvents/mouseevents.out
template.c
Add tutorial 18
18_keyStates/LButton.c
18_keyStates/LButton.h
18_keyStates/LTexture.c
18_keyStates/LTexture.h
18_keyStates/LTexture.o
18_keyStates/Makefile
18_keyStates/README.md
18_keyStates/common.c
18_keyStates/common.h
18_keyStates/common.o
18_keyStates/down.png
18_keyStates/keystates.c
18_keyStates/keystates.o
18_keyStates/keystates.out
18_keyStates/left.png
18_keyStates/press.png
18_keyStates/right.png
18_keyStates/up.png
Finish 19 with improved and spread into 2 sub-sample
2 sub-sample taking into account both joystick and game controller
sub-system. Each of both has subtle APIs to deal with in code.
19_gamepadsAndJoysticks/.gitignore
19_gamepadsAndJoysticks/LButton.c
19_gamepadsAndJoysticks/LButton.h
19_gamepadsAndJoysticks/LTexture.c
19_gamepadsAndJoysticks/LTexture.h
19_gamepadsAndJoysticks/Makefile
19_gamepadsAndJoysticks/README.md
19_gamepadsAndJoysticks/arrow.png
19_gamepadsAndJoysticks/common.c
19_gamepadsAndJoysticks/common.h
19_gamepadsAndJoysticks/controllers.c
19_gamepadsAndJoysticks/joysticks.c
Add 20
With improved over setting NULL to freed variables in close() from 19.
20_forcefeedback/.gitignore
20_forcefeedback/LButton.c
20_forcefeedback/LButton.h
20_forcefeedback/LTexture.c
20_forcefeedback/LTexture.h
20_forcefeedback/Makefile
20_forcefeedback/README.md
20_forcefeedback/common.c
20_forcefeedback/common.h
20_forcefeedback/haptic.c
20_forcefeedback/splash.png
--
have to go back to use xcode 9.4 to build sdl2 on mojave to get rid of initial black screen on mojave.
I now made progress on building on platforms I will be targeting, sorted accordingly to priority
PC
Android
iOS
The last one is the most difficult among others, I will write blog post about this on blog.wasin.io as well. Now, it's ok!
The screenshots are from rectangles.c sample.
First one from ios device, another from PC (for testing).
This whole process uses mingw64 to build both 32 and 64 bit app.
Along the way, updated virtualbox (windows xp) to support 3d acceleration thus it will be able to run opengl app.
I asked my friend if he's willing to help me test on real windows machine to confirm.
PS. build against SDL 2.0.9
This submission is continued and same same to #24.
Add 21. Removed unneeded README.md file from 18 and 20.
This sample also demonstrates how to do mroe complicated cross-compile
for libraries that also have dependencies namely SDL_image and
SDL_mixer.
18_keyStates/README.md
20_forcefeedback/README.md
21_sfxMusic/.gitignore
21_sfxMusic/LButton.c
21_sfxMusic/LButton.h
21_sfxMusic/LTexture.c
21_sfxMusic/LTexture.h
21_sfxMusic/Makefile
21_sfxMusic/README.md
21_sfxMusic/beat.wav
21_sfxMusic/bensound-ukulele.mp3
21_sfxMusic/bensound-ukulele.ogg
21_sfxMusic/common.c
21_sfxMusic/common.h
21_sfxMusic/high.wav
21_sfxMusic/libmpg123.dylib
21_sfxMusic/libvorbisfile.dylib
21_sfxMusic/low.wav
21_sfxMusic/medium.wav
21_sfxMusic/prompt.png
21_sfxMusic/scratch.wav
21_sfxMusic/sfxmusic.c
21_sfxMusic/sfxmusic.exe
--
Successfully tested cross-compile result on Windows 32 bit on top of VirtualBox, and on dev machine macOS. Works fine. But hardware acceleration support on virtualbox makes it slower to run.