Changeset 09d1345 in buchla-68k for vlib/vtext.c


Ignore:
Timestamp:
07/15/2017 10:03:02 AM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
bf89cfb
Parents:
6a37d5b
Message:

Prefer signed integers in vlib.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vlib/vtext.c

    r6a37d5b r09d1345  
    1010#include "ram.h"
    1111
    12 static int16_t  msk[] = { 0xFF00, 0x00FF };
     12static uint16_t msk[] = { 0xFF00, 0x00FF };
    1313
    14 void vtext(uint16_t *obj, uint16_t nc, uint16_t row, uint16_t col, int8_t *ip)
     14void vtext(uint16_t *obj, int16_t nc, int16_t row, int16_t col, int8_t *ip)
    1515{
    1616        register uint16_t *op;
     
    2020                op = obj + ((nc >> 1) * row) + (col >> 1);
    2121
    22                 *op = (*op & (uint16_t)msk[col & 1]) |
    23                       ((*ip++ & 0x00FF) << ((col & 1) ? 8 : 0));
     22                *op = (*op & msk[col & 1]) |
     23                      ((uint16_t)(*ip++ & 0x00FF) << ((col & 1) ? 8 : 0));
    2424
    2525                col++;
Note: See TracChangeset for help on using the changeset viewer.