polygone
|
 |
Posted on: January 25, 2011, 05:45:38 am |
|
|
 Location: England Joined: Mar 2009
Posts: 794
|
I was just going through some old examples. Can someone else please test these GM files to clarify. http://www.box.net/shared/zk9oi4trrjIn this file the object is not visible for some reason. Tracker Reference:http://enigma-dev.org/tracker/ticket.php?id=80---------------- #RESOLVED# http://www.box.net/shared/vh554hae7jIn this file the first time you open the object properties, then click save the object name gets cleared. Also it will not run while the action_move icon is in the creation event, it just does nothing upon trying to execute.
|
|
« Last Edit: March 05, 2011, 04:30:20 pm by polygone »
|
Logged
|
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
|
|
|
|
polygone
|
 |
Reply #2 Posted on: January 25, 2011, 12:13:12 pm |
|
|
 Location: England Joined: Mar 2009
Posts: 794
|
Please run from the terminal and see if it outputs any kind of errors or strange output.
Yes, I don't know why I didn't do that.. This is error is being thrown when trying to run: Exception in thread "Thread-19" java.util.regex.PatternSyntaxException: Unexpected internal error near index 1\ ^ at java.util.regex.Pattern.error(Unknown Source) at java.util.regex.Pattern.compile(Unknown Source) at java.util.regex.Pattern.<init>(Unknown Source) at java.util.regex.Pattern.compile(Unknown Source) at java.lang.String.replaceAll(Unknown Source) at org.enigma.EnigmaWriter.toString(EnigmaWriter.java:906) at org.enigma.EnigmaWriter.getActionsCode(EnigmaWriter.java:883) at org.enigma.EnigmaWriter.populateObjects(EnigmaWriter.java:582) at org.enigma.EnigmaWriter.populateStruct(EnigmaWriter.java:124) at org.enigma.EnigmaWriter.prepareStruct(EnigmaWriter.java:109) at org.enigma.EnigmaRunner$3.run(EnigmaRunner.java:513) And I see what the issue is with the object name being cleared. It's because there is a space used in the object resource name, which apparently makes LGM just clear it. Also, when you say the object is not visible, *where* is the object not visible? In the LGM resource tree? In the LGM room editor? In the game when running?
When running the game. I think it might have something to do with the background but I'm not entirely sure what it is.
|
|
« Last Edit: January 25, 2011, 12:21:56 pm by polygone »
|
Logged
|
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
|
|
|
|
TheExDeus
|
 |
Reply #4 Posted on: January 25, 2011, 06:06:56 pm |
|
|
 Joined: Apr 2008
Posts: 1860
|
Resource names should allow spaces in LGM, so the behavior you describe is not desired. Actually it could be desired (like showing an error). Because yeah, GM allows this too, but then assigning this resource is impossible. Like if you have "object 0" you will not be able to get the id for that object like so: with (object 0){} That will clearly show an error, and so maybe this should not be encouraged? On the other hand, while writing this I kind of guess that it is up to the user, and if the system allows this, then be it. On the other hand if LGM or ENIGMA should of be rewritten just to allow this, then I wouldn't see the point.
|
|
|
Logged
|
|
|
|
polygone
|
 |
Reply #5 Posted on: January 26, 2011, 07:11:33 am |
|
|
 Location: England Joined: Mar 2009
Posts: 794
|
Resource names should allow spaces in LGM, so the behavior you describe is not desired. Actually it could be desired (like showing an error). Because yeah, GM allows this too, but then assigning this resource is impossible. Like if you have "object 0" you will not be able to get the id for that object like so:with (object 0){} That will clearly show an error, and so maybe this should not be encouraged? On the other hand, while writing this I kind of guess that it is up to the user, and if the system allows this, then be it. On the other hand if LGM or ENIGMA should of be rewritten just to allow this, then I wouldn't see the point.
It's still possible to reference the index using D&D or control in GML via parenting. Note the same issue exists with duplicate resource names which GM also allows. Spaces certainly do not appear to be allowed in LGM at the moment though.
|
|
|
Logged
|
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
|
|
|
|
polygone
|
 |
Reply #7 Posted on: January 27, 2011, 02:09:26 pm |
|
|
 Location: England Joined: Mar 2009
Posts: 794
|
OK that other file is definitely a bug with the background. It's drawing the purple background in the foreground regardless.
|
|
|
Logged
|
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
|
|
|
polygone
|
 |
Reply #8 Posted on: March 05, 2011, 03:13:02 am |
|
|
 Location: England Joined: Mar 2009
Posts: 794
|
I have been trying to debug this myself. I have found that the result of this bug is actually due to two issues: 1) background_showcolor is not usedIn roomsystem.c background_color is defined using: background_showcolor = (backcolor!=-1); Instead of from the background_showcolor boolean from LGM. Note that when this is fixed GSscreen.cpp also needs updating. It uses (in 2 places): if (background_showcolor) { int clearcolor=((int)background_color)&0xFFFFFF; glClearColor(__GETR(clearcolor)/255.0,__GETG(clearcolor)/255.0,__GETB(clearcolor)/255.0, 1); glClear(GL_COLOR_BUFFER_BIT); } An else statement should be added to this clearing the screen in black (as GM does). 2) The instance's parent draw code is not being executed in my particular file.EDIT: No longer a problem.
|
|
« Last Edit: July 14, 2011, 07:26:33 am by polygone »
|
Logged
|
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
|
|
|
|
polygone
|
 |
Reply #10 Posted on: March 05, 2011, 02:54:58 pm |
|
|
 Location: England Joined: Mar 2009
Posts: 794
|
EDIT:
Found the issue once and for all. The sprite_width has not been set and thus is equal to 0. I was dividing by it and assigning to image_angle which is why the sprite was not shown.
That means the only problem actually is: 1) background_showcolor is not used
|
|
« Last Edit: March 05, 2011, 04:31:39 pm by polygone »
|
Logged
|
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
|
|
|
|