Sslaxx
 Joined: Nov 2013
Posts: 72
|
 |
Posted on: December 05, 2013, 02:17:12 PM |
|
|
https://dl.dropboxusercontent.com/u/67740160/TheLastAlpha_TitleTester.egmWhat this is supposed to do is:
- rm_Initer sets stuff up in its creation code, then
- It calls rm_Logo, which creates an instance of obj_SslaxxWorks, which creates an alarm, which when counted down
- Calls rm_TitleScreen, which will then create and scroll down the title (from just off-screen)
It works right up to the creation of the title instance, but it then does not scroll down. Bizarrely, it does if you do not go to rm_Logo (i.e., jump straight to rm_TitleScreen from rm_Initer's creation code). Am I running into a bug somewhere, or is it something really dumb I'm doing (I'm a GM newbie, even if I have experience with other programming languages) I haven't realised? Thanks. [EDIT: Bit late now, but next time I'll also try to remember to say what OS I was trying this under - Linux.]
|
|
|
Goombert
 Joined: Jan 2013
Posts: 2,991
|
 |
Reply #1 Posted on: December 06, 2013, 07:03:58 AM |
|
|
Thanks for the test case Sslaxx, that really helps in resolving this issues. However, sadly I am not able to reproduce the issue as your title screen loads and does scroll down to the center with no changes to the file :\ I tested on Windows 7 with all 3 graphics systems and got the same results on the latest version. Notice in the following screen cap it is half way through scrolling. 
|
|
|
TheExDeus
 Joined: Apr 2008
Posts: 1,860
|
 |
Reply #2 Posted on: December 06, 2013, 07:41:43 AM |
|
|
|
It seems to work for me. At the start there is the Sslaxxworks logo, then after about 2 seconds it goes to The Last Alpha room where the logo slowly goes from top to middle, while a sound is being played. I think that is what you wanted. Are you sure you end up in rm_TitleScreen in your case? Because the only explanation I would have why it's not working for you is because alarm gets broken and you don't even go to rm_TitleScreen and stay in rm_SslaxxWorks.
Also, in rm_Initer's creation code you have "obj_Logo.TitleInCenter = false" which is invalid. Obj_logo isn't created at that point and so you are assigning an unexisting variable. "Obj_logo." doesn't change the whole object, but only an instance. It usually is the last (or the first, can't remember) instance of that object created, but in rm_Initer you don't have that instance at all. It should technically scream about uninitialized variables in Debug mode, but our debugger sadly doesn't catch this right now. It just doesn't really do anything. Also in obj_Logo mouse enter you have "global.TitleInCenter" which is not actually global. So this variable is also uninitialized. If you run Debug, then this will error.
|
|
|
Goombert
 Joined: Jan 2013
Posts: 2,991
|
 |
Reply #3 Posted on: December 06, 2013, 08:02:47 AM |
|
|
|
Could also be related, Harri, to me comitting fixes for persistent object and the room system for Windows only, I've been rather cautious not to break Linux.
|
|
|
Sslaxx
 Joined: Nov 2013
Posts: 72
|
 |
Reply #4 Posted on: December 06, 2013, 01:43:56 PM |
|
|
|
In that case, you'd think the "Mouse Enter" event for the title object would not work. Yet it all does, weird. The "global.TitleInCenter" is probably left over from a previous attempt to fix the issue. Are global variables defined in the same way in ENIGMA (i.e. using "globalvar" or initialising a "global.<name>" variable with a value)?
And yes, I've only tried this using my Linux install of ENIGMA, not (as of yet anyway) the Windows version.
|
|
|
TheExDeus
 Joined: Apr 2008
Posts: 1,860
|
 |
Reply #5 Posted on: December 06, 2013, 01:51:48 PM |
|
|
QuoteYet it all does, weird. It doesn't for me on Windows. As the variable is not set, then it defaults to 0, and if (0){} should not execute that sound playing. You seem to have all bunch of weird stuff going on. QuoteAre global variables defined in the same way in ENIGMA (i.e. using "globalvar" or initializing a "global.<name>" variable with a value)? You can either use global.<name> or "global var name", globalvar is not supported as far as I know. This is because we have variables types as well (unlike GM) and so "global var" could technically be also "global int" and so on.
|
|
|
Sslaxx
 Joined: Nov 2013
Posts: 72
|
 |
Reply #6 Posted on: December 06, 2013, 02:04:43 PM |
|
|
Quote from: TheExDeus on December 06, 2013, 01:51:48 PM
QuoteYet it all does, weird. It doesn't for me on Windows. As the variable is not set, then it defaults to 0, and if (0){} should not execute that sound playing. You seem to have all bunch of weird stuff going on.
QuoteAre global variables defined in the same way in ENIGMA (i.e. using "globalvar" or initializing a "global.<name>" variable with a value)? You can either use global.<name> or "global var name", globalvar is not supported as far as I know. This is because we have variables types as well (unlike GM) and so "global var" could technically be also "global int" and so on. Yeah, the former sprung up out of misunderstanding what I was reading in GM tutorials and GM:S's help system. As for the latter, I was aware of that, but thought that it'd support variants in a similar fashion it does (at least as far as I understand) with other variables declared similarly. I shall be trying to fix that all up, now that I have a better understanding about it (and now I realise my code basically only worked because of bugs!).
|
|
|
TheExDeus
 Joined: Apr 2008
Posts: 1,860
|
 |
Reply #7 Posted on: December 06, 2013, 04:26:11 PM |
|
|
|
Some major commits (especially related to Linux) have been made. Maybe try upgrading, but beware that I am not sure if the newest version is functional. I will try upgrading on my Windows machine and see if everything runs.
|
|
|
Sslaxx
 Joined: Nov 2013
Posts: 72
|
 |
Reply #8 Posted on: December 06, 2013, 04:29:45 PM |
|
|
Yeah, been holding off on updating my ENIGMA install because I know its stability right now isn't guaranteed. Might give that a try and see if it works (assuming it's stable enough to be functional of course). And while I'm at it, https://dl.dropboxusercontent.com/u/67740160/TheLastAlpha_TitleTester_HopefullyLessDerp.egm - fixed up the variables issues (hopefully!). EDIT: Updated to the latest Git as time of typing (with some minor editing to gcc_backend.cpp), and it works as expected under Linux.
|
|
|
|