Rev 5000 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5000 | Rev 5066 | ||
---|---|---|---|
Line 22... | Line 22... | ||
22 | 22 | ||
23 | extern "C" { |
23 | extern "C" { |
24 | #define DEFAULT_FADE_FRAMES 10
|
24 | #define DEFAULT_FADE_FRAMES 10
|
25 | 25 | ||
26 | extern void SDL_Android_Init(JNIEnv *env, jclass cls); |
26 | extern void SDL_Android_Init(JNIEnv *env, jclass cls); |
27 | // This is a new function I put into SDL2, file SDL_androidgl.c
|
- | |
28 | extern void SDL_SetSwapBufferCallBack(void (*pt2Func)(void)); |
- | |
29 | - | ||
30 | extern char const *G_GetStringFromSavegame(const char *filename, int type); |
27 | extern char const *G_GetStringFromSavegame(const char *filename, int type); |
31 | extern int32_t G_GetScreenshotFromSavegame(const char *filename, char *pal, char *data); |
28 | extern int32_t G_GetScreenshotFromSavegame(const char *filename, char *pal, char *data); |
32 | 29 | ||
33 | #include "in_android.h"
|
30 | #include "in_android.h"
|
34 | #include "../function.h"
|
31 | #include "../function.h"
|
Line 78... | Line 75... | ||
78 | 75 | ||
79 | 76 | ||
80 | static int controlsCreated = 0; |
77 | static int controlsCreated = 0; |
81 | touchcontrols::TouchControlsContainer controlsContainer; |
78 | touchcontrols::TouchControlsContainer controlsContainer; |
82 | 79 | ||
83 | touchcontrols::TouchControls *tcBlankTap = 0; |
80 | touchcontrols::TouchControls *tcBlankTap; |
84 | touchcontrols::TouchControls *tcYesNo = 0; |
81 | touchcontrols::TouchControls *tcYesNo; |
85 | touchcontrols::TouchControls *tcMenuMain = 0; |
82 | touchcontrols::TouchControls *tcMenuMain; |
86 | touchcontrols::TouchControls *tcGameMain = 0; |
83 | touchcontrols::TouchControls *tcGameMain; |
87 | touchcontrols::TouchControls *tcGameWeapons = 0; |
84 | touchcontrols::TouchControls *tcGameWeapons; |
88 | // touchcontrols::TouchControls *tcInventory=0;
|
85 | // touchcontrols::TouchControls *tcInventory;
|
89 | touchcontrols::TouchControls *tcAutomap = 0; |
86 | touchcontrols::TouchControls *tcAutomap; |
90 | 87 | ||
91 | 88 | ||
92 | touchcontrols::TouchJoy *touchJoyLeft; |
89 | touchcontrols::TouchJoy *touchJoyLeft; |
93 | touchcontrols::WheelSelect *weaponWheel; |
90 | touchcontrols::WheelSelect *weaponWheel; |
94 | 91 | ||
95 | extern JNIEnv *env_; |
92 | extern JNIEnv *env_; |
96 | JavaVM *jvm_; |
93 | JavaVM *jvm_; |
97 | 94 | ||
98 | touchcontrols::Button *inv_buttons[GET_MAX]; |
95 | touchcontrols::Button *inv_buttons[GET_MAX]; |
99 | 96 | ||
100 | std::string obbPath; |
- | |
101 | std::string gamePath; |
97 | std::string obbPath, gamePath; |
102 | 98 | ||
103 | void openGLStart() |
99 | void openGLStart() |
104 | {
|
100 | {
|
105 | if (curRenderer == REND_GL) |
101 | if (curRenderer == REND_GL) |
106 | {
|
102 | {
|
Line 202... | Line 198... | ||
202 | void showWeaponsInventory(bool show) |
198 | void showWeaponsInventory(bool show) |
203 | {
|
199 | {
|
204 | if (show) |
200 | if (show) |
205 | {
|
201 | {
|
206 | for (int n = 0; n < 10; n++) |
202 | for (int n = 0; n < 10; n++) |
207 | {
|
- | |
208 | weaponWheel->setSegmentEnabled(n, (PortableRead(READ_WEAPONS) >> n) & 0x1); |
203 | weaponWheel->setSegmentEnabled(n, (PortableRead(READ_WEAPONS) >> n) & 0x1); |
209 | }
|
- | |
210 | 204 | ||
211 | // Show inventory buttons
|
205 | // Show inventory buttons
|
212 | tcGameWeapons->setAllButtonsEnable(true); |
206 | tcGameWeapons->setAllButtonsEnable(true); |
213 | 207 | ||
214 | tcGameWeapons->fade(touchcontrols::FADE_IN, 5); // fade in |
208 | tcGameWeapons->fade(touchcontrols::FADE_IN, 5); // fade in |