Skip to content

Commit

Permalink
?
Browse files Browse the repository at this point in the history
  • Loading branch information
tatjam committed Mar 28, 2020
1 parent 022fdf8 commit 0dd855c
Show file tree
Hide file tree
Showing 51 changed files with 44 additions and 8 deletions.
Binary file modified 7DRL.exe
Binary file not shown.
Binary file modified 7DRL.zip
Binary file not shown.
Binary file added 7DRL/7DRL.exe
Binary file not shown.
2 changes: 2 additions & 0 deletions 7DRL/SAMPLES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Some samples were taken from the ARMA 3 mod JSRS (Explosion sounds) and
mixed with other effects.
Binary file added 7DRL/SDL2.dll
Binary file not shown.
Binary file added 7DRL/Test.xp
Binary file not shown.
Binary file added 7DRL/alien_die.wav
Binary file not shown.
Binary file added 7DRL/biter/attack.wav
Binary file not shown.
Binary file added 7DRL/biter/idle.wav
Binary file not shown.
Binary file added 7DRL/click.wav
Binary file not shown.
Binary file added 7DRL/collide.wav
Binary file not shown.
Binary file added 7DRL/collide2.wav
Binary file not shown.
Binary file added 7DRL/crawler/attack.wav
Binary file not shown.
Binary file added 7DRL/crawler/idle.wav
Binary file not shown.
Binary file added 7DRL/crawler/moving.wav
Binary file not shown.
Binary file added 7DRL/diesel.wav
Binary file not shown.
Binary file added 7DRL/diesel_off.wav
Binary file not shown.
Binary file added 7DRL/distort.wav
Binary file not shown.
Binary file added 7DRL/engine_off.wav
Binary file not shown.
Binary file added 7DRL/engines_high.wav
Binary file not shown.
Binary file added 7DRL/engines_low.wav
Binary file not shown.
Binary file added 7DRL/explo_far_dist.wav
Binary file not shown.
Binary file added 7DRL/explo_med_dist.wav
Binary file not shown.
Binary file added 7DRL/explo_near_dist.wav
Binary file not shown.
Binary file added 7DRL/four_way.wav
Binary file not shown.
Binary file added 7DRL/grenade.wav
Binary file not shown.
Binary file added 7DRL/grenade_land.wav
Binary file not shown.
Binary file added 7DRL/gunshot.wav
Binary file not shown.
Binary file added 7DRL/hurt.wav
Binary file not shown.
Binary file added 7DRL/hurt_alien.wav
Binary file not shown.
Binary file added 7DRL/hurt_metal.wav
Binary file not shown.
Binary file added 7DRL/libtcod.dll
Binary file not shown.
Binary file added 7DRL/man_die.wav
Binary file not shown.
Binary file added 7DRL/metal_die.wav
Binary file not shown.
Binary file added 7DRL/moving_fast.wav
Binary file not shown.
Binary file added 7DRL/moving_slow.wav
Binary file not shown.
Binary file added 7DRL/ping.wav
Binary file not shown.
Binary file added 7DRL/radio.wav
Binary file not shown.
Binary file added 7DRL/rc11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 7DRL/shock.wav
Binary file not shown.
Binary file added 7DRL/terminal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 7DRL/torpedo_out.wav
Binary file not shown.
Binary file added 7DRL/underwater.wav
Binary file not shown.
Binary file added 7DRL/waterflow.wav
Binary file not shown.
Binary file added 7DRL/worm/attack.wav
Binary file not shown.
Binary file added 7DRL/worm/dive.wav
Binary file not shown.
15 changes: 13 additions & 2 deletions src/Drawing.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,26 @@ class Drawing
}

// Single letter hold button
static bool draw_button(TCODConsole* target, int x0, int y0, int rx, int ry, int ch)
static bool draw_button(TCODConsole* target, int x0, int y0, int rx, int ry, int ch, bool one_click = false)
{
TCOD_mouse_t pos = TCODMouse::getStatus();

int w = 2;
int h = 2;


bool clicked = false;
if (pos.cx - rx >= x0 && pos.cx - rx <= x0 + w && pos.cy - ry >= y0 && pos.cy - ry <= y0 + h && pos.lbutton)
bool button = false;
if (one_click)
{
button = pos.lbutton_pressed;
}
else
{
button = pos.lbutton;
}

if (pos.cx - rx >= x0 && pos.cx - rx <= x0 + w && pos.cy - ry >= y0 && pos.cy - ry <= y0 + h && button)
{
clicked = true;
}
Expand Down
4 changes: 4 additions & 0 deletions src/disembark/EmbarkScene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,10 @@ void EmbarkScene::update_crew(float dt, EmbarkCrew* crew)
}
}
}
else
{
crew->fired_timer = 0.0f;
}
}

void EmbarkScene::update(float dt)
Expand Down
6 changes: 5 additions & 1 deletion src/flight/FlightScene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,17 @@ We are now going to send the location of all our outposts.\n";

for (FlightEntity* ent : map.entities)
{
possible_embark = nullptr;

if (ent->get_type() == E_NEST || ent->get_type() == E_STATION)
{
float dx = vehicle.x - ent->get_x();
float dy = vehicle.y - ent->get_y();
float dist = sqrt(dx * dx + dy * dy);

if (dist < 0.2f && !((Building*)ent)->is_explored())
bool is_explored = ((Building*)ent)->is_explored();

if (dist < 0.2f && !is_explored)
{
possible_embark = ent;
break;
Expand Down
17 changes: 16 additions & 1 deletion src/flight/Gamemaster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ void Gamemaster::update(float dt)

if (embark_scene->finished)
{
if (g_master->clear_nest_count == 2 && g_master->clear_station_count == 0)
flight_scene->embark_target = nullptr;

if (g_master->clear_nest_count == 2)
{
std::string coords = "";
for (FlightEntity* ent : g_master->flight_scene->map.entities)
Expand Down Expand Up @@ -248,6 +250,19 @@ void Gamemaster::init()
{
crew.push_back(flight_scene->vehicle.crew[i].gc);
}

std::string coords = "";
for (FlightEntity* ent : g_master->flight_scene->map.entities)
{
if (ent->get_type() == E_STATION && !((Building*)ent)->is_explored())
{
coords += std::to_string((int)floor(ent->get_x()));
coords += ", ";
coords += std::to_string((int)floor(ent->get_x()));
break;
}
}

}

Gamemaster::Gamemaster()
Expand Down
8 changes: 4 additions & 4 deletions src/vehicle/workbench/Radio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ void Radio::draw(int rx, int ry)
}
}

if (Drawing::draw_button(&console, 1, console.getHeight() - 5, rx, ry, 174))
if (Drawing::draw_button(&console, 1, console.getHeight() - 5, rx, ry, 174, true))
{
msg = 0;
}

if (Drawing::draw_button(&console, 4, console.getHeight() - 5, rx, ry, '<'))
if (Drawing::draw_button(&console, 4, console.getHeight() - 5, rx, ry, '<', true))
{
msg--;
if (msg < 0)
Expand All @@ -40,7 +40,7 @@ void Radio::draw(int rx, int ry)
}
}

if (Drawing::draw_button(&console, console.getWidth() - 9, console.getHeight() - 5, rx, ry, '>'))
if (Drawing::draw_button(&console, console.getWidth() - 9, console.getHeight() - 5, rx, ry, '>', true))
{
msg++;
if (msg > messages.size() - 1)
Expand All @@ -49,7 +49,7 @@ void Radio::draw(int rx, int ry)
}
}

if (Drawing::draw_button(&console, console.getWidth() - 6, console.getHeight() - 5, rx, ry, 175))
if (Drawing::draw_button(&console, console.getWidth() - 6, console.getHeight() - 5, rx, ry, 175, true))
{
msg = messages.size() - 1;
if (msg < 0)
Expand Down

0 comments on commit 0dd855c

Please sign in to comment.