Fixed doxygen warning and markdown formatting.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Mon, 11 Aug 2014 23:13:20 +0200
changeset 9050bc9616da37cd
parent 9049 411e05b86ac3
child 9051 efa8a496faaf
Fixed doxygen warning and markdown formatting.
docs/README-android.md
docs/README-ios.md
     1.1 --- a/docs/README-android.md	Mon Aug 11 22:53:03 2014 +0200
     1.2 +++ b/docs/README-android.md	Mon Aug 11 23:13:20 2014 +0200
     1.3 @@ -144,18 +144,19 @@
     1.4  	src/com/gamemaker/game/MyGame.java
     1.5  
     1.6  Here's an example of a minimal class file:
     1.7 ---- MyGame.java --------------------------
     1.8 -package com.gamemaker.game;
     1.9  
    1.10 -import org.libsdl.app.SDLActivity; 
    1.11 -
    1.12 -/* 
    1.13 - * A sample wrapper class that just calls SDLActivity 
    1.14 - */ 
    1.15 -
    1.16 -public class MyGame extends SDLActivity { }
    1.17 -
    1.18 -------------------------------------------
    1.19 +    --- MyGame.java --------------------------
    1.20 +    package com.gamemaker.game;
    1.21 +    
    1.22 +    import org.libsdl.app.SDLActivity; 
    1.23 +    
    1.24 +    /* 
    1.25 +     * A sample wrapper class that just calls SDLActivity 
    1.26 +     */ 
    1.27 +    
    1.28 +    public class MyGame extends SDLActivity { }
    1.29 +    
    1.30 +    ------------------------------------------
    1.31  
    1.32  Then replace "SDLActivity" in AndroidManifest.xml with the name of your
    1.33  class, .e.g. "MyGame"
    1.34 @@ -320,15 +321,16 @@
    1.35  addresses in the stack trace to lines in your code.
    1.36  
    1.37  For example, if your crash looks like this:
    1.38 -I/DEBUG   (   31): signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 400085d0
    1.39 -I/DEBUG   (   31):  r0 00000000  r1 00001000  r2 00000003  r3 400085d4
    1.40 -I/DEBUG   (   31):  r4 400085d0  r5 40008000  r6 afd41504  r7 436c6a7c
    1.41 -I/DEBUG   (   31):  r8 436c6b30  r9 435c6fb0  10 435c6f9c  fp 4168d82c
    1.42 -I/DEBUG   (   31):  ip 8346aff0  sp 436c6a60  lr afd1c8ff  pc afd1c902  cpsr 60000030
    1.43 -I/DEBUG   (   31):          #00  pc 0001c902  /system/lib/libc.so
    1.44 -I/DEBUG   (   31):          #01  pc 0001ccf6  /system/lib/libc.so
    1.45 -I/DEBUG   (   31):          #02  pc 000014bc  /data/data/org.libsdl.app/lib/libmain.so
    1.46 -I/DEBUG   (   31):          #03  pc 00001506  /data/data/org.libsdl.app/lib/libmain.so
    1.47 +
    1.48 +    I/DEBUG   (   31): signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 400085d0
    1.49 +    I/DEBUG   (   31):  r0 00000000  r1 00001000  r2 00000003  r3 400085d4
    1.50 +    I/DEBUG   (   31):  r4 400085d0  r5 40008000  r6 afd41504  r7 436c6a7c
    1.51 +    I/DEBUG   (   31):  r8 436c6b30  r9 435c6fb0  10 435c6f9c  fp 4168d82c
    1.52 +    I/DEBUG   (   31):  ip 8346aff0  sp 436c6a60  lr afd1c8ff  pc afd1c902  cpsr 60000030
    1.53 +    I/DEBUG   (   31):          #00  pc 0001c902  /system/lib/libc.so
    1.54 +    I/DEBUG   (   31):          #01  pc 0001ccf6  /system/lib/libc.so
    1.55 +    I/DEBUG   (   31):          #02  pc 000014bc  /data/data/org.libsdl.app/lib/libmain.so
    1.56 +    I/DEBUG   (   31):          #03  pc 00001506  /data/data/org.libsdl.app/lib/libmain.so
    1.57  
    1.58  You can see that there's a crash in the C library being called from the main code.
    1.59  I run addr2line with the debug version of my code:
    1.60 @@ -364,11 +366,12 @@
    1.61  
    1.62  Once valgrind is built, you can create a wrapper script to launch your
    1.63  application with it, changing org.libsdl.app to your package identifier:
    1.64 ---- start_valgrind_app -------------------
    1.65 -#!/system/bin/sh
    1.66 -export TMPDIR=/data/data/org.libsdl.app
    1.67 -exec /data/local/Inst/bin/valgrind --log-file=/sdcard/valgrind.log --error-limit=no $*
    1.68 -------------------------------------------
    1.69 +
    1.70 +    --- start_valgrind_app -------------------
    1.71 +    #!/system/bin/sh
    1.72 +    export TMPDIR=/data/data/org.libsdl.app
    1.73 +    exec /data/local/Inst/bin/valgrind --log-file=/sdcard/valgrind.log --error-limit=no $*
    1.74 +    ------------------------------------------
    1.75  
    1.76  Then push it to the device:
    1.77  	adb push start_valgrind_app /data/local
     2.1 --- a/docs/README-ios.md	Mon Aug 11 22:53:03 2014 +0200
     2.2 +++ b/docs/README-ios.md	Mon Aug 11 23:13:20 2014 +0200
     2.3 @@ -68,56 +68,56 @@
     2.4  
     2.5  e.g.
     2.6  
     2.7 -int HandleAppEvents(void *userdata, SDL_Event *event)
     2.8 -{
     2.9 -    switch (event->type)
    2.10 +    int HandleAppEvents(void *userdata, SDL_Event *event)
    2.11      {
    2.12 -    case SDL_APP_TERMINATING:
    2.13 -        /* Terminate the app.
    2.14 -           Shut everything down before returning from this function.
    2.15 -        */
    2.16 +        switch (event->type)
    2.17 +        {
    2.18 +        case SDL_APP_TERMINATING:
    2.19 +            /* Terminate the app.
    2.20 +               Shut everything down before returning from this function.
    2.21 +            */
    2.22 +            return 0;
    2.23 +        case SDL_APP_LOWMEMORY:
    2.24 +            /* You will get this when your app is paused and iOS wants more memory.
    2.25 +               Release as much memory as possible.
    2.26 +            */
    2.27 +            return 0;
    2.28 +        case SDL_APP_WILLENTERBACKGROUND:
    2.29 +            /* Prepare your app to go into the background.  Stop loops, etc.
    2.30 +               This gets called when the user hits the home button, or gets a call.
    2.31 +            */
    2.32 +            return 0;
    2.33 +        case SDL_APP_DIDENTERBACKGROUND:
    2.34 +            /* This will get called if the user accepted whatever sent your app to the background.
    2.35 +               If the user got a phone call and canceled it, you'll instead get an SDL_APP_DIDENTERFOREGROUND event and restart your loops.
    2.36 +               When you get this, you have 5 seconds to save all your state or the app will be terminated.
    2.37 +               Your app is NOT active at this point.
    2.38 +            */
    2.39 +            return 0;
    2.40 +        case SDL_APP_WILLENTERFOREGROUND:
    2.41 +            /* This call happens when your app is coming back to the foreground.
    2.42 +               Restore all your state here.
    2.43 +            */
    2.44 +            return 0;
    2.45 +        case SDL_APP_DIDENTERFOREGROUND:
    2.46 +            /* Restart your loops here.
    2.47 +               Your app is interactive and getting CPU again.
    2.48 +            */
    2.49 +            return 0;
    2.50 +        default:
    2.51 +            /* No special processing, add it to the event queue */
    2.52 +            return 1;
    2.53 +        }
    2.54 +    }
    2.55 +    
    2.56 +    int main(int argc, char *argv[])
    2.57 +    {
    2.58 +        SDL_SetEventFilter(HandleAppEvents, NULL);
    2.59 +    
    2.60 +        ... run your main loop
    2.61 +    
    2.62          return 0;
    2.63 -    case SDL_APP_LOWMEMORY:
    2.64 -        /* You will get this when your app is paused and iOS wants more memory.
    2.65 -           Release as much memory as possible.
    2.66 -        */
    2.67 -        return 0;
    2.68 -    case SDL_APP_WILLENTERBACKGROUND:
    2.69 -        /* Prepare your app to go into the background.  Stop loops, etc.
    2.70 -           This gets called when the user hits the home button, or gets a call.
    2.71 -        */
    2.72 -        return 0;
    2.73 -    case SDL_APP_DIDENTERBACKGROUND:
    2.74 -        /* This will get called if the user accepted whatever sent your app to the background.
    2.75 -           If the user got a phone call and canceled it, you'll instead get an SDL_APP_DIDENTERFOREGROUND event and restart your loops.
    2.76 -           When you get this, you have 5 seconds to save all your state or the app will be terminated.
    2.77 -           Your app is NOT active at this point.
    2.78 -        */
    2.79 -        return 0;
    2.80 -    case SDL_APP_WILLENTERFOREGROUND:
    2.81 -        /* This call happens when your app is coming back to the foreground.
    2.82 -           Restore all your state here.
    2.83 -        */
    2.84 -        return 0;
    2.85 -    case SDL_APP_DIDENTERFOREGROUND:
    2.86 -        /* Restart your loops here.
    2.87 -           Your app is interactive and getting CPU again.
    2.88 -        */
    2.89 -        return 0;
    2.90 -    default:
    2.91 -        /* No special processing, add it to the event queue */
    2.92 -        return 1;
    2.93      }
    2.94 -}
    2.95 -
    2.96 -int main(int argc, char *argv[])
    2.97 -{
    2.98 -    SDL_SetEventFilter(HandleAppEvents, NULL);
    2.99 -
   2.100 -    ... run your main loop
   2.101 -
   2.102 -    return 0;
   2.103 -}
   2.104  
   2.105      
   2.106  ==============================================================================
   2.107 @@ -198,28 +198,28 @@
   2.108  
   2.109  e.g.
   2.110  
   2.111 -extern "C"
   2.112 -void ShowFrame(void*)
   2.113 -{
   2.114 -    ... do event handling, frame logic and rendering
   2.115 -}
   2.116 -
   2.117 -int main(int argc, char *argv[])
   2.118 -{
   2.119 -   ... initialize game ...
   2.120 -
   2.121 -#if __IPHONEOS__
   2.122 -        // Initialize the Game Center for scoring and matchmaking
   2.123 -        InitGameCenter();
   2.124 -
   2.125 -        // Set up the game to run in the window animation callback on iOS
   2.126 -        // so that Game Center and so forth works correctly.
   2.127 -        SDL_iPhoneSetAnimationCallback(window, 1, ShowFrame, NULL);
   2.128 -#else
   2.129 -        while ( running ) {
   2.130 -                ShowFrame(0);
   2.131 -                DelayFrame();
   2.132 -        }
   2.133 -#endif
   2.134 -        return 0;
   2.135 -}
   2.136 +    extern "C"
   2.137 +    void ShowFrame(void*)
   2.138 +    {
   2.139 +        ... do event handling, frame logic and rendering
   2.140 +    }
   2.141 +    
   2.142 +    int main(int argc, char *argv[])
   2.143 +    {
   2.144 +        ... initialize game ...
   2.145 +    
   2.146 +    #if __IPHONEOS__
   2.147 +            // Initialize the Game Center for scoring and matchmaking
   2.148 +            InitGameCenter();
   2.149 +    
   2.150 +            // Set up the game to run in the window animation callback on iOS
   2.151 +            // so that Game Center and so forth works correctly.
   2.152 +            SDL_iPhoneSetAnimationCallback(window, 1, ShowFrame, NULL);
   2.153 +    #else
   2.154 +            while ( running ) {
   2.155 +                    ShowFrame(0);
   2.156 +                    DelayFrame();
   2.157 +            }
   2.158 +    #endif
   2.159 +            return 0;
   2.160 +    }