Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - ssss

Pages: 1
1
Third Party / CLI and new IDE for Enigma
« on: September 02, 2013, 09:15:19 PM »
New IDE in development written in python.

http://tinypic.com/view.php?pic=345yofs&s=5


http://tinypic.com/view.php?pic=9u5jit&s=5


Requires Python 2.7 or 3 and PyQt4 installed on linux.

Download Instructions for Windows
download zip from here https://github.com/sssstest/GameEditor/archive/master.zip
or run
Code: [Select]
git clone https://github.com/sssstest/GameEditor.gitYou need python from http://python.org/download/ and you need PyQt4 from http://www.riverbankcomputing.com/software/pyqt/download
PyQt5 hasn't been tested and probably doesn't work yet.

Download Depenencies
x86
http://python.org/ftp/python/2.7.5/python-2.7.5.msi
http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.10.3/PyQt4-4.10.3-gpl-Py2.7-Qt4.8.5-x32.exe

x64
http://python.org/ftp/python/2.7.5/python-2.7.5.amd64.msi
http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.10.3/PyQt4-4.10.3-gpl-Py2.7-Qt4.8.5-x64.exe

Once you have python and PyQt4 installed you can run the GameEditor ide by running ide.py from windows explorer or from the command line.

Supports reading GameMaker and ENIGMA game formats:
GMK version 800+ (reading and writing), GMX, GMZ, EGM
Writing gmk is suppored but disabled for safety right now. You should keep backups just in case.

The command line interface cli.py is for converting and compiling games on the command line

Code: [Select]
usage: cli.py [-h] [-o WRITEFILE] [-c CODE] [-r] [-t] [FILE.GMK]

input file with no options builds in debug mode and runs game

positional arguments:
  FILE.GMK      read file (gmk gm81 egm gmx gmz formats)

optional arguments:
  -h, --help    show this help message and exit
  -o WRITEFILE  convert to output file and exit (gmk ggg formats)
  -c CODE       empty game with object create event code
  -r            run game emode

You can test GML code with the cli using
Code: [Select]
python GameEditor/cli.py -c 'show_message("test");game_end();'That will create a game with 1 room and 1 object and the code in an event create action. On the terminal it will show
show_message: test

2
ALLCAPS BOARD / Double posting poll
« on: September 01, 2013, 09:08:46 PM »
Poll

3
The value for special vk_ keys is looked up from X keysym in enigma::keymap. The array enigma::usermap is set in ENIGMAsystem/SHELL/Platforms/xlib/XLIBwindow.cpp line 367:

Code: [Select]
for (int i = 'a'; i <= 'z'; i++) // 'a' to 'z' wrap to 'A' to 'Z'
      usermap[i] = i + 'A' - 'a';

In ENIGMAsystem/SHELL/Platforms/xlib/XLIBmain.cpp line 70 the result keycode should not be looked up through enigma::usermap because it changes lowercase to uppercase, corrupting the meaning of vk_ codes for numpad and function keys between vk_numpad1 = 97 and vk_f11 = 122. Diff fixes the problem:

Code: [Select]
--- a/ENIGMAsystem/SHELL/Platforms/xlib/XLIBmain.cpp
+++ b/ENIGMAsystem/SHELL/Platforms/xlib/XLIBmain.cpp
@@ -69,7 +69,8 @@ namespace enigma
                 return 0;
 
               if (!(gk & 0xFF00)) actualKey = enigma::usermap[gk];
-              else actualKey = enigma::usermap[(int)enigma::keymap[gk & 0xFF]];
+              else actualKey = (int)enigma::keymap[gk & 0xFF];
+              //else actualKey = enigma::usermap[(int)enigma::keymap[gk & 0xFF]];
               { // Set keyboard_lastchar. Seems to work without
                   char str[1];
                   int len = XLookupString(&e.xkey, str, 1, NULL, NULL);
@@ -91,7 +92,8 @@ namespace enigma
               return 0;
 
             if (!(gk & 0xFF00)) actualKey = enigma::usermap[gk];
-            else actualKey = enigma::usermap[(int)enigma::keymap[gk & 0xFF]];
+            else actualKey = (int)enigma::keymap[gk & 0xFF];
 
             enigma::last_keybdstatus[actualKey]=enigma::keybdstatus[actualKey];
             enigma::keybdstatus[actualKey]=0;

Keys affected were:

vk_numpad1 = 97,
  vk_numpad2 = 98,
  vk_numpad3 = 99,
  vk_numpad4 = 100,
  vk_numpad5 = 101,
  vk_numpad6 = 102,
  vk_numpad7 = 103,
  vk_numpad8 = 104,
  vk_numpad9 = 105,
  vk_multiply = 106,
  vk_add      = 107,
  vk_subtract = 109,
  vk_decimal  = 110,
  vk_divide   = 111,
  vk_f1  = 112,
  vk_f2  = 113,
  vk_f3  = 114,
  vk_f4  = 115,
  vk_f5  = 116,
  vk_f6  = 117,
  vk_f7  = 118,
  vk_f8  = 119,
  vk_f9  = 120,
  vk_f10 = 121,
  vk_f11 = 122,

Tracker screwed up my text but the issue is here http://enigma-dev.org/issues/index.php?id=194

Pages: 1