X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fglschool.c;h=eb522a031b2b0b7e9f256c2b1a1e5001d25974f6;hp=1ef4c130db171c0969c93526a194406e376de92f;hb=6f5482d73adb0165c0130bb47d852644ab0c4869;hpb=c70f94f648d51bb4828193124f325fa52b0e57f3 diff --git a/hacks/glx/glschool.c b/hacks/glx/glschool.c index 1ef4c130..eb522a03 100644 --- a/hacks/glx/glschool.c +++ b/hacks/glx/glschool.c @@ -126,11 +126,12 @@ reshape_glschool(ModeInfo *mi, int width, int height) glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(sc->context)); if (sc->school != (School *)0) { - setBBox(sc->school, -aspect*160, aspect*160, -130, 130, -450, -50.0); + glschool_setBBox(sc->school, -aspect*160, aspect*160, -130, 130, -450, -50.0); glDeleteLists(sc->bboxList, 1); - createBBoxList(&SCHOOL_BBOX(sc->school), &sc->bboxList, wire); + glschool_createBBoxList(&SCHOOL_BBOX(sc->school), + &sc->bboxList, wire); } - reshape(width, height); + glschool_reshape(width, height); } ENTRYPOINT void @@ -162,7 +163,7 @@ init_glschool(ModeInfo *mi) sc->colors, &sc->nColors, False, 0, False); - sc->school = initSchool(NFish, AccLimit, MaxVel, MinVel, DistExp, Momentum, + sc->school = glschool_initSchool(NFish, AccLimit, MaxVel, MinVel, DistExp, Momentum, MinRadius, AvoidFact, MatchFact, CenterFact, TargetFact, DistComp); if (sc->school == (School *)0) { @@ -172,11 +173,12 @@ init_glschool(ModeInfo *mi) reshape_glschool(mi, width, height); - initGLEnv(DoFog); - initFishes(sc->school); - createDrawLists(&SCHOOL_BBOX(sc->school), &sc->bboxList, &sc->goalList, &sc->fishList, - &sc->fish_polys, &sc->box_polys, wire); - computeAccelerations(sc->school); + glschool_initGLEnv(DoFog); + glschool_initFishes(sc->school); + glschool_createDrawLists(&SCHOOL_BBOX(sc->school), + &sc->bboxList, &sc->goalList, &sc->fishList, + &sc->fish_polys, &sc->box_polys, wire); + glschool_computeAccelerations(sc->school); } ENTRYPOINT void @@ -196,17 +198,19 @@ draw_glschool(ModeInfo *mi) mi->polygon_count = 0; if ((sc->goalCounter % GoalChgFreq) == 0) - newGoal(sc->school); + glschool_newGoal(sc->school); sc->goalCounter++; sc->rotCounter++; sc->rotCounter = (sc->rotCounter%360); - applyMovements(sc->school); - drawSchool(sc->colors, sc->school, sc->bboxList, sc->goalList, sc->fishList, sc->rotCounter, sc->drawGoal, sc->drawBBox, - sc->fish_polys, sc->box_polys, - &mi->polygon_count); - computeAccelerations(sc->school); + glschool_applyMovements(sc->school); + glschool_drawSchool(sc->colors, sc->school, sc->bboxList, + sc->goalList, sc->fishList, sc->rotCounter, + sc->drawGoal, sc->drawBBox, + sc->fish_polys, sc->box_polys, + &mi->polygon_count); + glschool_computeAccelerations(sc->school); if (mi->fps_p) do_fps(mi);