Default filename argument to Graphics.transition() should be "", not nil #108

Closed
opened 2015-06-10 03:06:55 +00:00 by sorlok · 2 comments
sorlok commented 2015-06-10 03:06:55 +00:00 (Migrated from github.com)

The second argument to Graphics.transition() should default to "", not nil. (This represents using the default shader.) Currently, if someone wants to call Graphics.transition(8, "", 100), the "" will cause mkxp to try to load a Bitmap named "", rather than defaulting to the default shader. (Using nil instead of "" will work in MKXP, but not RPG Maker.)

Suggest changing line 719 of graphics.cpp:

//from:
Bitmap *transMap = filename ? new Bitmap(filename) : 0;

//to:
Bitmap *transMap = (filename && strlen(filename)>0) ? new Bitmap(filename) : 0;
The second argument to Graphics.transition() should default to "", not nil. (This represents using the default shader.) Currently, if someone wants to call Graphics.transition(8, "", 100), the "" will cause mkxp to try to load a Bitmap named "", rather than defaulting to the default shader. (Using nil instead of "" will work in MKXP, but not RPG Maker.) Suggest changing line 719 of graphics.cpp: ``` //from: Bitmap *transMap = filename ? new Bitmap(filename) : 0; //to: Bitmap *transMap = (filename && strlen(filename)>0) ? new Bitmap(filename) : 0; ```
Ancurio commented 2015-06-10 11:32:37 +00:00 (Migrated from github.com)

I don't think using nil should have worked in mkxp because it will still try to parse it as a string from the ruby side.

I don't think using nil should have worked in mkxp because it will still try to parse it as a string from the ruby side.
sorlok commented 2015-06-10 12:36:58 +00:00 (Migrated from github.com)

Makes sense, thanks.

Makes sense, thanks.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: MapleShrine/mkxp#108
No description provided.