Overview
Comment: | The direction for NewX and NewY should use only the low 3-bits; correct that so that it is. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
f1962f879e67fcdbbcf3b66734050e68 |
User & Date: | user on 2020-12-21 01:26:51 |
Other Links: | manifest | tags |
Context
2020-12-21
| ||
07:53 | If object being shoved is made VisualOnly, do not allow it to be shoved check-in: eab8aabd4b user: user tags: trunk | |
01:26 | The direction for NewX and NewY should use only the low 3-bits; correct that so that it is. check-in: f1962f879e user: user tags: trunk | |
01:20 | Implement LocateMe check-in: c32d302e15 user: user tags: trunk | |
Changes
Modified exec.c from [00936c7cd3] to [e9aa24edae].
︙ | ︙ | |||
397 398 399 400 401 402 403 | static Uint32 obj_dir(Uint32 n,Uint32 d) { if(n==VOIDLINK) return VOIDLINK; d=resolve_dir(n,d); return obj_top_at(objects[n]->x+x_delta[d],objects[n]->y+y_delta[d]); } static Sint16 new_x(Sint16 n,Uint8 d) { | | | | 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 | static Uint32 obj_dir(Uint32 n,Uint32 d) { if(n==VOIDLINK) return VOIDLINK; d=resolve_dir(n,d); return obj_top_at(objects[n]->x+x_delta[d],objects[n]->y+y_delta[d]); } static Sint16 new_x(Sint16 n,Uint8 d) { n+=x_delta[d&7]; return n<0?0:n>pfwidth?pfwidth+1:n; } static Sint16 new_y(Sint16 n,Uint8 d) { n+=y_delta[d&7]; return n<0?0:n>pfheight?pfheight+1:n; } static void change_shape(Uint32 n,int d,int v) { v&=3; v<<=d+d; v|=objects[n]->shape&~(3<<(d+d)); |
︙ | ︙ | |||
1354 1355 1356 1357 1358 1359 1360 | case OP_MOVETO_D: NoIgnore(); StackReq(2,0); t3=Pop(); Numeric(t3); t2=Pop(); Numeric(t2); move_to(obj,obj,t2.u,t3.u); break; case OP_MOVETO_CD: NoIgnore(); StackReq(3,0); t3=Pop(); Numeric(t3); t2=Pop(); Numeric(t2); i=v_object(Pop()); move_to(obj,i,t2.u,t3.u); break; case OP_MSG: StackReq(0,1); Push(MVALUE(msgvars.msg)); break; case OP_MUL: StackReq(2,1); t2=Pop(); Numeric(t2); t1=Pop(); Numeric(t1); Push(NVALUE(t1.u*t2.u)); break; case OP_MUL_C: StackReq(2,1); t2=Pop(); Numeric(t2); t1=Pop(); Numeric(t1); Push(NVALUE(t1.s*t2.s)); break; case OP_NE: StackReq(2,1); t2=Pop(); t1=Pop(); Push(NVALUE(v_equal(t1,t2)?0:1)); break; case OP_NEG: StackReq(1,1); t1=Pop(); Numeric(t1); t1.s=-t1.s; Push(t1); break; | | | | 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 | case OP_MOVETO_D: NoIgnore(); StackReq(2,0); t3=Pop(); Numeric(t3); t2=Pop(); Numeric(t2); move_to(obj,obj,t2.u,t3.u); break; case OP_MOVETO_CD: NoIgnore(); StackReq(3,0); t3=Pop(); Numeric(t3); t2=Pop(); Numeric(t2); i=v_object(Pop()); move_to(obj,i,t2.u,t3.u); break; case OP_MSG: StackReq(0,1); Push(MVALUE(msgvars.msg)); break; case OP_MUL: StackReq(2,1); t2=Pop(); Numeric(t2); t1=Pop(); Numeric(t1); Push(NVALUE(t1.u*t2.u)); break; case OP_MUL_C: StackReq(2,1); t2=Pop(); Numeric(t2); t1=Pop(); Numeric(t1); Push(NVALUE(t1.s*t2.s)); break; case OP_NE: StackReq(2,1); t2=Pop(); t1=Pop(); Push(NVALUE(v_equal(t1,t2)?0:1)); break; case OP_NEG: StackReq(1,1); t1=Pop(); Numeric(t1); t1.s=-t1.s; Push(t1); break; case OP_NEWX: StackReq(2,1); t2=Pop(); Numeric(t2); t1=Pop(); Numeric(t1); Push(NVALUE(new_x(t1.u,t2.u))); break; case OP_NEWY: StackReq(2,1); t2=Pop(); Numeric(t2); t1=Pop(); Numeric(t1); Push(NVALUE(new_y(t1.u,t2.u))); break; case OP_NEXT: StackReq(0,1); ptr=v_next(code,ptr); break; case OP_NIP: StackReq(2,1); t1=Pop(); Pop(); Push(t1); break; case OP_OBJABOVE: StackReq(0,1); i=obj_above(obj); Push(OVALUE(i)); break; case OP_OBJABOVE_C: StackReq(1,1); i=obj_above(v_object(Pop())); Push(OVALUE(i)); break; case OP_OBJBELOW: StackReq(0,1); i=obj_below(obj); Push(OVALUE(i)); break; case OP_OBJBELOW_C: StackReq(1,1); i=obj_below(v_object(Pop())); Push(OVALUE(i)); break; case OP_OBJBOTTOMAT: StackReq(2,1); t2=Pop(); Numeric(t2); t1=Pop(); Numeric(t1); i=obj_bottom_at(t1.u,t2.u); Push(OVALUE(i)); break; |
︙ | ︙ |