mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 22:58:09 +00:00
Fixed some boxes issues. Matrix is still buggy
svn-id: r3620
This commit is contained in:
parent
f92ed783cb
commit
8168c0b11d
@ -628,8 +628,9 @@ void Scumm::clearMsgQueue() {
|
||||
void Scumm::walkActors() {
|
||||
int i;
|
||||
Actor *a;
|
||||
|
||||
for (i=1; i<NUM_ACTORS; i++) {
|
||||
a = derefActor(i);
|
||||
a = derefActor(i);
|
||||
if (a->room==_currentRoom)
|
||||
walkActor(a);
|
||||
}
|
||||
|
27
boxes.cpp
27
boxes.cpp
@ -116,14 +116,25 @@ bool Scumm::checkXYInBoxBounds(int b, int x, int y) {
|
||||
|
||||
void Scumm::getBoxCoordinates(int boxnum, BoxCoords *box) {
|
||||
Box *bp = getBoxBaseAddr(boxnum);
|
||||
box->ul.x = (int16)FROM_LE_16(bp->ulx);
|
||||
box->ul.y = (int16)FROM_LE_16(bp->uly);
|
||||
box->ur.x = (int16)FROM_LE_16(bp->urx);
|
||||
box->ur.y = (int16)FROM_LE_16(bp->ury);
|
||||
box->ll.x = (int16)FROM_LE_16(bp->llx);
|
||||
box->ll.y = (int16)FROM_LE_16(bp->lly);
|
||||
box->lr.x = (int16)FROM_LE_16(bp->lrx);
|
||||
box->lr.y = (int16)FROM_LE_16(bp->lry);
|
||||
if(_features & GF_NO_SCALLING){
|
||||
box->ul.x = (int16)FROM_LE_16(bp->ulx);
|
||||
box->ul.y = (int16)FROM_LE_16(bp->uly);
|
||||
box->ur.x = (int16)FROM_LE_16(bp->urx);
|
||||
box->ur.y = (int16)FROM_LE_16(bp->ury);
|
||||
box->lr.x = (int16)FROM_LE_16(bp->llx);
|
||||
box->lr.y = (int16)FROM_LE_16(bp->lly);
|
||||
box->ll.x = (int16)FROM_LE_16(bp->lrx);
|
||||
box->ll.y = (int16)FROM_LE_16(bp->lry);
|
||||
} else {
|
||||
box->ul.x = (int16)FROM_LE_16(bp->ulx);
|
||||
box->ul.y = (int16)FROM_LE_16(bp->uly);
|
||||
box->ur.x = (int16)FROM_LE_16(bp->urx);
|
||||
box->ur.y = (int16)FROM_LE_16(bp->ury);
|
||||
box->ll.x = (int16)FROM_LE_16(bp->llx);
|
||||
box->ll.y = (int16)FROM_LE_16(bp->lly);
|
||||
box->lr.x = (int16)FROM_LE_16(bp->lrx);
|
||||
box->lr.y = (int16)FROM_LE_16(bp->lry);
|
||||
}
|
||||
}
|
||||
|
||||
uint Scumm::distanceFromPt(int x, int y, int ptx, int pty) {
|
||||
|
7
scumm.h
7
scumm.h
@ -63,13 +63,8 @@ struct MemBlkHeader {
|
||||
struct Box { /* file format */
|
||||
int16 ulx,uly;
|
||||
int16 urx,ury;
|
||||
#if 1 // Ender - set to 0 for indy3/zak256
|
||||
int16 llx,lly;
|
||||
int16 lrx,lry;
|
||||
#else
|
||||
int16 lrx,lry;
|
||||
int16 llx,lly;
|
||||
#endif
|
||||
byte mask;
|
||||
byte flags;
|
||||
uint16 scale;
|
||||
@ -2269,4 +2264,4 @@ bool isSfxFinished();
|
||||
void waitForTimer(Scumm *s, int msec_delay);
|
||||
void setShakePos(Scumm *s, int shake_pos);
|
||||
uint16 newTag2Old(uint32 oldTag);
|
||||
void cd_playtrack(int track, int offset, int delay);
|
||||
void cd_playtrack(int track, int offset, int delay);
|
||||
|
17
scummvm.cpp
17
scummvm.cpp
@ -899,11 +899,22 @@ void Scumm::processKbd() {
|
||||
getKeyInput(0);
|
||||
|
||||
_virtual_mouse_x = mouse.x + virtscr[0].xstart;
|
||||
_virtual_mouse_y = mouse.y + virtscr[0].topline;
|
||||
_virtual_mouse_y = mouse.y;
|
||||
|
||||
if(!(_features & GF_OLD256))
|
||||
_virtual_mouse_y+=virtscr[0].topline;
|
||||
else
|
||||
_virtual_mouse_y-=16;
|
||||
|
||||
if (_virtual_mouse_y < 0)
|
||||
_virtual_mouse_y = -1;
|
||||
if (_virtual_mouse_y >= virtscr[0].height)
|
||||
_virtual_mouse_y = -1;
|
||||
if (_features & GF_OLD256) {
|
||||
if (_virtual_mouse_y >= virtscr[0].height + virtscr[0].topline)
|
||||
_virtual_mouse_y = -1;
|
||||
} else {
|
||||
if (_virtual_mouse_y >= virtscr[0].height)
|
||||
_virtual_mouse_y = -1;
|
||||
}
|
||||
|
||||
if (!_lastKeyHit)
|
||||
return;
|
||||
|
8
sdl.cpp
8
sdl.cpp
@ -776,10 +776,10 @@ void BoxTest(int num) {
|
||||
Sint16 rx1[4], ry1[4];
|
||||
|
||||
scumm.getBoxCoordinates(num, &box);
|
||||
rx1[0] = box.ul.x*2; ry1[0] = box.ul.y*2;
|
||||
rx1[1] = box.ur.x*2; ry1[1] = box.ur.y*2;
|
||||
rx1[2] = box.lr.x*2; ry1[2] = box.lr.y*2;
|
||||
rx1[3] = box.ll.x*2; ry1[3] = box.ll.y*2;
|
||||
rx1[0] = box.ul.x*2; ry1[0] = box.ul.y*2+32;
|
||||
rx1[1] = box.ur.x*2; ry1[1] = box.ur.y*2+32;
|
||||
rx1[2] = box.lr.x*2; ry1[2] = box.lr.y*2+32;
|
||||
rx1[3] = box.ll.x*2; ry1[3] = box.ll.y*2+32;
|
||||
|
||||
filledPolygonColor(screen, &rx1[0], &ry1[0], 4, 255);
|
||||
SDL_UpdateRect(screen, 0,0,0,0);
|
||||
|
Loading…
Reference in New Issue
Block a user