mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-18 23:57:32 +00:00
MORTEVIELLE: cardinal -> uint
This commit is contained in:
parent
c8774837ef
commit
c1ead19c5d
@ -1049,7 +1049,7 @@ L2:
|
||||
x = x * (3 - res);
|
||||
if (x > 319) cx = 41;
|
||||
else cx = 1;
|
||||
cy = succ(int, (cardinal)y >> 3); /* 0-199 => 1-25 */
|
||||
cy = succ(int, (uint)y >> 3); /* 0-199 => 1-25 */
|
||||
if ((cy > 23) || ((cx == 41) && (set::of(range(20, 22), eos).has(cy)))) {
|
||||
if (choi != 0) {
|
||||
lig = ((choi - 1) % 23) << 3;
|
||||
|
@ -89,7 +89,7 @@ static void fait_boite(int lidep, int nli, int tx) {
|
||||
int x, y, xx, yy;
|
||||
|
||||
if (tx > 640) tx = 640;
|
||||
x = 320 - ((cardinal)tx >> 1);
|
||||
x = 320 - ((uint)tx >> 1);
|
||||
y = pred(int, lidep) << 3;
|
||||
xx = x + tx;
|
||||
yy = y + (nli << 3);
|
||||
@ -163,15 +163,15 @@ int do_alert(Common::String str_, int n) {
|
||||
} while (!(chaine[i] == ']'));
|
||||
}
|
||||
if (nbcase == 1) esp = nbcol - 40;
|
||||
else esp = (cardinal)(nbcol - nbcase * 40) >> 1;
|
||||
coldep = 320 - ((cardinal)nbcol >> 1) + ((cardinal)esp >> 1);
|
||||
else esp = (uint)(nbcol - nbcase * 40) >> 1;
|
||||
coldep = 320 - ((uint)nbcol >> 1) + ((uint)esp >> 1);
|
||||
fait_choix(cas, coldep, nbcase, s, esp);
|
||||
limit[1][1] = ((cardinal)(coldep) >> 1) * res;
|
||||
limit[1][1] = ((uint)(coldep) >> 1) * res;
|
||||
limit[1][2] = limit[1][1] + 40;
|
||||
if (nbcase == 1) {
|
||||
limit[2][1] = limit[2][2];
|
||||
} else {
|
||||
limit[2][1] = ((cardinal)(320 + ((cardinal)esp >> 1)) >> 1) * res;
|
||||
limit[2][1] = ((uint)(320 + ((uint)esp >> 1)) >> 1) * res;
|
||||
limit[2][2] = (limit[2][1]) + 40;
|
||||
}
|
||||
show_mouse();
|
||||
|
@ -38,8 +38,8 @@ void boite(int x, int y, int dx, int dy, int coul) {
|
||||
/* debug('boite'); */
|
||||
hide_mouse();
|
||||
if (res == 1) {
|
||||
x = (cardinal)x >> 1;
|
||||
dx = (cardinal)dx >> 1;
|
||||
x = (uint)x >> 1;
|
||||
dx = (uint)dx >> 1;
|
||||
}
|
||||
xi = x;
|
||||
yi = y;
|
||||
|
@ -50,7 +50,7 @@ int testou() {
|
||||
case '\1':
|
||||
case '\3':
|
||||
case '\5' : {
|
||||
newgd = (cardinal)pred(int, ord(ch)) >> 1;
|
||||
newgd = (uint)pred(int, ord(ch)) >> 1;
|
||||
testou_result = 61;
|
||||
return testou_result;
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ void menu_aff() {
|
||||
putpix(gd, x, y + 1, 0);
|
||||
putpix(gd, x, y, color);
|
||||
}
|
||||
msk = (cardinal)msk >> 1;
|
||||
msk = (uint)msk >> 1;
|
||||
x = x + 1;
|
||||
}
|
||||
ind_tabl = succ(int, ind_tabl);
|
||||
@ -229,7 +229,7 @@ void util(int x, int y) {
|
||||
else ix = 3;
|
||||
xmx = dxcar * ix * res + xmn + 2;
|
||||
if ((x > xmn) && (x < xmx) && (y < ymx) && (y > 15)) {
|
||||
ix = pred(int, (cardinal)y >> 3) + (msg3 << 8);
|
||||
ix = pred(int, (uint)y >> 3) + (msg3 << 8);
|
||||
if (ix != msg4) {
|
||||
invers(1);
|
||||
msg4 = ix;
|
||||
|
@ -54,9 +54,9 @@ int readclock() {
|
||||
r.ax = 0x2c00;
|
||||
intr(0x21, r);
|
||||
{
|
||||
h = (cardinal)r.cx >> 8;
|
||||
h = (uint)r.cx >> 8;
|
||||
m = r.cx % 256;
|
||||
s = (cardinal)r.dx >> 8;
|
||||
s = (uint)r.dx >> 8;
|
||||
}
|
||||
m = m * 60;
|
||||
h = h * 3600;
|
||||
@ -285,7 +285,7 @@ void clsf10() {
|
||||
else if (s.conf > 65) st = "Malsaine";
|
||||
if (res == 1) co = 10;
|
||||
else co = 6;
|
||||
co = 574 - ((cardinal)co * length(st) >> 1);
|
||||
co = 574 - ((uint)co * length(st) >> 1);
|
||||
putxy(co, 92);
|
||||
writeg(st, 4);
|
||||
if (res == 1) co = 620;
|
||||
@ -331,7 +331,7 @@ void calch(int &j, int &h, int &m) {
|
||||
nh = readclock();
|
||||
th = jh + ((nh - mh) / t);
|
||||
m = ((th % 2) + vm) * 30;
|
||||
h = ((cardinal)th >> 1) + vh;
|
||||
h = ((uint)th >> 1) + vh;
|
||||
if (m == 60) {
|
||||
m = 0;
|
||||
h = h + 1;
|
||||
@ -347,7 +347,7 @@ void conv(int x, int &y) {
|
||||
cx = 1;
|
||||
y = 128;
|
||||
while (cx < x) {
|
||||
y = (cardinal)y >> 1;
|
||||
y = (uint)y >> 1;
|
||||
cx = succ(int, cx);
|
||||
}
|
||||
}
|
||||
@ -656,12 +656,12 @@ void pendule() {
|
||||
paint_rect(578, 114, 6, 18);
|
||||
if (set::of(cga, her, eos).has(gd)) co = 0;
|
||||
else co = 1;
|
||||
if (min == 0) droite(((cardinal)x >> 1)*res, y, ((cardinal)x >> 1)*res, (y - rg), co);
|
||||
else droite(((cardinal)x >> 1)*res, y, ((cardinal)x >> 1)*res, (y + rg), co);
|
||||
if (min == 0) droite(((uint)x >> 1)*res, y, ((uint)x >> 1)*res, (y - rg), co);
|
||||
else droite(((uint)x >> 1)*res, y, ((uint)x >> 1)*res, (y + rg), co);
|
||||
h = heu;
|
||||
if (h > 12) h = h - 12;
|
||||
if (h == 0) h = 12;
|
||||
droite(((cardinal)x >> 1)*res, y, ((cardinal)(x + cv[1][h]) >> 1)*res, y + cv[2][h], co);
|
||||
droite(((uint)x >> 1)*res, y, ((uint)(x + cv[1][h]) >> 1)*res, y + cv[2][h], co);
|
||||
show_mouse();
|
||||
putxy(568, 154);
|
||||
if (heu > 11) writeg("PM ", 1);
|
||||
|
@ -98,7 +98,7 @@ void hide_mouse() {
|
||||
switch (gd) {
|
||||
case cga : {
|
||||
k = 0;
|
||||
j = ((cardinal)y_s >> 1) * 80 + ((cardinal)x_s >> 2);
|
||||
j = ((uint)y_s >> 1) * 80 + ((uint)x_s >> 2);
|
||||
do {
|
||||
memw[0xb000 + j] = s_s[0][k];
|
||||
memw[0xb800 + j + 2] = s_s[1][k];
|
||||
@ -150,7 +150,7 @@ void hide_mouse() {
|
||||
}
|
||||
break;
|
||||
case her : {
|
||||
j = ((cardinal)y_s >> 1) * 80 + ((cardinal)x_s >> 3);
|
||||
j = ((uint)y_s >> 1) * 80 + ((uint)x_s >> 3);
|
||||
for (i = 0; i <= 5; i ++) {
|
||||
for (k = 0; k <= 3; k ++) memw[0xb000 + k * 0x200 + j] = s_s[i][k];
|
||||
j = j + 80;
|
||||
@ -158,7 +158,7 @@ void hide_mouse() {
|
||||
}
|
||||
break;
|
||||
case tan : {
|
||||
j = ((cardinal)y_s >> 2) * 160 + ((cardinal)x_s >> 1);
|
||||
j = ((uint)y_s >> 2) * 160 + ((uint)x_s >> 1);
|
||||
k = 0;
|
||||
do {
|
||||
for (i = 0; i <= 3; i ++) {
|
||||
@ -189,7 +189,7 @@ void show_mouse() {
|
||||
switch (gd) {
|
||||
case cga : {
|
||||
k = 0;
|
||||
j = ((cardinal)y_s >> 1) * 80 + ((cardinal)x_s >> 2);
|
||||
j = ((uint)y_s >> 1) * 80 + ((uint)x_s >> 2);
|
||||
do {
|
||||
s_s[0][k] = memw[0xb800 + j];
|
||||
s_s[1][k] = memw[0xb800 + j + 2];
|
||||
@ -237,7 +237,7 @@ void show_mouse() {
|
||||
}
|
||||
break;
|
||||
case her : {
|
||||
j = ((cardinal)y_s >> 1) * 80 + ((cardinal)x_s >> 3);
|
||||
j = ((uint)y_s >> 1) * 80 + ((uint)x_s >> 3);
|
||||
for (i = 0; i <= 5; i ++) {
|
||||
for (k = 0; k <= 3; k ++) s_s[i][k] = memw[0xb000 + k * 0x200 + j];
|
||||
j = j + 80;
|
||||
@ -245,7 +245,7 @@ void show_mouse() {
|
||||
}
|
||||
break;
|
||||
case tan : {
|
||||
j = ((cardinal)y_s >> 2) * 160 + ((cardinal)x_s >> 1);
|
||||
j = ((uint)y_s >> 2) * 160 + ((uint)x_s >> 1);
|
||||
k = 0;
|
||||
do {
|
||||
for (i = 0; i <= 3; i ++) {
|
||||
@ -282,14 +282,14 @@ void pos_mouse(int x, int y) {
|
||||
y_s = y;
|
||||
switch (gd) {
|
||||
case ams : {
|
||||
p_o_s = ((cardinal)y_s >> 1) * 80 + ((cardinal)x_s >> 3) + (y_s & 1) * 0x2000;
|
||||
p_o_s = ((uint)y_s >> 1) * 80 + ((uint)x_s >> 3) + (y_s & 1) * 0x2000;
|
||||
}
|
||||
break;
|
||||
/*cga : begin
|
||||
P_O_S:=(Y_S shr 1)*80+X_S shr 2+(Y_S and 1)*$2000;
|
||||
end;*/
|
||||
case ega : {
|
||||
p_o_s = y_s * 80 + ((cardinal)x_s >> 3);
|
||||
p_o_s = y_s * 80 + ((uint)x_s >> 3);
|
||||
}
|
||||
break;
|
||||
} /* case Gd */
|
||||
|
@ -71,15 +71,15 @@ static void cinq_huit(char &c, int &ind, byte &pt, bool &the_end) {
|
||||
|
||||
/* 5-8 */
|
||||
oct = t_mot[ind];
|
||||
oct = (cardinal)(oct << (16 - pt)) >> (16 - pt);
|
||||
oct = (uint)(oct << (16 - pt)) >> (16 - pt);
|
||||
if (pt < 6) {
|
||||
ind = ind + 1;
|
||||
oct = oct << (5 - pt);
|
||||
pt = pt + 11;
|
||||
oct = oct | ((cardinal)t_mot[ind] >> pt);
|
||||
oct = oct | ((uint)t_mot[ind] >> pt);
|
||||
} else {
|
||||
pt = pt - 5;
|
||||
oct = (cardinal)oct >> pt;
|
||||
oct = (uint)oct >> pt;
|
||||
}
|
||||
|
||||
switch (oct) {
|
||||
@ -91,15 +91,15 @@ static void cinq_huit(char &c, int &ind, byte &pt, bool &the_end) {
|
||||
case 30:
|
||||
case 31 : {
|
||||
ocd = t_mot[ind];
|
||||
ocd = (cardinal)(ocd << (16 - pt)) >> (16 - pt);
|
||||
ocd = (uint)(ocd << (16 - pt)) >> (16 - pt);
|
||||
if (pt < 6) {
|
||||
ind = ind + 1;
|
||||
ocd = ocd << (5 - pt);
|
||||
pt = pt + 11;
|
||||
ocd = ocd | ((cardinal)t_mot[ind] >> pt);
|
||||
ocd = ocd | ((uint)t_mot[ind] >> pt);
|
||||
} else {
|
||||
pt = pt - 5;
|
||||
ocd = (cardinal)ocd >> pt;
|
||||
ocd = (uint)ocd >> pt;
|
||||
}
|
||||
if (oct == 30) c = chr(tab30[ocd]);
|
||||
else c = chr(tab31[ocd]);
|
||||
|
@ -153,8 +153,8 @@ void ani50() {
|
||||
nhom &with = palcga[j].a[i];
|
||||
|
||||
fb >> b;
|
||||
with.n = (cardinal)b >> 4;
|
||||
with.hom[0] = ((cardinal)b >> 2) & 3;
|
||||
with.n = (uint)b >> 4;
|
||||
with.hom[0] = ((uint)b >> 2) & 3;
|
||||
with.hom[1] = b & 3;
|
||||
}
|
||||
}
|
||||
@ -236,7 +236,7 @@ void ani50() {
|
||||
case '\1':
|
||||
case '\3':
|
||||
case '\5' :
|
||||
gd = (cardinal)ord(ch) >> 1;
|
||||
gd = (uint)ord(ch) >> 1;
|
||||
break;
|
||||
case '\10' :
|
||||
gd = her;
|
||||
|
@ -30,13 +30,13 @@
|
||||
namespace Mortevielle {
|
||||
|
||||
void spfrac(int wor) {
|
||||
c3.rep = (cardinal)wor >> 12;
|
||||
c3.rep = (uint)wor >> 12;
|
||||
if ((typlec == 0) && (c3.code != 9))
|
||||
if (((c3.code > 4) && (c3.val != 20) && !(set::of(3, 6, 9, eos).has(c3.rep))) ||
|
||||
((c3.code < 5) && !(set::of(19, 22, eos).has(c3.val)) && !(set::of(4, 9, eos).has(c3.rep))))
|
||||
c3.rep = c3.rep + 1;
|
||||
c3.freq = ((cardinal)wor >> 6) & 7;
|
||||
c3.acc = ((cardinal)wor >> 9) & 7;
|
||||
c3.freq = ((uint)wor >> 6) & 7;
|
||||
c3.acc = ((uint)wor >> 9) & 7;
|
||||
}
|
||||
|
||||
void charg_car() {
|
||||
|
@ -56,13 +56,13 @@ void trait_ph() {
|
||||
ledeb = swap(t_cph[ptr_tcph]) + deca[typlec];
|
||||
lefin = swap(t_cph[ptr_tcph + 1]) + deca[typlec];
|
||||
nb_word = lefin - ledeb;
|
||||
ptr_tcph = (cardinal)ledeb >> 1;
|
||||
ptr_tcph = (uint)ledeb >> 1;
|
||||
ptr_word = 0;
|
||||
do {
|
||||
memw[adword + ptr_word] = t_cph[ptr_tcph];
|
||||
ptr_word = ptr_word + 2;
|
||||
ptr_tcph = ptr_tcph + 1;
|
||||
} while (!(ptr_tcph >= ((cardinal)lefin >> 1)));
|
||||
} while (!(ptr_tcph >= ((uint)lefin >> 1)));
|
||||
|
||||
ptr_oct = 0;
|
||||
ptr_word = 0;
|
||||
|
@ -267,7 +267,7 @@ void tecran() {
|
||||
erase_menu();
|
||||
imen = false;
|
||||
if (set::of('\1', '\3', '\5', '\7', '\11', eos).has(inkey)) {
|
||||
change_gd((cardinal)pred(int, ord(inkey)) >> 1);
|
||||
change_gd((uint)pred(int, ord(inkey)) >> 1);
|
||||
return;
|
||||
}
|
||||
if (choisi && (msg[3] == sauve)) sv_game(msg[4] & 7);
|
||||
|
@ -177,7 +177,7 @@ void taffich() {
|
||||
if (gd == her) {
|
||||
for (i = 0; i <= 15; i ++) {
|
||||
palh = memw[0x7000 + (succ(int, i) << 1)];
|
||||
alllum[i] = (palh & 15) + (((cardinal)palh >> 12) & 15) + (((cardinal)palh >> 8) & 15);
|
||||
alllum[i] = (palh & 15) + (((uint)palh >> 12) & 15) + (((uint)palh >> 8) & 15);
|
||||
}
|
||||
for (i = 0; i <= 15; i ++) {
|
||||
k = 0;
|
||||
|
@ -297,7 +297,7 @@ void hirs() {
|
||||
/* procedure affput(Chx,Gd,x,y,coul,char:int); external 'c:\mc\divaf.com'; */
|
||||
|
||||
void affcar(int gd, int x, int y, int coul, int chr) {
|
||||
if (res == 1) affput(1, gd, ((cardinal)x >> 1), y, coul, chr);
|
||||
if (res == 1) affput(1, gd, ((uint)x >> 1), y, coul, chr);
|
||||
else affput(1, gd, x, y, coul, chr);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user