EnderWiggin wrote:Wow. Lisp, eh? Nice work, boshaw.
aghmed wrote:don't know why but many, many negs are broken (contains other size that it is in real)
examples:
vilage idol
leanto
plow (don't have any neg)
cow (same as plow)
chest
80% of moutain ridges
and many others
if someone know how to read neg files i can give fixed rectangles of broken objects (rectangle(int sizex, int sizey,int offcetx, int offcety))
aghmed wrote:it's in HnH
#NEG LAYER FOR RES: out///gfx\terobjs\trough.res
#Coord cc
52
47
#Coord bc
-7
-11
#Coord bs
16
20
#Coord sz
104
76
#Byte en
0
size.x = 6;
size.y = 6;
offcet.x = -3;
offcet.y = -3;
if(Config.bounddb && ui.modshift) {
g.chcolor(255, 0, 0, 128); //Set color scheme
synchronized(glob.oc) { //Synchronize the object cache
for(Gob gob : glob.oc) { // Loop for each object
Drawable d = gob.getattr(Drawable.class); //get Drawable attribute
Resource.Neg neg;
if(d instanceof ResDrawable) { //check if it's of type ResDrawable
ResDrawable rd = (ResDrawable)d;
if(rd.spr == null) //Ignore if it doesn't have a sprint
continue;
if(rd.spr.res == null) //or if it's sprints res isn't in existence
continue;
neg = rd.spr.res.layer(Resource.negc); //get the Neg otherwise
} else if(d instanceof Layered) { //If it's not ResDrawable and instead Layered
Layered lay = (Layered)d;
if(lay.base.get() == null) //ignore if it has no base
continue;
neg = lay.base.get().layer(Resource.negc); //get the Neg otherwise from the base layer
} else {
continue; //ignore Object if neither Layered or ResDrawable
}
if((neg.bs.x > 0) && (neg.bs.y > 0)) { //If the bs isn't negative
Coord c1 = gob.getc().add(neg.bc); //Set the upper left?
Coord c2 = gob.getc().add(neg.bc).add(neg.bs); //add the bs to right lower right?
g.frect(m2s(c1).add(oc), //render
m2s(new Coord(c2.x, c1.y)).add(oc),
m2s(c2).add(oc),
m2s(new Coord(c1.x, c2.y)).add(oc));
}
}
}
g.chcolor();
}
boshaw wrote:Coord BS seems to related to the SIZE, while Coord BC relates to it's position or offset
Users browsing this forum: No registered users and 4 guests