no message

This commit is contained in:
BADIM-PC\Vadim 2018-02-13 18:45:54 +03:00
parent 5c276e4ec0
commit 9aab993fe4
3 changed files with 21 additions and 54 deletions

View File

@ -905,14 +905,6 @@ static void processKeyboard(Code* code)
else if(keyWasPressed(tic_key_right)) rightWord(code); else if(keyWasPressed(tic_key_right)) rightWord(code);
else if(keyWasPressed(tic_key_tab)) doTab(code, shift, ctrl); else if(keyWasPressed(tic_key_tab)) doTab(code, shift, ctrl);
} }
// else if(keymod & KMOD_GUI)
// {
// switch(keycode)
// {
// case SDLK_LEFT: goHome(code); break;
// case SDLK_RIGHT: goEnd(code); break;
// }
// }
if(keyWasPressed(tic_key_a)) selectAll(code); if(keyWasPressed(tic_key_a)) selectAll(code);
else if(keyWasPressed(tic_key_z)) undo(code); else if(keyWasPressed(tic_key_z)) undo(code);

View File

@ -28,7 +28,6 @@ static struct
struct struct
{ {
// tic80_gamepads keyboard;
tic80_gamepads touch; tic80_gamepads touch;
tic80_gamepads joystick; tic80_gamepads joystick;
@ -37,7 +36,6 @@ static struct
bool show; bool show;
s32 counter; s32 counter;
s32 alpha; s32 alpha;
bool backProcessed;
struct struct
{ {
@ -483,26 +481,24 @@ static void processJoysticks()
gamepad->x = SDL_JoystickGetButton(joystick, 2); gamepad->x = SDL_JoystickGetButton(joystick, 2);
gamepad->y = SDL_JoystickGetButton(joystick, 3); gamepad->y = SDL_JoystickGetButton(joystick, 3);
// for(s32 i = 5; i < numButtons; i++) for(s32 i = 5; i < numButtons; i++)
// { {
// s32 back = SDL_JoystickGetButton(joystick, i); s32 back = SDL_JoystickGetButton(joystick, i);
// if(back) if(back)
// { {
// if(!platform.gamepad.backProcessed) tic_mem* tic = platform.studio->tic;
// {
// if(isGameMenu())
// {
// platform.mode == TIC_MENU_MODE ? hideGameMenu() : showGameMenu();
// platform.gamepad.backProcessed = true;
// }
// }
// return; for(s32 i = 0; i < TIC80_KEY_BUFFER; i++)
// } {
// } if(!tic->ram.input.keyboard.keys[i])
{
// platform.gamepad.backProcessed = false; tic->ram.input.keyboard.keys[i] = tic_key_escape;
break;
}
}
}
}
} }
} }
@ -514,8 +510,6 @@ static void processJoysticks()
static void processGamepad() static void processGamepad()
{ {
// processKeyboardGamepad();
#if !defined(__EMSCRIPTEN__) && !defined(__MACOSX__) #if !defined(__EMSCRIPTEN__) && !defined(__MACOSX__)
processTouchGamepad(); processTouchGamepad();
#endif #endif
@ -524,7 +518,6 @@ static void processGamepad()
{ {
platform.studio->tic->ram.input.gamepads.data = 0; platform.studio->tic->ram.input.gamepads.data = 0;
// platform.studio->tic->ram.input.gamepads.data |= platform.gamepad.keyboard.data;
platform.studio->tic->ram.input.gamepads.data |= platform.gamepad.touch.data; platform.studio->tic->ram.input.gamepads.data |= platform.gamepad.touch.data;
platform.studio->tic->ram.input.gamepads.data |= platform.gamepad.joystick.data; platform.studio->tic->ram.input.gamepads.data |= platform.gamepad.joystick.data;
} }
@ -544,9 +537,6 @@ static void pollEvent()
{ {
switch(event.type) switch(event.type)
{ {
// case SDL_KEYDOWN:
// if(processShortcuts(&event.key)) return NULL;
// break;
case SDL_MOUSEWHEEL: case SDL_MOUSEWHEEL:
{ {
input->mouse.scrollx = event.wheel.x; input->mouse.scrollx = event.wheel.x;
@ -599,8 +589,8 @@ static void pollEvent()
// if(!platform.gesture.active) // if(!platform.gesture.active)
processMouse(); processMouse();
processGamepad();
processKeyboard(); processKeyboard();
processGamepad();
} }
static void blitTexture() static void blitTexture()
@ -828,26 +818,12 @@ static void tick()
// return; // return;
// } // }
// SDL_SystemCursor cursor = platform.mouse.system;
// platform.mouse.system = SDL_SYSTEM_CURSOR_ARROW;
SDL_RenderClear(platform.renderer); SDL_RenderClear(platform.renderer);
blitTexture(); blitTexture();
renderCursor(); renderCursor();
// if(platform.mode == TIC_RUN_MODE && platform.studio->tic->input.gamepad)
renderGamepad(); renderGamepad();
// if(platform.mode == TIC_MENU_MODE || platform.mode == TIC_SURF_MODE)
// renderGamepad();
// if(platform.mouse.system != cursor)
// SDL_SetCursor(SDL_CreateSystemCursor(platform.mouse.system));
SDL_RenderPresent(platform.renderer); SDL_RenderPresent(platform.renderer);
blitSound(); blitSound();
@ -856,7 +832,6 @@ static void tick()
// should work async with callback // should work async with callback
static const char* getAppFolder() static const char* getAppFolder()
{ {
static char appFolder[FILENAME_MAX]; static char appFolder[FILENAME_MAX];
#if defined(__EMSCRIPTEN__) #if defined(__EMSCRIPTEN__)

View File

@ -155,7 +155,7 @@ void studioConfigChanged();
void setStudioMode(EditorMode mode); void setStudioMode(EditorMode mode);
void resumeRunMode(); void resumeRunMode();
EditorMode getStudioMode(); EditorMode getStudioMode();
void exitStudio(); TIC80_API void exitStudio();
u32 unzip(u8** dest, const u8* source, size_t size); u32 unzip(u8** dest, const u8* source, size_t size);
void str2buf(const char* str, s32 size, void* buf, bool flip); void str2buf(const char* str, s32 size, void* buf, bool flip);
@ -269,4 +269,4 @@ typedef struct
NetVersion netVersionRequest(Net* net); NetVersion netVersionRequest(Net* net);
void netDirRequest(Net* net, const char* path, ListCallback callback, void* data); void netDirRequest(Net* net, const char* path, ListCallback callback, void* data);
void showMessageBox(const char* title, const char* message); void showMessageBox(const char* title, const char* message);
void updateStudioProject(); TIC80_API void updateStudioProject();