Galactic Bloodshed
highlight.cc
Go to the documentation of this file.
1 // Copyright 2019 The Galactic Bloodshed Authors. All rights reserved.
2 // Use of this source code is governed by a license that can be
3 // found in the COPYING file.
4 
5 /// \file highlight.cc
6 /// \brief Toggle highlight option on a player.
7 
8 #include "gb/commands/highlight.h"
9 
10 #include <cstdio>
11 
12 #include "gb/GB_server.h"
13 #include "gb/buffers.h"
14 #include "gb/files_shl.h"
15 #include "gb/races.h"
16 #include "gb/shlmisc.h"
17 #include "gb/vars.h"
18 
19 void highlight(const command_t &argv, GameObj &g) {
20  player_t Playernum = g.player;
21  governor_t Governor = g.governor;
22  // TODO(jeffbailey): int APcount = 0;
23  player_t n;
24  racetype *Race;
25 
26  if (!(n = get_player(argv[1]))) {
27  g.out << "No such player.\n";
28  return;
29  }
30  Race = races[Playernum - 1];
31  Race->governor[Governor].toggle.highlight = n;
32  putrace(Race);
33 }
void highlight(const command_t &argv, GameObj &g)
Definition: highlight.cc:19
void putrace(Race *r)
Definition: files_shl.cc:808