Skip to content

Commit

Permalink
Add gamestate triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
NyakoFox committed Jun 4, 2024
1 parent d533fbd commit 6f46268
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions desktop_version/src/Editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,16 @@ static void draw_entities(void)
case 24: // Safe Boxes
graphics.draw_rect(x, y, entity->p1 * 8, entity->p2 * 8, graphics.getRGB(164, 164, 255));
graphics.draw_rect(x, y, 8, 8, graphics.getRGB(255, 255, 255));
break;
case 25: // Gamestate Triggers
graphics.draw_rect(x, y, entity->p1 * 8, entity->p2 * 8, graphics.getRGB(255, 164, 255));
graphics.draw_rect(x, y, 8, 8, graphics.getRGB(255, 255, 255));

int arrow_x = x + (entity->p1 - 1) * 4;
int arrow_y = y + (entity->p2 - 1) * 4;

font::print(PR_FONT_LEVEL | PR_BOR | PR_CJK_HIGH, arrow_x, arrow_y, help.String(entity->p3), 255, 255, 255);

break;
case 50: // Warp Lines
if (entity->p1 >= 2) // Horizontal
Expand Down
3 changes: 3 additions & 0 deletions desktop_version/src/Map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1953,6 +1953,9 @@ void mapclass::loadlevel(int rx, int ry)
case 24: // Safe Box
obj.createblock(SAFE, ex, ey, ent.p1 * 8, ent.p2 * 8);
break;
case 25: // Trigger
obj.createblock(TRIGGER, ex, ey, ent.p1 * 8, ent.p2 * 8, ent.p3);
break;
case 50: // Warp Lines
obj.customwarpmode=true;
switch (ent.p1)
Expand Down

0 comments on commit 6f46268

Please sign in to comment.