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.
16
General ENIGMA / Re: GMK Parser written in GML?
« on: September 12, 2013, 03:27:22 am »
Your idea is really great but it will be really difficult because GML is a toy language written by yoyo just to waste your time. You are way way better off learning any other langauge.
If you really want to then yeah of course you can hack together some GML to read gmk format with file_binary_read functions and chr() and ord(). Robert linked ismavatar's description of the gmk format that is really confusing but its accurate once you figure out what she means. http://ismavatar.com/lgm/formats/gmformat8.txt
GMK versions are 800,810 and 820 I think for GM8. Not much difference except I heard they added shaders to 820. 701 and 702 for GM7 with some encryption. 600 and 620 for GM6.
Theres a lot of fields that only exist in certain versions of the format for each resource, usually 800+, 600+, 440 only, 530 only, 430-600, 530-702. Theres usually a field before resource fields called GM version needed for the following info that will tell you what version of the resource you should use.
GMX is simple because its just a bunch of XML files in directories. The values for things like event number are the same as gmk and are in enigma source. I don't think theres much difference between GMX versions. GMZ is just a 7z compressed (not a zip) archive of a GMX folder.
You read about my new CLI http://enigma-dev.org/forums/index.php?topic=1476.0
It is supposed to be a format converter besides a compiler. I have python code for reading gmk 800+ and writing gmk 810, egm, gmx, and gmz and I want to add older gmk versions 600 and 702 and gmx/egm writing. I linked to other files that you should look at to get the format. If you need more help I can try to explain the format better than ismavatar's file. Try reading my the CLI code in the file CliClass.py it should sort of tell you how to try reading those file types.
https://github.com/DatZach/Gmk
https://github.com/RobertBColton/LateralGM/blob/master/org/lateralgm/file/GmFileReader.java
EGM is just a folder or a zipped folder with a bunch of files that josh invented the formats for. You need EEF, e-yaml and apng, besides the binary room format that is close to gmk room format.
https://github.com/enigma-dev/enigma-dev/blob/master/pluginsource/org/enigma/file/EEFReader.java
https://github.com/enigma-dev/enigma-dev/blob/master/pluginsource/org/enigma/file/ApngIO.java
For executables there are decompilers for older GM8 I think but why would you need to convert from them?
I think that the entire enigma library itself should be written in GML as much as possible. But GML needs to be changed into a better langauge first. So I think its a good idea but GML needs to be more powerful first.
If you really want to then yeah of course you can hack together some GML to read gmk format with file_binary_read functions and chr() and ord(). Robert linked ismavatar's description of the gmk format that is really confusing but its accurate once you figure out what she means. http://ismavatar.com/lgm/formats/gmformat8.txt
GMK versions are 800,810 and 820 I think for GM8. Not much difference except I heard they added shaders to 820. 701 and 702 for GM7 with some encryption. 600 and 620 for GM6.
Theres a lot of fields that only exist in certain versions of the format for each resource, usually 800+, 600+, 440 only, 530 only, 430-600, 530-702. Theres usually a field before resource fields called GM version needed for the following info that will tell you what version of the resource you should use.
GMX is simple because its just a bunch of XML files in directories. The values for things like event number are the same as gmk and are in enigma source. I don't think theres much difference between GMX versions. GMZ is just a 7z compressed (not a zip) archive of a GMX folder.
You read about my new CLI http://enigma-dev.org/forums/index.php?topic=1476.0
It is supposed to be a format converter besides a compiler. I have python code for reading gmk 800+ and writing gmk 810, egm, gmx, and gmz and I want to add older gmk versions 600 and 702 and gmx/egm writing. I linked to other files that you should look at to get the format. If you need more help I can try to explain the format better than ismavatar's file. Try reading my the CLI code in the file CliClass.py it should sort of tell you how to try reading those file types.
https://github.com/DatZach/Gmk
https://github.com/RobertBColton/LateralGM/blob/master/org/lateralgm/file/GmFileReader.java
EGM is just a folder or a zipped folder with a bunch of files that josh invented the formats for. You need EEF, e-yaml and apng, besides the binary room format that is close to gmk room format.
https://github.com/enigma-dev/enigma-dev/blob/master/pluginsource/org/enigma/file/EEFReader.java
https://github.com/enigma-dev/enigma-dev/blob/master/pluginsource/org/enigma/file/ApngIO.java
For executables there are decompilers for older GM8 I think but why would you need to convert from them?
I think that the entire enigma library itself should be written in GML as much as possible. But GML needs to be changed into a better langauge first. So I think its a good idea but GML needs to be more powerful first.
17
Third Party / Re: CLI and new IDE for Enigma
« on: September 03, 2013, 04:56:59 pm »
No sorry. The gmx reader works but the gmx writer isn't in there yet, only gmk writing. Cheeseboy made me fix it to work with python3 last night and the edc games I tested mostly worked on both python 2.7 and python3.
18
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
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
You can test GML code with the cli using
show_message: test
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/downloadPyQt5 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 emodeYou 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 showshow_message: test
20
SHUPAER123'S HOME / Re: Remove fundies head from torso
« on: September 01, 2013, 04:34:12 am »
haha
21
General ENIGMA / Re: Default Font Glyph
« on: August 09, 2013, 06:01:00 pm »I think they are generated the same on all systems (or at least platforms). On Windows, for example, everyone should see this:Enigma plugin asks AWT for a default font in EnigmaWriter.java. I assume logical fonts aren't garanteed to be always the same. Are they? Probably not if msttcorefonts isnt installed on linux.
Code: [Select]
java.awt.Font iF = new java.awt.Font(java.awt.Font.DIALOG,java.awt.Font.PLAIN,12);Quote
Also, the default font doesn't look so well and because of size and no AA the lines are not straight when they should be (like in X or Y), so we should at least turn AA on.It looks like you could get AA easily, the plugin just picks a glyph without AA if available:
Code: [Select]
Object aaHints[] = { RenderingHints.VALUE_TEXT_ANTIALIAS_OFF,
RenderingHints.VALUE_TEXT_ANTIALIAS_GASP,RenderingHints.VALUE_TEXT_ANTIALIAS_ON,
RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB };
if (aa < 0 || aa >= aaHints.length) aa = 0;
GlyphVector gv = fnt.createGlyphVector(new FontRenderContext(null,aaHints[aa],
RenderingHints.VALUE_FRACTIONALMETRICS_OFF),String.valueOf(c));
22
General ENIGMA / Re: Default Font Glyph
« on: August 07, 2013, 02:20:00 am »
If everyones forgotten, I found out that theres the GML function font_add that can create a font. It crashes ENIGMA right now because it never actually creates the fnt->texture, but someone should fix it for GM compatibility. That means ENIGMA has to have the ability to render a font on its own. That doesnt mean the compiler can do it though.
None of the game formats include glyph data I think, do they? Any program that reads game formats and compiles them with libcompileEGMf will have to be able to render the glyphs or the ENIGMA compiler will have to be able to render them.
None of the game formats include glyph data I think, do they? Any program that reads game formats and compiles them with libcompileEGMf will have to be able to render the glyphs or the ENIGMA compiler will have to be able to render them.
23
Issues Help Desk / Re: X11 keyboard numpad and function keys corrupted by lookup in usermap with fix
« on: June 10, 2013, 12:50:27 pm »
New diff fix change lowercase to uppercase in keymap instead of usermap
Code: [Select]
--- a/ENIGMAsystem/SHELL/Platforms/xlib/XLIBmain.cpp
+++ b/ENIGMAsystem/SHELL/Platforms/xlib/XLIBmain.cpp
@@ -45,7 +45,7 @@ namespace enigma_user {
namespace enigma
{
- extern char keymap[256];
+ extern char keymap[512];
extern char usermap[256];
void ENIGMA_events(void); //TODO: Synchronize this with Windows by putting these two in a single header.
@@ -65,11 +65,12 @@ namespace enigma
{
case KeyPress: {
gk=XLookupKeysym(&e.xkey,0);
if (gk==NoSymbol)
return 0;
- if (!(gk & 0xFF00)) actualKey = enigma::usermap[gk];
- else actualKey = enigma::usermap[(int)enigma::keymap[gk & 0xFF]];
+ if (!(gk & 0xFF00)) actualKey = enigma::usermap[(int)enigma::keymap[gk & 0xFF]];
+ else actualKey = enigma::usermap[(int)enigma::keymap[gk & 0x1FF]];
{ // Set keyboard_lastchar. Seems to work without
char str[1];
int len = XLookupString(&e.xkey, str, 1, NULL, NULL);
@@ -90,8 +91,8 @@ namespace enigma
if (gk == NoSymbol)
return 0;
- if (!(gk & 0xFF00)) actualKey = enigma::usermap[gk];
- else actualKey = enigma::usermap[(int)enigma::keymap[gk & 0xFF]];
+ if (!(gk & 0xFF00)) actualKey = enigma::usermap[(int)enigma::keymap[gk & 0xFF]];
+ else actualKey = enigma::usermap[(int)enigma::keymap[gk & 0x1FF]];
enigma::last_keybdstatus[actualKey]=enigma::keybdstatus[actualKey];
enigma::keybdstatus[actualKey]=0;
diff --git a/ENIGMAsystem/SHELL/Platforms/xlib/XLIBwindow.cpp b/ENIGMAsystem/SHELL/Platforms/xlib/XLIBwindow.cpp
index b7a95da..ce98bb5 100644
--- a/ENIGMAsystem/SHELL/Platforms/xlib/XLIBwindow.cpp
+++ b/ENIGMAsystem/SHELL/Platforms/xlib/XLIBwindow.cpp
@@ -302,72 +302,75 @@ void screen_refresh() {
namespace enigma
{
- char keymap[256];
+ char keymap[512];
char usermap[256];
void initkeymap()
{
using namespace enigma_user;
// Pretend this part doesn't exist
- keymap[0x51] = vk_left;
- keymap[0x53] = vk_right;
- keymap[0x52] = vk_up;
- keymap[0x54] = vk_down;
- keymap[0xE3] = vk_control;
- keymap[0xE4] = vk_control;
- keymap[0xE9] = vk_alt;
- keymap[0xEA] = vk_alt;
- keymap[0xE1] = vk_shift;
- keymap[0xE2] = vk_shift;
- keymap[0x0D] = vk_enter;
- keymap[0x85] = vk_lsuper;
- keymap[0x86] = vk_rsuper;
- keymap[0x17] = vk_tab;
- keymap[0x42] = vk_caps;
- keymap[0x4E] = vk_scroll;
- keymap[0x7F] = vk_pause;
- keymap[0x9E] = vk_numpad0;
- keymap[0x9C] = vk_numpad1;
- keymap[0x99] = vk_numpad2;
- keymap[0x9B] = vk_numpad3;
- keymap[0x96] = vk_numpad4;
- keymap[0x9D] = vk_numpad5;
- keymap[0x98] = vk_numpad6;
- keymap[0x95] = vk_numpad7;
- keymap[0x97] = vk_numpad8;
- keymap[0x9A] = vk_numpad9;
- keymap[0xAF] = vk_divide;
- keymap[0xAA] = vk_multiply;
- keymap[0xAD] = vk_subtract;
- keymap[0xAB] = vk_add;
- keymap[0x9F] = vk_decimal;
- keymap[0xBE] = vk_f1;
- keymap[0xBF] = vk_f2;
- keymap[0xC0] = vk_f3;
- keymap[0xC1] = vk_f4;
- keymap[0xC2] = vk_f5;
- keymap[0xC3] = vk_f6;
- keymap[0xC4] = vk_f7;
- keymap[0xC5] = vk_f8;
- keymap[0xC6] = vk_f9;
- keymap[0xC7] = vk_f10;
- keymap[0xC8] = vk_f11;
- keymap[0xC9] = vk_f12;
- keymap[0x08] = vk_backspace;
- keymap[0x1B] = vk_escape;
- keymap[0x50] = vk_home;
- keymap[0x57] = vk_end;
- keymap[0x55] = vk_pageup;
- keymap[0x56] = vk_pagedown;
- keymap[0xFF] = vk_delete;
- keymap[0x63] = vk_insert;
+ keymap[0x151] = vk_left;
+ keymap[0x153] = vk_right;
+ keymap[0x152] = vk_up;
+ keymap[0x154] = vk_down;
+ keymap[0x1E3] = vk_control;
+ keymap[0x1E4] = vk_control;
+ keymap[0x1E9] = vk_alt;
+ keymap[0x1EA] = vk_alt;
+ keymap[0x1E1] = vk_shift;
+ keymap[0x1E2] = vk_shift;
+ keymap[0x10D] = vk_enter;
+ keymap[0x185] = vk_lsuper;
+ keymap[0x186] = vk_rsuper;
+ keymap[0x117] = vk_tab;
+ keymap[0x142] = vk_caps;
+ keymap[0x14E] = vk_scroll;
+ keymap[0x17F] = vk_pause;
+ keymap[0x19E] = vk_numpad0;
+ keymap[0x19C] = vk_numpad1;
+ keymap[0x199] = vk_numpad2;
+ keymap[0x19B] = vk_numpad3;
+ keymap[0x196] = vk_numpad4;
+ keymap[0x19D] = vk_numpad5;
+ keymap[0x198] = vk_numpad6;
+ keymap[0x195] = vk_numpad7;
+ keymap[0x197] = vk_numpad8;
+ keymap[0x19A] = vk_numpad9;
+ keymap[0x1AF] = vk_divide;
+ keymap[0x1AA] = vk_multiply;
+ keymap[0x1AD] = vk_subtract;
+ keymap[0x1AB] = vk_add;
+ keymap[0x19F] = vk_decimal;
+ keymap[0x1BE] = vk_f1;
+ keymap[0x1BF] = vk_f2;
+ keymap[0x1C0] = vk_f3;
+ keymap[0x1C1] = vk_f4;
+ keymap[0x1C2] = vk_f5;
+ keymap[0x1C3] = vk_f6;
+ keymap[0x1C4] = vk_f7;
+ keymap[0x1C5] = vk_f8;
+ keymap[0x1C6] = vk_f9;
+ keymap[0x1C7] = vk_f10;
+ keymap[0x1C8] = vk_f11;
+ keymap[0x1C9] = vk_f12;
+ keymap[0x108] = vk_backspace;
+ keymap[0x11B] = vk_escape;
+ keymap[0x150] = vk_home;
+ keymap[0x157] = vk_end;
+ keymap[0x155] = vk_pageup;
+ keymap[0x156] = vk_pagedown;
+ keymap[0x1FF] = vk_delete;
+ keymap[0x163] = vk_insert;
// Set up identity map...
- for (int i = 0; i < 'a'; i++)
+ for (int i = 0; i < 255; i++)
usermap[i] = i;
+
+ for (int i = 0; i < 255; i++)
+ keymap[i] = i;
for (int i = 'a'; i <= 'z'; i++) // 'a' to 'z' wrap to 'A' to 'Z'
- usermap[i] = i + 'A' - 'a';
+ keymap[i] = i + 'A' - 'a';
for (int i = 'z'+1; i < 255; i++)
- usermap[i] = i;
+ keymap[i] = i;
}
}
24
Issues Help Desk / X11 keyboard numpad and function keys corrupted by lookup in usermap with fix
« on: June 10, 2013, 12:09:42 am »
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:
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:
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
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
