Skip to content

Commit

Permalink
Shutup gcc (fixed compiler warnings). Cleanup decor light code.
Browse files Browse the repository at this point in the history
  • Loading branch information
danij committed Oct 12, 2006
1 parent 357a101 commit c56d45a
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
3 changes: 2 additions & 1 deletion doomsday/engine/portable/include/con_main.h
Expand Up @@ -31,6 +31,7 @@

#include <stdio.h>
#include "dd_share.h"
#include "de_system.h"

#define MAX_ARGS 256

Expand Down Expand Up @@ -120,7 +121,7 @@ void Con_Ticker(timespan_t time);
boolean Con_Responder(event_t *event);
void Con_Printf(const char *format, ...);
void Con_FPrintf(int flags, const char *format, ...); // Flagged printf.
int Con_PrintFileName(const char *fn, enum filetype_e type, void *dir);
int Con_PrintFileName(const char *fn, filetype_t type, void *dir);
void Con_SetFont(ddfont_t *cfont);
float Con_FontScaleY(void);
cbline_t *Con_GetBufferLine(cbuffer_t *buffer, int num);
Expand Down
42 changes: 20 additions & 22 deletions doomsday/engine/portable/include/net_buf.h
Expand Up @@ -17,7 +17,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor,
* Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301 USA
*/

Expand All @@ -31,44 +31,44 @@
#include "con_decl.h"

// Send Packet flags:
#define SPF_REBOUND 0x00020000 // Write only to local loopback
#define SPF_DONT_SEND 0x00040000 // Don't really send out anything
#define SPF_CONFIRM 0x40000000 // Make sure it's received
#define SPF_ORDERED 0x80000000 // Send in order & confirm
#define SPF_REBOUND 0x00020000 // Write only to local loopback
#define SPF_DONT_SEND 0x00040000 // Don't really send out anything
#define SPF_CONFIRM 0x40000000 // Make sure it's received
#define SPF_ORDERED 0x80000000 // Send in order & confirm

#define NETBUFFER_MAXDATA 32768
#define NETBUFFER_MAXDATA 32768

// Each network node is identified by a number.
typedef unsigned int nodeid_t;

// Incoming messages are stored in netmessage_s structs.
typedef struct netmessage_s {
struct netmessage_s *next;
nodeid_t sender;
int player; // Set in N_GetMessage().
unsigned int size;
byte *data;
void *handle;
struct netmessage_s *next;
nodeid_t sender;
int player; // Set in N_GetMessage().
unsigned int size;
byte *data;
void *handle;
} netmessage_t;

typedef unsigned short msgid_t;

#pragma pack(1)
typedef struct {
msgid_t id; // Unused.
byte type; // Type of the message.
byte data[NETBUFFER_MAXDATA];
msgid_t id; // Unused.
byte type; // Type of the message.
byte data[NETBUFFER_MAXDATA];
} netdata_t;
#pragma pack()

typedef struct netbuffer_s {
int player; // Recipient or sender.
int length; // Number of bytes in the data buffer.
int headerLength; // 1 byte at the moment.
int player; // Recipient or sender.
int length; // Number of bytes in the data buffer.
int headerLength; // 1 byte at the moment.

byte *cursor; // Points into the data buffer.
byte *cursor; // Points into the data buffer.

netdata_t msg; // The data buffer for sending and
netdata_t msg; // The data buffer for sending and
// receiving packets.
} netbuffer_t;

Expand All @@ -91,6 +91,4 @@ void N_PrintBufferInfo(void);
void N_PrintHuffmanStats(void);
void N_PostMessage(netmessage_t * msg);

D_CMD(HuffmanStats);

#endif
4 changes: 2 additions & 2 deletions doomsday/engine/portable/src/con_config.c
Expand Up @@ -55,7 +55,7 @@ static char cfgFile[256];

// CODE --------------------------------------------------------------------

int Con_ParseCommands(char *fileName, int setdefault)
boolean Con_ParseCommands(char *fileName, boolean setdefault)
{
DFILE *file;
char buff[512];
Expand All @@ -81,7 +81,7 @@ int Con_ParseCommands(char *fileName, int setdefault)
if(!M_IsComment(buff))
{
// Execute the commands silently.
if(!Con_Execute(CMDS_CONFIG, buff, (setdefault ? true : false), false))
if(!Con_Execute(CMDS_CONFIG, buff, setdefault, false))
Con_Message("%s(%d): error executing command\n" " \"%s\"\n",
fileName, line, buff);
}
Expand Down
3 changes: 2 additions & 1 deletion doomsday/engine/portable/src/net_main.c
Expand Up @@ -61,9 +61,10 @@

// EXTERNAL FUNCTION PROTOTYPES --------------------------------------------

D_CMD(Ping); // in net_ping.c
D_CMD(HuffmanStats); // in net_buf.c
D_CMD(Login); // in cl_main.c
D_CMD(Logout); // in sv_main.c
D_CMD(Ping); // in net_ping.c

void R_DrawLightRange(void);
int Sv_GetRegisteredMobj(pool_t *, thid_t, mobjdelta_t *);
Expand Down

0 comments on commit c56d45a

Please sign in to comment.