-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from jack27121/v2.2.0
v2.2.0
- Loading branch information
Showing
103 changed files
with
2,555 additions
and
232 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/// @description | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/// @description | ||
//camera | ||
stanncam_init(400,270,1920,1080); | ||
cam1 = new stanncam(obj_player_sidescroller.x,obj_player_sidescroller.y,global.game_w,global.game_h); | ||
cam1.follow = obj_player_sidescroller; | ||
cam1.room_constrain = true; | ||
|
||
cam2 = cam1.clone(); | ||
cam2.follow = obj_player_sidescroller2; | ||
cam2.set_size(global.game_w/2,global.game_h,0); | ||
|
||
split_screen = false; | ||
|
||
//pointer | ||
zoom_text = cam1.zoom_amount | ||
|
||
speed_mode = 1; | ||
zoom_mode = 1; | ||
|
||
game_res = 2; | ||
gui_hires = false; | ||
gui_res = 0; | ||
|
||
resolutions = [ | ||
{ w:400 , h:400 }, //1:1 | ||
{ w:500 , h:250 }, //2:1 | ||
{ w:320 , h:180 }, //16:9 | ||
{ w:640 , h:360 }, | ||
{ w:1280 , h:720 }, | ||
{ w:1920 , h:1080 }, | ||
{ w:2560 , h:1440 } | ||
] | ||
|
||
lookahead = false; | ||
|
||
surface = -1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/// @description | ||
//chooses pixel font or hires font | ||
if(gui_hires){ | ||
draw_set_font(f_hires); | ||
var offset = 45; | ||
var outline_width = 4; | ||
var precision = 16; | ||
draw_set_color(c_white) | ||
} else { | ||
draw_set_font(f_pixel); | ||
var offset = 8; | ||
var outline_width = 1; | ||
var precision = 8; | ||
draw_set_color(c_white) | ||
} | ||
|
||
//draws helper text | ||
draw_set_halign(fa_left); | ||
draw_set_valign(fa_top); | ||
draw_text_outline(1,1,"[arrow keys] move character",outline_width,precision); | ||
draw_text_outline(1,offset*2,"[ALT] toggle hi-res GUI",outline_width,precision); | ||
draw_text_outline(1,offset*4,"[RMB] / [SCRL WHEEL] "+ string(zoom_text),outline_width,precision); | ||
var constrained = (cam1.room_constrain) ? "camera constrained to room" : "camera not constrained to room"; | ||
draw_text_outline(1,offset*5,"[CTRL] "+ constrained,outline_width,precision); | ||
var debug = (cam1.debug_draw) ? "debug draw on" : "debug draw off"; | ||
draw_text_outline(1,offset*6,"[SHIFT] "+ debug,outline_width,precision); | ||
draw_text_outline(1,offset*7,"[F] camera shake",outline_width,precision); | ||
draw_text_outline(1,offset*8,"[Tab] camera speed "+ string(cam1.spd),outline_width,precision); | ||
draw_text_outline(1,offset*9,"[1 & 2] to switch between example rooms",outline_width,precision); | ||
|
||
//draw current resolution text | ||
draw_set_halign(fa_right) | ||
draw_text_outline(global.gui_w-1,1,"game resolution: "+string(global.res_w)+" x "+string(global.res_h)+" [F1]",outline_width,precision); | ||
draw_text_outline(global.gui_w-1,offset,"GUI resolution: "+string(global.gui_w)+" x "+string(global.gui_h)+" [F2]",outline_width,precision); | ||
draw_text_outline(global.gui_w-1,offset*2,"Keep aspect ratio: "+string(stanncam_get_keep_aspect_ratio())+" [F3]",outline_width,precision); | ||
|
||
var window_mode_text = ""; | ||
switch (global.window_mode) { | ||
case STANNCAM_WINDOW_MODE.windowed: | ||
window_mode_text = "windowed "; | ||
break; | ||
case STANNCAM_WINDOW_MODE.fullscreen: | ||
window_mode_text = "fullscreen"; | ||
break; | ||
case STANNCAM_WINDOW_MODE.borderless: | ||
window_mode_text = "borderless"; | ||
break; | ||
} | ||
|
||
draw_text_outline(global.gui_w-1,offset*3,$"window mode: {window_mode_text} [F4]",outline_width,precision); | ||
draw_text_outline(global.gui_w-1,offset*4,"split-screen: "+string(split_screen)+" [F5]",outline_width,precision); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/// @description | ||
|
||
parralax_bg = function(cam_){ | ||
|
||
//the background is scaled up so it appears smooth when being parralaxed | ||
|
||
var scalex = stanncam_get_res_scale_x(); | ||
var scaley = stanncam_get_res_scale_y(); | ||
|
||
//the offset the camera is from the middle of the room | ||
var offset_x = (-cam_.get_x() -cam_.x_frac) * scalex; | ||
var pos_x = -200 + cam_.x_frac; | ||
var pos_y = 0 + cam_.y_frac; | ||
|
||
draw_sprite_ext_tiled(spr_underwater_layer00,0,pos_x + (offset_x * 0.0),pos_y,2,1,scalex,scaley); | ||
draw_sprite_ext_tiled(spr_underwater_layer01,0,pos_x + (offset_x * 0.2),pos_y,2,1,scalex,scaley); | ||
draw_sprite_ext_tiled(spr_underwater_layer02,0,pos_x + (offset_x * 0.4),pos_y,2,1,scalex,scaley); | ||
draw_sprite_ext_tiled(spr_underwater_layer03,0,pos_x + (offset_x * 0.6),pos_y,2,1,scalex,scaley); | ||
draw_sprite_ext_tiled(spr_underwater_layer04,0,pos_x + (offset_x * 0.8),pos_y,2,1,scalex,scaley); | ||
draw_sprite_ext_tiled(spr_underwater_layer05,0,pos_x + (offset_x * 1.0),pos_y,2,1,scalex,scaley); | ||
} | ||
|
||
parralax_bg1 = function(){ | ||
parralax_bg(cam1); | ||
} | ||
|
||
parralax_bg2 = function(){ | ||
parralax_bg(cam2); | ||
} | ||
|
||
//fancy splitscreen rendering | ||
var width = global.res_w; | ||
var height = global.res_h; | ||
|
||
//the parralax drawing is scaled down again | ||
var scalex = 1/stanncam_get_res_scale_x(); | ||
var scaley = 1/stanncam_get_res_scale_y(); | ||
|
||
if(!split_screen){ | ||
cam1.draw_special(parralax_bg1,0,0,width,height,scalex,scaley); | ||
cam1.draw(0,0); | ||
} else { | ||
//fancy splitscreen rendering | ||
|
||
cam1.draw_special(parralax_bg1,0,0,width/2,height,scalex,scaley); | ||
cam1.draw(0,0); | ||
|
||
cam2.draw_special(parralax_bg2,global.game_w/2,0,width/2,height,scalex,scaley); | ||
cam2.draw(global.game_w/2,0); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/// @description | ||
var zoom_amount = cam1.zoom_amount; | ||
zoom_amount-=0.05 | ||
zoom_amount = clamp(zoom_amount,0.1,2); | ||
cam1.zoom(zoom_amount,0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/// @description | ||
var zoom_amount = cam1.zoom_amount; | ||
zoom_amount+=0.05 | ||
zoom_amount = clamp(zoom_amount,0.1,2); | ||
cam1.zoom(zoom_amount,0); |
Oops, something went wrong.