Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
dd65442
Removed a number of GM8 function stubs that are long-gone from the na…
YellowAfterlife Aug 4, 2023
61a3cca
Removed most of the contents of Function_Action.js (GMS1 DnD helpers,…
YellowAfterlife Aug 4, 2023
96d4798
Removed IAP function stubs (long-gone)
YellowAfterlife Aug 4, 2023
8e64627
Removed Steamworks function stubs (as that's an extension now)
YellowAfterlife Aug 4, 2023
d323879
Removed some more GM8 function stubs
YellowAfterlife Aug 4, 2023
4c59dbc
2d function stubs (that cannot be currently auto-removed by "remove u…
YellowAfterlife Aug 4, 2023
62c4d64
Removed d3d_model_* functions, pretty self-contained.
YellowAfterlife Aug 4, 2023
ca6d642
Removed d3d_draw_* functions, also self-contained.
YellowAfterlife Aug 4, 2023
036ff0e
Removed d3d_set_projection_* functions, *except* for WebGL_d3d_set_pr…
YellowAfterlife Aug 4, 2023
c85ea21
Removed a few d3d state functions that aren't used elsewhere
YellowAfterlife Aug 4, 2023
5d1043d
Removed the d3d_transform_* functions and the associated g_MatrixStac…
YellowAfterlife Aug 4, 2023
e83bb40
Some conditional tagging for bigger things that aren't used in every …
YellowAfterlife Aug 8, 2023
667f04b
Removed GMS1 tiles "playfield" - not to be confused with GMS1 compati…
YellowAfterlife Aug 8, 2023
8378891
Correction: more GMS1 tile leftovers
YellowAfterlife Aug 8, 2023
7bdfd9e
Most of the sequence-related code is now stripped if we're not using …
YellowAfterlife Aug 8, 2023
1b35422
Strip yyBuffer MD5 implementation if buffer_md5 is not used
YellowAfterlife Aug 8, 2023
096c69c
Strip timeline implementation if unused (not that there's much)
YellowAfterlife Aug 8, 2023
aca71a4
Strip animation curve implementation if neither them nor sequences ar…
YellowAfterlife Aug 8, 2023
b5e7d85
Also strip Spine if unused
YellowAfterlife Aug 8, 2023
bc4f52e
And SWF too (smaller than I thought it would be)
YellowAfterlife Aug 8, 2023
1c987c3
Cleaned up some long-unused `YoYo_` function aliases
YellowAfterlife Aug 8, 2023
0c0f76a
Removed the seemingly-long-unused Fingerprint.js + YYUDID
YellowAfterlife Aug 9, 2023
d7c9a44
Some corrections to conditional compilation in sequences (after testi…
YellowAfterlife Aug 8, 2023
0f2939b
Strip some of the TTF helpers if font_add is never called
YellowAfterlife Aug 8, 2023
d7afdfa
Strip virtual_key_ helpers if unused
YellowAfterlife Aug 9, 2023
72ab7d4
Strip ds_priority_ class if unused
YellowAfterlife Aug 9, 2023
b0054ea
Strip mp_grid_ if unused
YellowAfterlife Aug 9, 2023
534d7a6
Removed GMS1-era `d3d_primitive_*` functions
YellowAfterlife Aug 9, 2023
f59250e
Strip path_ functions and properties if unused
YellowAfterlife Aug 9, 2023
9ec53da
Strip debug window when not running in debug mode
YellowAfterlife Aug 9, 2023
36429b6
Strip video_ functions when unused
YellowAfterlife Aug 9, 2023
e7b644c
A slightly better structure for ErrorFunction/GetErrorFunction
YellowAfterlife Aug 9, 2023
47ecff7
Primitive and vertex_ functions are now stripped if unused
YellowAfterlife Aug 9, 2023
02c9f04
Nineslice-related logic is now stripped if unused.
YellowAfterlife Aug 9, 2023
ecaedde
INI-related functions are now stripped if unused
YellowAfterlife Aug 9, 2023
a891651
Exclude the rest of the dialog helpers if unused
YellowAfterlife Aug 9, 2023
7624424
Exclude highscore_ functions if unused
YellowAfterlife Aug 11, 2023
ce189cd
Exclude md5_ functions if unused
YellowAfterlife Aug 9, 2023
d34113f
Exclude those countless keyboard event constants and object init chec…
YellowAfterlife Aug 10, 2023
d17aeb3
Also apply the event check to some other event types that might be ig…
YellowAfterlife Aug 10, 2023
4473bf9
Updated D3D/GPU function init to be DCE-friendly.
YellowAfterlife Aug 10, 2023
27e9463
Remove 2d canvas versions of drawing functions when using "WebGL requ…
YellowAfterlife Aug 11, 2023
1babeb9
Trim the underlying sprite functions if draw_sprite_pos is unused
YellowAfterlife Aug 11, 2023
3adeb1e
Added more conditionals around British spelling versions of functions…
YellowAfterlife Aug 11, 2023
dbaee25
Small cleanup for things that shouldn't be there at all
YellowAfterlife Aug 11, 2023
b1461c5
Backgrounds are no longer used in their original sense so we can skip…
YellowAfterlife Aug 11, 2023
ff8a13b
Some more conditions to omit 2d functions when only using GL
YellowAfterlife Aug 11, 2023
e272de2
And some more conditions based on functions/groups
YellowAfterlife Aug 11, 2023
13a1583
Fixed a typo in yyRoom.cloneStorage (EffectProperties vs effectProper…
YellowAfterlife Aug 11, 2023
41e198c
fx_-related helpers are now stripped if the feature isn't used
YellowAfterlife Aug 11, 2023
b781244
*mostly* strip particle-related code if unused
YellowAfterlife Aug 11, 2023
6ab6559
Still unhappy with how much sequence code is included just for sprites
YellowAfterlife Aug 11, 2023
937d5a8
More tweaks for British spelling aliases and conditions for functions…
YellowAfterlife Aug 12, 2023
952da55
Tweaks for things that shouldn't be there / don't have to be done lik…
YellowAfterlife Aug 12, 2023
714e7bb
Strip audio effects if unused
YellowAfterlife Aug 12, 2023
ca79a99
Strip contents of some of the yyFont methods depending on whether 2d/…
YellowAfterlife Aug 12, 2023
e7cdde0
Removed duplicate definitions for user event constants (GML_ev_userX …
YellowAfterlife Aug 14, 2023
ddada8f
More code related to event groups (user events, Outside Room/View, In…
YellowAfterlife Aug 14, 2023
fec6633
Keyboard events are no longer bound if we're not doing any keyboard i…
YellowAfterlife Aug 15, 2023
8762207
We can use a regex instead of a whole parser for GetLocalStorageRoot.
YellowAfterlife Aug 15, 2023
ca504fc
Why would internal code use chr() for linebreaks..?
YellowAfterlife Aug 15, 2023
9da9d16
One collision function implementation can be omitted based on "collis…
YellowAfterlife Aug 15, 2023
a447306
More tweaks to omit unused shader functions
YellowAfterlife Aug 15, 2023
f1adcfa
CRC32 implementation can be omitted if buffer_crc32 is not used.
YellowAfterlife Aug 15, 2023
6cbe6d3
Audio system can be stripped if the project doesn't use audio
YellowAfterlife Aug 16, 2023
fcbec36
Don't have to expose an extension API if there are no extensions
YellowAfterlife Aug 15, 2023
9367df0
And don't have to parse parameters if the game's not reading them.
YellowAfterlife Aug 15, 2023
7c2a11f
Apparently `a = ()=>{}function b(){}` is illegal
YellowAfterlife Aug 15, 2023
efad9c7
Omit some WebGL bits if using strictly 2d render.
YellowAfterlife Aug 16, 2023
d8ea93a
Some trimming for draw_sprite_pos
YellowAfterlife Aug 16, 2023
d1a503f
zlib can be omitted if none of the functions are used.
YellowAfterlife Aug 16, 2023
62e336b
Apparently yyQueue is used solely for mp_grid_path, so can be omitted…
YellowAfterlife Aug 16, 2023
c09c24b
All these highscore variables aren't used.
YellowAfterlife Aug 16, 2023
fafc082
No need to run splitter for show_message/show_question - no more hash…
YellowAfterlife Aug 16, 2023
9b2c0d4
Fonts are now optional
YellowAfterlife Aug 16, 2023
6e8c5f1
Sprites (along with the rest of sequence code) are now optional
YellowAfterlife Aug 17, 2023
78442e6
json_encode/json_decode helpers are now omitted if unused
YellowAfterlife Aug 17, 2023
406bbf9
A simpler `string_replace_hash` (tested on `@"1\\#2#3\#4"`)
YellowAfterlife Aug 19, 2023
7a9a510
Removed some of the GMS1-specific code sitting behind a flag
YellowAfterlife Aug 19, 2023
a3b34c7
A few more conditions for various helper functions
YellowAfterlife Aug 22, 2023
4cc14f8
DrawLayerOldTilemapElement does nothing anyway, might as well move th…
YellowAfterlife Aug 22, 2023
22d19dd
A few more forgotten semicolons
YellowAfterlife Aug 22, 2023
adb88f5
Merge branch 'develop' of https://github.com/YoYoGames/GameMaker-HTML…
YellowAfterlife Aug 22, 2023
af6fb11
Merge branch 'develop' of https://github.com/YoYoGames/GameMaker-HTML…
YellowAfterlife Sep 2, 2023
9620556
Merge branch 'develop' of https://github.com/YoYoGames/GameMaker-HTML…
YellowAfterlife Sep 18, 2023
b034e65
Added `compile_if_used`/`compile_if_weak_ref` pseudo-functions so tha…
YellowAfterlife Sep 19, 2023
1d23edd
Fixed a one-off error with using the runtime with current GMAC due to…
YellowAfterlife Sep 21, 2023
28a9df1
Merge branch 'develop' of https://github.com/YoYoGames/GameMaker-HTML…
YellowAfterlife Oct 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
350 changes: 53 additions & 297 deletions scripts/Builders/yyPrimBuilder.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions scripts/CameraManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ CCamera.prototype.ApplyMatrices = function () {
WebGL_SetMatrix(MATRIX_VIEW, this.m_viewMat);
}
else {
// @if feature("2d")
WebGL_SetMatrix(MATRIX_VIEW, this.m_viewMat);
// Work out port scaling
var wscale = g_clipw / g_worldw;
Expand All @@ -535,6 +536,7 @@ CCamera.prototype.ApplyMatrices = function () {

// for some reason this function takes the matrix transposed
graphics._setTransform(g_transform[0], g_transform[3], g_transform[1], g_transform[4], g_transform[2], g_transform[5]);
// @endif
}

if (g_RenderTargetActive == -1) {
Expand Down
32 changes: 7 additions & 25 deletions scripts/Effects.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,32 +58,14 @@ var types_created = false, // whether the types have been create
// #############################################################################################
function Speed_Factor()
{
if(g_isZeus)
{

if( ( g_GameTimer.GetFPS() <= 30) || (Fps <= 30) ){
return 1.0;
}

if( (g_GameTimer.GetFPS()/ Fps) < 1.2 ){
return 30.0/g_GameTimer.GetFPS();
}else{
return 30.0/Fps;
}
}
else
{


if( ( g_RunRoom.GetSpeed() <= 30) || (Fps <= 30) ){
return 1.0;
}
if( ( g_GameTimer.GetFPS() <= 30) || (Fps <= 30) ){
return 1.0;
}

if( (g_RunRoom.GetSpeed() / Fps) < 1.2 ){
return 30.0/g_RunRoom.GetSpeed();
}else{
return 30.0/Fps;
}
if( (g_GameTimer.GetFPS()/ Fps) < 1.2 ){
return 30.0/g_GameTimer.GetFPS();
}else{
return 30.0/Fps;
}
}

Expand Down
96 changes: 39 additions & 57 deletions scripts/Events.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ function HandleOSEvents() {
// #############################################################################################
function HandleOther()
{
// @if event("OutsideEvent") || event("BoundaryEvent") || event("OutsideView*") || event("BoundaryView*")
var bbox, i, viewIndex;
var pViews = null;
if (g_RunRoom.m_enableviews)
Expand All @@ -111,6 +112,7 @@ function HandleOther()
if (!inst.marked && (inst.createCounter <= count))
{
// Outside events
// @if event("OutsideEvent")
if (pObject.REvent[EVENT_OTHER_OUTSIDE])
{
var outside = false;
Expand All @@ -131,8 +133,10 @@ function HandleOther()
}
inst.fOutsideRoom = outside;
}
// @endif OutsideEvent

// Boundary events
// @if event("BoundaryEvent")
if (pObject.REvent[EVENT_OTHER_BOUNDARY])
{
if (sprite_exists(inst.sprite_index) || sprite_exists(inst.mask_index))
Expand All @@ -151,10 +155,12 @@ function HandleOther()
}
}
}
// @endif


// Handle view related "other" events
//for (i in pViews)
// @if event("OutsideView*") || event("BoundaryView*")
if (pViews) {
for (viewIndex = 0; viewIndex < pViews.length; viewIndex++) {
//if (!pViews.hasOwnProperty(i)) continue;
Expand All @@ -179,6 +185,7 @@ function HandleOther()
}

// Outside view events
// @if event("OutsideView*")
if (pObject.REvent[EVENT_OTHER_OUTSIDE_VIEW0 + viewIndex]) {

// Make a distinction whether the instance has a mask (or sprite) || not
Expand All @@ -200,8 +207,10 @@ function HandleOther()
}
}
}
// @endif OutsideView

// Boundary view events
// @if event("BoundaryView*")
if (pObject.REvent[EVENT_OTHER_BOUNDARY_VIEW0 + viewIndex]) {
if (sprite_exists(inst.sprite_index) || sprite_exists(inst.mask_index)) {

Expand Down Expand Up @@ -238,12 +247,14 @@ function HandleOther()
}*/
}
}
// @endif BoundaryView
}
}
}
// @endif OutsideView || BoundaryView
}
}

// @endif Outside || Boundary || OutsideView || BoundaryView
}


Expand Down Expand Up @@ -369,45 +380,6 @@ function HandleCollision()
}*/


// #############################################################################################
/// Function:<summary>
/// Given a point, do a collision test with each instance that has the desired
/// event. (mouse click etc).
/// </summary>
///
/// In: <param name="_event">Primary event</param>
/// <param name="_sub_event">Secondary event</param>
/// <param name="x">X Point to test with</param>
/// <param name="y">Y Point to test with</param>
///
// #############################################################################################
function DoPointToInstance( _event, _sub_event, _x,_y )
{
// First scale the coordinate into the current screen scale.
//_x = _x * scale;

// Might be better to loop through objects, rather than active instances... less getSprite stuff...
for(var i=g_RunRoom.m_Active.length-1;i>=0;i-- )
{
var pInst = g_RunRoom.m_Active.Get(i);
// with( pInst )
{
if (pInst.bbox_dirty) pInst.Compute_BoundingBox();
if (!pInst.marked && pInst.pObject.REvent[_event | _sub_event])
{
var pSprite = g_pSpriteManager.Get( pInst.sprite_index );
var ox = pSprite.xOrigin;
var oy = pSprite.yOrigin;
if ((_x >= pInst.bbox.left) && (_x < pInst.bbox.right) && (_y >= pInst.bbox.top) && (_y < pInst.bbox.bottom))
{
pInst.PerformEvent(_event, _sub_event, pInst, pInst); // timer enum starts at 1..
}
}
}
}
}



// #############################################################################################
/// Function:<summary>
Expand All @@ -416,6 +388,7 @@ function DoPointToInstance( _event, _sub_event, _x,_y )
// #############################################################################################
function HandleMouse()
{
// @if eventType("Mouse")
if (g_RunRoom)
{
var ind;
Expand Down Expand Up @@ -554,7 +527,8 @@ function HandleMouse()
{
g_pInstanceManager.PerformEvent(EVENT_MOUSE_WHEEL_DOWN,0);
}
}
}
// @endif mouse events
}


Expand All @@ -565,6 +539,7 @@ function HandleMouse()
// #############################################################################################
function HandleTimeLine()
{
// @if feature("timelines")
var ind1,ind2,j;
var pool = g_RunRoom.m_Active.pool;
var count = g_currentCreateCounter++;
Expand Down Expand Up @@ -616,6 +591,7 @@ function HandleTimeLine()
}
}
}
// @endif
}

// #############################################################################################
Expand Down Expand Up @@ -800,6 +776,7 @@ function event_lookup(_event, _subevent)
case GML_EVENT_OTHER_ENDOFPATH: return EVENT_OTHER_ENDOFPATH;
case GML_EVENT_OTHER_NOHEALTH: return EVENT_OTHER_NOHEALTH;
case GML_EVENT_OTHER_CLOSEBUTTON: return EVENT_OTHER_CLOSEBUTTON;
// @if event("OutsideView*")
case GML_EVENT_OTHER_OUTSIDE_VIEW0: return EVENT_OTHER_OUTSIDE_VIEW0;
case GML_EVENT_OTHER_OUTSIDE_VIEW1: return EVENT_OTHER_OUTSIDE_VIEW1;
case GML_EVENT_OTHER_OUTSIDE_VIEW2: return EVENT_OTHER_OUTSIDE_VIEW2;
Expand All @@ -808,6 +785,8 @@ function event_lookup(_event, _subevent)
case GML_EVENT_OTHER_OUTSIDE_VIEW5: return EVENT_OTHER_OUTSIDE_VIEW5;
case GML_EVENT_OTHER_OUTSIDE_VIEW6: return EVENT_OTHER_OUTSIDE_VIEW6;
case GML_EVENT_OTHER_OUTSIDE_VIEW7: return EVENT_OTHER_OUTSIDE_VIEW7;
// @endif
// @if event("BoundaryView*")
case GML_EVENT_OTHER_BOUNDARY_VIEW0: return EVENT_OTHER_BOUNDARY_VIEW0;
case GML_EVENT_OTHER_BOUNDARY_VIEW1: return EVENT_OTHER_BOUNDARY_VIEW1;
case GML_EVENT_OTHER_BOUNDARY_VIEW2: return EVENT_OTHER_BOUNDARY_VIEW2;
Expand All @@ -816,22 +795,25 @@ function event_lookup(_event, _subevent)
case GML_EVENT_OTHER_BOUNDARY_VIEW5: return EVENT_OTHER_BOUNDARY_VIEW5;
case GML_EVENT_OTHER_BOUNDARY_VIEW6: return EVENT_OTHER_BOUNDARY_VIEW6;
case GML_EVENT_OTHER_BOUNDARY_VIEW7: return EVENT_OTHER_BOUNDARY_VIEW7;
case GML_ev_user0: return EVENT_OTHER_USER0;
case GML_ev_user1: return EVENT_OTHER_USER1;
case GML_ev_user2: return EVENT_OTHER_USER2;
case GML_ev_user3: return EVENT_OTHER_USER3;
case GML_ev_user4: return EVENT_OTHER_USER4;
case GML_ev_user5: return EVENT_OTHER_USER5;
case GML_ev_user6: return EVENT_OTHER_USER6;
case GML_ev_user7: return EVENT_OTHER_USER7;
case GML_ev_user8: return EVENT_OTHER_USER8;
case GML_ev_user9: return EVENT_OTHER_USER9;
case GML_ev_user10: return EVENT_OTHER_USER10;
case GML_ev_user11: return EVENT_OTHER_USER11;
case GML_ev_user12: return EVENT_OTHER_USER12;
case GML_ev_user13: return EVENT_OTHER_USER13;
case GML_ev_user14: return EVENT_OTHER_USER14;
case GML_ev_user15: return EVENT_OTHER_USER15;
// @endif
// @if event("UserEvent*")
case GML_EVENT_OTHER_USER0: return EVENT_OTHER_USER0;
case GML_EVENT_OTHER_USER1: return EVENT_OTHER_USER1;
case GML_EVENT_OTHER_USER2: return EVENT_OTHER_USER2;
case GML_EVENT_OTHER_USER3: return EVENT_OTHER_USER3;
case GML_EVENT_OTHER_USER4: return EVENT_OTHER_USER4;
case GML_EVENT_OTHER_USER5: return EVENT_OTHER_USER5;
case GML_EVENT_OTHER_USER6: return EVENT_OTHER_USER6;
case GML_EVENT_OTHER_USER7: return EVENT_OTHER_USER7;
case GML_EVENT_OTHER_USER8: return EVENT_OTHER_USER8;
case GML_EVENT_OTHER_USER9: return EVENT_OTHER_USER9;
case GML_EVENT_OTHER_USER10: return EVENT_OTHER_USER10;
case GML_EVENT_OTHER_USER11: return EVENT_OTHER_USER11;
case GML_EVENT_OTHER_USER12: return EVENT_OTHER_USER12;
case GML_EVENT_OTHER_USER13: return EVENT_OTHER_USER13;
case GML_EVENT_OTHER_USER14: return EVENT_OTHER_USER14;
case GML_EVENT_OTHER_USER15: return EVENT_OTHER_USER15;
// @endif
case GML_EVENT_OTHER_ANIMATIONUPDATE: return EVENT_OTHER_ANIMATIONUPDATE;
case GML_EVENT_OTHER_ANIMATIONEVENT: return EVENT_OTHER_ANIMATIONEVENT;
case GML_EVENT_OTHER_WEB_IMAGE_LOAD: return EVENT_OTHER_WEB_IMAGE_LOAD;
Expand Down
Loading