Changeset 4c202e0 in network-game for client/Client/main.cpp


Ignore:
Timestamp:
Dec 25, 2012, 6:59:58 PM (12 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
3b8adee
Parents:
edfd1d0
Message:

Added Player to the visual studio project, changed Common to use the #defines in Compiler.h, and added basic client support for processing MSG_TYPE_PLAYER messages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • client/Client/main.cpp

    redfd1d0 r4c202e0  
     1#include "../../common/Compiler.h"
     2
    13#if defined WINDOWS
    24   #include <winsock2.h>
     
    2123#include <allegro5/allegro_ttf.h>
    2224
    23 #include "../../common/Compiler.h"
    2425#include "../../common/Message.h"
    2526#include "../../common/Common.h"
     27#include "../../common/Player.h"
    2628
    2729#include "Window.h"
     
    433435               break;
    434436            }
     437            case MSG_TYPE_PLAYER:
     438            {
     439               Player p = *(Player*)(&(msg.buffer));
     440
     441               cout << "p.name: " << p.name;
     442               cout << "p.pos.x: " << p.pos.x;
     443               cout << "p.pos.y: " << p.pos.y;
     444
     445               break;
     446            }
    435447         }
    436448                     
Note: See TracChangeset for help on using the changeset viewer.