Ignore:
Timestamp:
Nov 10, 2005, 9:41:13 PM (14 years ago)
Author:
Sam Hocevar
Message:
  • absolute shitloads of 64 bit fixes.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/demo.cpp

    r16 r17  
    6262  the_game->load_level(name);
    6363  record_file->write((void *)"DEMO,VERSION:2",14);
    64   record_file->write_byte(strlen(name)+1);
     64  record_file->write_uint8(strlen(name)+1);
    6565  record_file->write(name,strlen(name)+1);
    6666 
     
    6868  if (DEFINEDP(symbol_value(l_difficulty)))
    6969  {
    70     if (symbol_value(l_difficulty)==l_easy) record_file->write_byte(0);
    71     else if (symbol_value(l_difficulty)==l_medium) record_file->write_byte(1);
    72     else if (symbol_value(l_difficulty)==l_hard) record_file->write_byte(2);
    73     else record_file->write_byte(3);
    74   } else record_file->write_byte(3);
     70    if (symbol_value(l_difficulty)==l_easy) record_file->write_uint8(0);
     71    else if (symbol_value(l_difficulty)==l_medium) record_file->write_uint8(1);
     72    else if (symbol_value(l_difficulty)==l_hard) record_file->write_uint8(2);
     73    else record_file->write_uint8(3);
     74  } else record_file->write_uint8(3);
    7575 
    7676
     
    9494          p->get_input();
    9595
    96       base->packet.write_byte(SCMD_SYNC);
    97       base->packet.write_short(make_sync());
     96      base->packet.write_uint8(SCMD_SYNC);
     97      base->packet.write_uint16(make_sync());
    9898      demo_man.save_packet(base->packet.packet_data(),base->packet.packet_size());
    9999      process_packet_commands(base->packet.packet_data(),base->packet.packet_size());
     
    102102    case PLAYING :
    103103    {
    104       uchar buf[1500];
     104      uint8_t buf[1500];
    105105      int size;
    106106      if (get_packet(buf,size))              // get starting inputs
     
    138138int demo_manager::start_playing(char *filename)
    139139{
    140   uchar sig[15];
     140  uint8_t sig[15];
    141141  record_file=open_file(filename,"rb");
    142142  if (record_file->open_failure()) { delete record_file; return 0; } 
     
    232232  if (state==RECORDING)
    233233  {
    234     ushort ps=lstl(packet_size);
     234    uint16_t ps=lstl(packet_size);
    235235    if (record_file->write(&ps,2)!=2 ||
    236236        record_file->write(packet,packet_size)!=packet_size)
     
    247247  if (state==PLAYING)
    248248  {
    249     ushort ps;
     249    uint16_t ps;
    250250    if (record_file->read(&ps,2)!=2)
    251251    {
Note: See TracChangeset for help on using the changeset viewer.