diff --git a/thpj3/objects/obj_dialogue/Create_0.gml b/thpj3/objects/obj_dialogue/Create_0.gml index 76ddd22..640a2da 100644 --- a/thpj3/objects/obj_dialogue/Create_0.gml +++ b/thpj3/objects/obj_dialogue/Create_0.gml @@ -7,7 +7,7 @@ actor_left = ""; actor_left_emote = EMOTE_NEUTRAL; actor_right = ""; actor_right_emote = EMOTE_NEUTRAL; -last_active = LEFT; +last_active = LEFT_ACTOR; text_advance_ready = TEXT_LOADING; name_test = ds_queue_create(); diff --git a/thpj3/objects/obj_dialogue/Draw_0.gml b/thpj3/objects/obj_dialogue/Draw_0.gml index d66bc4c..e8559bd 100644 --- a/thpj3/objects/obj_dialogue/Draw_0.gml +++ b/thpj3/objects/obj_dialogue/Draw_0.gml @@ -12,7 +12,7 @@ if (dialogue_mode) { //TODO: Draw current active character's name draw_set_alpha(1); - if ( last_active == LEFT ) { + if ( last_active == LEFT_ACTOR ) { draw_set_alpha(.5); } draw_set_halign( fa_right ); @@ -20,7 +20,7 @@ if (dialogue_mode) { draw_set_halign( fa_left ); draw_set_alpha(1); - if ( last_active == RIGHT ) { + if ( last_active == RIGHT_ACTOR ) { draw_set_alpha(.5); } draw_text( 128, 640, actor_left ); diff --git a/thpj3/objects/obj_options/Create_0.gml b/thpj3/objects/obj_options/Create_0.gml new file mode 100644 index 0000000..73de2d4 --- /dev/null +++ b/thpj3/objects/obj_options/Create_0.gml @@ -0,0 +1,4 @@ +side_modifier = 0; + +x_target = obj_wriggle.x + ( obj_wriggle.face_dir * OPTION_FORWARD ); +y_target = obj_wriggle.y + (side_modifier * OPTION_SIDE_UNFOC); \ No newline at end of file diff --git a/thpj3/objects/obj_options/Draw_0.gml b/thpj3/objects/obj_options/Draw_0.gml new file mode 100644 index 0000000..f8e8ea5 --- /dev/null +++ b/thpj3/objects/obj_options/Draw_0.gml @@ -0,0 +1 @@ +draw_sprite_ext( spr_options, image_index, x, y, obj_wriggle.face_dir, 1, 0, c_white, .75 ); \ No newline at end of file diff --git a/thpj3/objects/obj_options/Step_0.gml b/thpj3/objects/obj_options/Step_0.gml new file mode 100644 index 0000000..6409eea --- /dev/null +++ b/thpj3/objects/obj_options/Step_0.gml @@ -0,0 +1,15 @@ +if ( keyboard_check( vk_shift ) ) { + x_target = obj_wriggle.x + ( obj_wriggle.face_dir * OPTION_FORWARD ); + y_target = obj_wriggle.y + ( side_modifier * OPTION_SIDE_FOCUS ); +} else { + x_target = obj_wriggle.x; + y_target = obj_wriggle.y + ( side_modifier * OPTION_SIDE_UNFOC ); +} + + +if ( point_distance(x, y, x_target, y_target) >= 6 ) { + move_towards_point( x_target, y_target, 5 ); +} else { + x = x_target; + y = y_target; +} \ No newline at end of file diff --git a/thpj3/objects/obj_options/obj_options.yy b/thpj3/objects/obj_options/obj_options.yy new file mode 100644 index 0000000..dfc9cb9 --- /dev/null +++ b/thpj3/objects/obj_options/obj_options.yy @@ -0,0 +1,38 @@ +{ + "spriteId": { + "name": "spr_options", + "path": "sprites/spr_options/spr_options.yy", + }, + "solid": false, + "visible": true, + "spriteMaskId": null, + "persistent": false, + "parentObjectId": null, + "physicsObject": false, + "physicsSensor": false, + "physicsShape": 1, + "physicsGroup": 1, + "physicsDensity": 0.5, + "physicsRestitution": 0.1, + "physicsLinearDamping": 0.1, + "physicsAngularDamping": 0.1, + "physicsFriction": 0.2, + "physicsStartAwake": true, + "physicsKinematic": false, + "physicsShapePoints": [], + "eventList": [ + {"isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, + {"isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, + {"isDnD":false,"eventNum":0,"eventType":8,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, + ], + "properties": [], + "overriddenProperties": [], + "parent": { + "name": "thpj3", + "path": "thpj3.yyp", + }, + "resourceVersion": "1.0", + "name": "obj_options", + "tags": [], + "resourceType": "GMObject", +} \ No newline at end of file diff --git a/thpj3/objects/obj_wriggle/Create_0.gml b/thpj3/objects/obj_wriggle/Create_0.gml index d5fa43d..00c4ed8 100644 --- a/thpj3/objects/obj_wriggle/Create_0.gml +++ b/thpj3/objects/obj_wriggle/Create_0.gml @@ -12,4 +12,14 @@ emergency = 0; hyper_time = 0; hyper_tier = 0; h_move = 0; -v_move = 0; \ No newline at end of file +v_move = 0; + +var top_option = instance_create_layer(x,y,"Instances", obj_options); +with (top_option) { + side_modifier = TOP; +} + +var bottom_option = instance_create_layer(x,y,"Instances", obj_options); +with (bottom_option) { + side_modifier = BOTTOM; +} \ No newline at end of file diff --git a/thpj3/objects/obj_wriggle/Draw_0.gml b/thpj3/objects/obj_wriggle/Draw_0.gml index beaf843..6ba24d0 100644 --- a/thpj3/objects/obj_wriggle/Draw_0.gml +++ b/thpj3/objects/obj_wriggle/Draw_0.gml @@ -1,4 +1,4 @@ -draw_sprite_ext( spr_wriggle, image_index, x, y, -1 + (2 * face_dir), 1, 0, c_white, 1 * ( max( 1, recovery ) % 3 ) ); +draw_sprite_ext( spr_wriggle, image_index, x, y, face_dir, 1, 0, c_white, 1 * ( max( 1, recovery ) % 3 ) ); draw_sprite_ext( spr_wriggle_hitbox, 0, x, y, 2, 2, hitbox_rotator, c_white, .75); draw_sprite_ext( spr_wriggle_hitbox, 0, x, y, 1, 1, -hitbox_rotator, c_white, 1); \ No newline at end of file diff --git a/thpj3/scripts/scr_initialize/scr_initialize.gml b/thpj3/scripts/scr_initialize/scr_initialize.gml index 64f9c1b..efa3704 100644 --- a/thpj3/scripts/scr_initialize/scr_initialize.gml +++ b/thpj3/scripts/scr_initialize/scr_initialize.gml @@ -10,9 +10,14 @@ #macro EMOTE_CONFUSED 3 #macro EMOTE_ANGRY 4 #macro EMOTE_OUCH 5 +#macro LEFT_ACTOR 0 +#macro RIGHT_ACTOR 1 -#macro LEFT 0 + +#macro LEFT -1 #macro RIGHT 1 +#macro TOP -1 +#macro BOTTOM 1 #macro LIVES_INIT 3 #macro LIVES_MAX 5 #macro BOMBS_INIT 3 @@ -34,6 +39,10 @@ #macro BOUNDARY_TOP 32 #macro BOUNDARY_BOTTOM 688 +#macro OPTION_FORWARD 100 +#macro OPTION_SIDE_UNFOC 100 +#macro OPTION_SIDE_FOCUS 20 + function scr_initialize() { diff --git a/thpj3/sprites/spr_options/39de23b4-27b9-462d-acbd-f1a6493218b2.png b/thpj3/sprites/spr_options/39de23b4-27b9-462d-acbd-f1a6493218b2.png new file mode 100644 index 0000000..cdb7a13 Binary files /dev/null and b/thpj3/sprites/spr_options/39de23b4-27b9-462d-acbd-f1a6493218b2.png differ diff --git a/thpj3/sprites/spr_options/layers/39de23b4-27b9-462d-acbd-f1a6493218b2/4750d189-0884-4788-a56a-7d940354fd1b.png b/thpj3/sprites/spr_options/layers/39de23b4-27b9-462d-acbd-f1a6493218b2/4750d189-0884-4788-a56a-7d940354fd1b.png new file mode 100644 index 0000000..cdb7a13 Binary files /dev/null and b/thpj3/sprites/spr_options/layers/39de23b4-27b9-462d-acbd-f1a6493218b2/4750d189-0884-4788-a56a-7d940354fd1b.png differ diff --git a/thpj3/sprites/spr_options/spr_options.yy b/thpj3/sprites/spr_options/spr_options.yy new file mode 100644 index 0000000..dd75d50 --- /dev/null +++ b/thpj3/sprites/spr_options/spr_options.yy @@ -0,0 +1,79 @@ +{ + "bboxMode": 0, + "collisionKind": 1, + "type": 0, + "origin": 4, + "preMultiplyAlpha": false, + "edgeFiltering": false, + "collisionTolerance": 0, + "swfPrecision": 2.525, + "bbox_left": 12, + "bbox_right": 55, + "bbox_top": 10, + "bbox_bottom": 40, + "HTile": false, + "VTile": false, + "For3D": false, + "width": 64, + "height": 64, + "textureGroupId": { + "name": "Default", + "path": "texturegroups/Default", + }, + "swatchColours": null, + "gridX": 0, + "gridY": 0, + "frames": [ + {"compositeImage":{"FrameId":{"name":"39de23b4-27b9-462d-acbd-f1a6493218b2","path":"sprites/spr_options/spr_options.yy",},"LayerId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMSpriteBitmap",},"images":[ + {"FrameId":{"name":"39de23b4-27b9-462d-acbd-f1a6493218b2","path":"sprites/spr_options/spr_options.yy",},"LayerId":{"name":"4750d189-0884-4788-a56a-7d940354fd1b","path":"sprites/spr_options/spr_options.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMSpriteBitmap",}, + ],"parent":{"name":"spr_options","path":"sprites/spr_options/spr_options.yy",},"resourceVersion":"1.0","name":"39de23b4-27b9-462d-acbd-f1a6493218b2","tags":[],"resourceType":"GMSpriteFrame",}, + ], + "sequence": { + "spriteId": {"name":"spr_options","path":"sprites/spr_options/spr_options.yy",}, + "timeUnits": 1, + "playback": 1, + "playbackSpeed": 30.0, + "playbackSpeedType": 0, + "autoRecord": true, + "volume": 1.0, + "length": 1.0, + "events": {"Keyframes":[],"resourceVersion":"1.0","resourceType":"KeyframeStore",}, + "moments": {"Keyframes":[],"resourceVersion":"1.0","resourceType":"KeyframeStore",}, + "tracks": [ + {"name":"frames","spriteId":null,"keyframes":{"Keyframes":[ + {"id":"d83fd73a-53b9-44b5-8d66-86237a6a12dc","Key":0.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"39de23b4-27b9-462d-acbd-f1a6493218b2","path":"sprites/spr_options/spr_options.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe",}, + ],"resourceVersion":"1.0","resourceType":"KeyframeStore",},"trackColour":0,"inheritsTrackColour":true,"builtinName":0,"traits":0,"interpolation":1,"tracks":[],"events":[],"modifiers":[],"isCreationTrack":false,"resourceVersion":"1.0","tags":[],"resourceType":"GMSpriteFramesTrack",}, + ], + "visibleRange": null, + "lockOrigin": false, + "showBackdrop": true, + "showBackdropImage": false, + "backdropImagePath": "", + "backdropImageOpacity": 0.5, + "backdropWidth": 1366, + "backdropHeight": 768, + "backdropXOffset": 0.0, + "backdropYOffset": 0.0, + "xorigin": 32, + "yorigin": 32, + "eventToFunction": {}, + "eventStubScript": null, + "parent": {"name":"spr_options","path":"sprites/spr_options/spr_options.yy",}, + "resourceVersion": "1.3", + "name": "spr_options", + "tags": [], + "resourceType": "GMSequence", + }, + "layers": [ + {"visible":true,"isLocked":false,"blendMode":0,"opacity":100.0,"displayName":"default","resourceVersion":"1.0","name":"4750d189-0884-4788-a56a-7d940354fd1b","tags":[],"resourceType":"GMImageLayer",}, + ], + "nineSlice": null, + "parent": { + "name": "thpj3", + "path": "thpj3.yyp", + }, + "resourceVersion": "1.0", + "name": "spr_options", + "tags": [], + "resourceType": "GMSprite", +} \ No newline at end of file diff --git a/thpj3/thpj3.yyp b/thpj3/thpj3.yyp index 1b8446c..517e247 100644 --- a/thpj3/thpj3.yyp +++ b/thpj3/thpj3.yyp @@ -2,12 +2,14 @@ "resources": [ {"id":{"name":"fn_disclaimer","path":"fonts/fn_disclaimer/fn_disclaimer.yy",},"order":1,}, {"id":{"name":"fn_title_text","path":"fonts/fn_title_text/fn_title_text.yy",},"order":0,}, + {"id":{"name":"obj_options","path":"objects/obj_options/obj_options.yy",},"order":15,}, {"id":{"name":"obj_disclaimer","path":"objects/obj_disclaimer/obj_disclaimer.yy",},"order":2,}, {"id":{"name":"spr_wriggle_hitbox","path":"sprites/spr_wriggle_hitbox/spr_wriggle_hitbox.yy",},"order":9,}, {"id":{"name":"obj_title_moon","path":"objects/obj_title_moon/obj_title_moon.yy",},"order":1,}, {"id":{"name":"spr_title_star","path":"sprites/spr_title_star/spr_title_star.yy",},"order":7,}, {"id":{"name":"scr_dialogue_start","path":"scripts/scr_dialogue_start/scr_dialogue_start.yy",},"order":10,}, {"id":{"name":"rm_disclaimer","path":"rooms/rm_disclaimer/rm_disclaimer.yy",},"order":3,}, + {"id":{"name":"spr_options","path":"sprites/spr_options/spr_options.yy",},"order":16,}, {"id":{"name":"obj_title_text","path":"objects/obj_title_text/obj_title_text.yy",},"order":3,}, {"id":{"name":"obj_wriggle","path":"objects/obj_wriggle/obj_wriggle.yy",},"order":11,}, {"id":{"name":"spr_title_bg","path":"sprites/spr_title_bg/spr_title_bg.yy",},"order":5,},