[Maybe Bug] RPG MV Extra parameter provided for function Window_Base.prototype.drawTextEx

Maker Version: RPG Maker MV 1.5.0 (Standalone Version)

Please pardon the awkward posting - I was trying to find a better place to report a bug, but its not exactly a fatal. I am sure its not even throwing warnings, but I found it and wanted to bring to Developer's attention.
I've looked around and not seeing how this is a "completely legal use" of the function. Probably a typo or an extra param - nothing special.

Source function (not an issue with this one)
To my knowledge there is only "drawTextEx" function and it is the following.
Location: js\rpg_windows.js
Code:
Window_Base.prototype.drawTextEx = function(text, x, y) {
    if (text) {
        var textState = { index: 0, x: x, y: y, left: x };
        textState.text = this.convertEscapeCharacters(text);
        textState.height = this.calcTextHeight(textState, false);
        this.resetFontSettings();
        while (textState.index < textState.text.length) {
            this.processCharacter(textState);
        }
        return textState.x - x;
    } else {
        return 0;
    }
};
Issue:
drawTextEx is called with 4 parameters, instead of 3 allowed.
"rect.width" seems to be extra and, per function implementation I see above, is goggles (does nothing) parameter.

Location: js\rpg_windows.js - same file
Code:
Window_BattleLog.prototype.drawLineText = function(index) {
    var rect = this.itemRectForText(index);
    this.contents.clearRect(rect.x, rect.y, rect.width, rect.height);
    this.drawTextEx(this._lines[index], rect.x, rect.y, rect.width);
};
If I am incorrect, my apologies.
Now that I've looked more, I should have probably posted here: https://forums.rpgmakerweb.com/index.php?forums/rpg-maker-mv-improvement-boards.167/
If someone with moving powers could move, please. =)
My apologies.
this is not a bug at all. drawTextEx is used to convert escape characters within the current text state before performing the actual drawing of text onto the window's contents (an instance of Bitmap). if you analyze drawTextEx, you will notice the following:

escape characters are processed for the current text state, preparing the text state for the final drawing.
Code:
Window_Base.prototype.drawTextEx = function(text, x, y) {
    if (text) {
        var textState = { index: 0, x: x, y: y, left: x };
        textState.text = this.convertEscapeCharacters(text); <------ this line right here
        textState.height = this.calcTextHeight(textState, false);
        this.resetFontSettings();
        while (textState.index < textState.text.length) {
            this.processCharacter(textState);
        }
        return textState.x - x;
    } else {
        return 0;
    }
};
after escape character conversion, processCharacter is repeatedly called until all text characters have been drawn.
Code:
Window_Base.prototype.drawTextEx = function(text, x, y) {
    if (text) {
        var textState = { index: 0, x: x, y: y, left: x };
        textState.text = this.convertEscapeCharacters(text);
        textState.height = this.calcTextHeight(textState, false);
        this.resetFontSettings();
        while (textState.index < textState.text.length) {
            this.processCharacter(textState); <------ this line right here
        }
        return textState.x - x;
    } else {
        return 0;
    }
};
processCharacter then calls the processNormalCharacter function for drawing a text character to the screen.
Code:
Window_Base.prototype.processCharacter = function(textState) {
    switch (textState.text[textState.index]) {
    case '\n':
        this.processNewLine(textState);
        break;
    case '\f':
        this.processNewPage(textState);
        break;
    case '\x1b':
        this.processEscapeCharacter(this.obtainEscapeCode(textState), textState);
        break;
    default:
        this.processNormalCharacter(textState); <------ this line right here
        break;
    }
};
processNormalCharacter makes use of the more familiar drawText function, which accepts five arguments, not three.
Code:
Window_Base.prototype.processNormalCharacter = function(textState) {
    var c = textState.text[textState.index++];
    var w = this.textWidth(c);
    this.contents.drawText(c, textState.x, textState.y, w * 2, textState.height); <------ this line right here
    textState.x += w;
};
the window's drawText function accepts five arguments but passes six to its contents for drawing.
Code:
Window_Base.prototype.drawText = function(text, x, y, maxWidth, align) {
    this.contents.drawText(text, x, y, maxWidth, this.lineHeight(), align);
};
the bitmap has a default alternative if no width is specified.
Code:
Bitmap.prototype.drawText = function(text, x, y, maxWidth, lineHeight, align) {
    // Note: Firefox has a bug with textBaseline: Bug 737852
    //       So we use 'alphabetic' here.
    if (text !== undefined) {
        var tx = x;
        var ty = y + lineHeight - (lineHeight - this.fontSize * 0.7) / 2;
        var context = this._context;
        var alpha = context.globalAlpha;
        maxWidth = maxWidth || 0xffffffff; <------ this line right here
        if (align === 'center') {
            tx += maxWidth / 2;
        }
        if (align === 'right') {
            tx += maxWidth;
        }
        context.save();
        context.font = this._makeFontNameText();
        context.textAlign = align;
        context.textBaseline = 'alphabetic';
        context.globalAlpha = 1;
        this._drawTextOutline(text, tx, ty, maxWidth);
        context.globalAlpha = alpha;
        this._drawTextBody(text, tx, ty, maxWidth);
        context.restore();
        this._setDirty();
    }
};
the width does not HAVE to be specified. that is why sometimes you see it specified and other times you do not.
@dbchest how can a function process 4 arguments when it only accepts 3 when called? What happens in Bitmap's drawText function is irrelevant - it's the drawTextEx function that's being passed 4 arguments but only accepts and uses 3. I can only see one definition of the function, so it's not a case of calling one when 3 arguments are passed, or another when 4 are passed.

Looking back at Ace (which MV is pretty much a port of), those same functions exist, but Window_BattleLog.draw_line only passes 3 arguments to Window_Base.draw_text_ex, not 4.

It does seem to be an unnecessary extra argument that's being passed and not used.
if you analyze Bitmap's drawText function, you will see that the width argument has a default alternative, so width does not HAVE to be specified. that is why sometimes it is used but other times it is not.
Those are, unfortunately, different functions. =(

Looking back at Ace (which MV is pretty much a port of), those same functions exist, but Window_BattleLog.draw_line only passes 3 arguments to Window_Base.draw_text_ex, not 4.

It does seem to be an unnecessary extra argument that's being passed and not used.
Thanks for checking ACE - I don't have any other tools besides MV and combing through core for my own self education I've noticed this.
Still, it is not an actual error or warning, but being obsessive-compulsive engineer... well.... =\
@Shaz when that function is an intermediary between the previous function and the following function and it passes the other required values. the bitmap's version of the drawText function also requires a lineHeight in order to perform the processing, but we never pass a lineHeight when drawing text within windows, because Window_Base's drawText function takes the five values is CAN accept and then passes an additional value to the Bitmap.

i added coded to the post above; better example there.
That isn't confusing at all!
@Shaz i am not doing a very good job of articulating what i mean, but i promise i am not crazy.

@WickedWolfy they are not different functions. Window_BattleLog inherits from Window_Base, so every time you see drawTextEx called from within Window_BattleLog, it uses the drawTextEx function from Window_Base.

edit:
OH! BAHAHA. yeah. i see what you mean. it is apparently extra. omg. *walks away* sometimes engineers OVER analyze things.
@dbchest Per your edited example above - you are mixing Bitmap function with RPG Maker functions - they are not the same. In your example you are actually supporting my point with the extra parameters, not disproving it. =)

Let me take a piece of your code to better illustrate the difference
Code:
Window_Base.prototype.drawText = function(text, x, y, maxWidth, align) {
    this.contents.drawText(text, x, y, maxWidth, this.lineHeight(), align); // This calls the function listed below
};
In this case the first line is the RPGMV core drawText, and then line two uses the Bitmap drawText, which does accept six parameters. In this case, though, the only similarity they have is name.
Code:
Bitmap.prototype.drawText = function(text, x, y, maxWidth, lineHeight, align)
Those are different objects and function differently. Bitmap is the core and the WindowBase writes/draws to it. In the proxy function, the 6th parameter is from a member variable, something that is taken directly from a class.

Think about Vending machine - if it only accepts 5, 10 and 25 cents, you can't feed it dollar-coins, you have to feed it paper money. In the same manner the functions I've mentioned above simply don't have a slot for the extra parameter, regardless if its passed in.

Either way, this is something I've discovered. If this is not an issue, I would ask kindly for the thread to be deleted and for all involved parties to move on.
edit:
OH! BAHAHA. yeah. i see what you mean. it is apparently extra. omg. *walks away* sometimes engineers OVER analyze things.
Har! Get a coffee, mate. Helps me. I'm on my 4th one. (Thus I can see things like this) =D
You are right, this is in the wrong forum.
Moderator note: Moving this to RPGMaker MV Improvement Boards
You are right, this is in the wrong forum.
Moderator note: Moving this to RPGMaker MV Improvement Boards
Thank you and apologies for missing the place in the first place. I am still new to the boards and still orienting myself.
np. We were all new once.

Original thread: https://forums.rpgmakerweb.com/threads/maybe-bug-rpg-mv-extra-parameter-provided-for-function-window_base-prototype-drawtextex.88308/