Index: src/options.h =================================================================== --- src/options.h (revision 2914) +++ src/options.h (working copy) @@ -66,7 +66,7 @@ extern INPUT_TEMPLATE input_templates[6]; -void prepareContentDir (const char *contentDirName); +void prepareContentDir (const char *contentDirName, const char *program_path); void prepareConfigDir (const char *configDirName); void prepareMeleeDir (void); void prepareSaveDir (void); Index: src/sc2code/intro.c =================================================================== --- src/sc2code/intro.c (revision 2914) +++ src/sc2code/intro.c (working copy) @@ -149,29 +149,11 @@ } static void -DrawTracedText (TEXT *pText, COLOR Fore, COLOR Back) -{ - SetContextForeGroundColor (Back); - pText->baseline.x--; - font_DrawText (pText); - pText->baseline.x += 2; - font_DrawText (pText); - pText->baseline.x--; - pText->baseline.y--; - font_DrawText (pText); - pText->baseline.y += 2; - font_DrawText (pText); - pText->baseline.y--; - SetContextForeGroundColor (Fore); - font_DrawText (pText); -} - -static void DrawTextEffect (TEXT *pText, COLOR Fore, COLOR Back, int Effect) { if (Effect == 'T') { - DrawTracedText (pText, Fore, Back); + font_DrawTextWithStroke (pText, Fore, Back); } else { Index: src/sc2code/comm.c =================================================================== --- src/sc2code/comm.c (revision 2914) +++ src/sc2code/comm.c (working copy) @@ -250,30 +250,8 @@ else { // Alien speech - - // Draw the background by drawing the same text in the - // background color one pixel shifted to all 4 directions. - SetContextForeGroundColor (CommData.AlienTextBColor); - - --pText->baseline.x; - font_DrawText (pText); - - ++pText->baseline.x; - --pText->baseline.y; - font_DrawText (pText); - - ++pText->baseline.x; - ++pText->baseline.y; - font_DrawText (pText); - - --pText->baseline.x; - ++pText->baseline.y; - font_DrawText (pText); - - SetContextForeGroundColor (CommData.AlienTextFColor); - - --pText->baseline.y; - font_DrawText (pText); + font_DrawTextWithStroke (pText, + CommData.AlienTextFColor, CommData.AlienTextBColor); } } while (!eol && maxchars); pText->pStr = pStr; Index: src/sc2code/libs/gfxlib.h =================================================================== --- src/sc2code/libs/gfxlib.h (revision 2914) +++ src/sc2code/libs/gfxlib.h (working copy) @@ -182,6 +182,7 @@ extern void DrawFilledRectangle (RECT *pRect); extern void DrawLine (LINE *pLine); extern void font_DrawText (TEXT *pText); +extern void font_DrawTextWithStroke (TEXT *pText, COLOR text, COLOR stroke); extern void DrawBatch (PRIMITIVE *pBasePrim, PRIM_LINKS PrimLinks, BATCH_FLAGS BatchFlags); extern void BatchGraphics (void); Index: src/sc2code/libs/graphics/font.c =================================================================== --- src/sc2code/libs/graphics/font.c (revision 2914) +++ src/sc2code/libs/graphics/font.c (working copy) @@ -62,6 +62,28 @@ DrawBatch (&_locPrim, 0, BATCH_SINGLE); } + +/* Draw the stroke by drawing the same text in the + * background color one pixel shifted to all 4 directions. + */ +void +font_DrawTextWithStroke (TEXT *pText, COLOR text, COLOR stroke) +{ + SetContextForeGroundColor (stroke); + pText->baseline.x--; + font_DrawText (pText); + pText->baseline.x += 2; + font_DrawText (pText); + pText->baseline.x--; + pText->baseline.y--; + font_DrawText (pText); + pText->baseline.y += 2; + font_DrawText (pText); + pText->baseline.y--; + SetContextForeGroundColor (text); + font_DrawText (pText); +} + BOOLEAN GetContextFontLeading (SIZE *pheight) { Index: src/sc2code/outfit.c =================================================================== --- src/sc2code/outfit.c (revision 2914) +++ src/sc2code/outfit.c (working copy) @@ -545,11 +545,21 @@ static void ChangeFuelQuantity (void) { + int loop; + int incr = 0; + + if (PulsedInputState.menu[KEY_MENU_UP]) incr = 1; + if (PulsedInputState.menu[KEY_MENU_DOWN]) incr = -1; + if (PulsedInputState.menu[KEY_MENU_LEFT]) incr = -10; + if (PulsedInputState.menu[KEY_MENU_RIGHT]) incr = 10; + + for (loop = 0; loop < abs(incr); loop++) + { RECT r; r.extent.height = 1; - if (PulsedInputState.menu[KEY_MENU_UP]) + if (incr > 0) { LockMutex (GraphicsLock); SetContext (SpaceContext); @@ -575,11 +585,16 @@ } else { // no more room for fuel or not enough RUs + if (loop) + { + UnlockMutex (GraphicsLock); + break; + } PlayMenuSound (MENU_SOUND_FAILURE); } UnlockMutex (GraphicsLock); } - else if (PulsedInputState.menu[KEY_MENU_DOWN]) + else if (incr < 0) { LockMutex (GraphicsLock); SetContext (SpaceContext); @@ -599,6 +614,14 @@ } else { // no fuel left to drain + if (loop) + { + SetContext (StatusContext); + GetGaugeRect (&r, FALSE); + SetFlashRect (&r, (FRAME)0); + UnlockMutex (GraphicsLock); + break; + } PlayMenuSound (MENU_SOUND_FAILURE); } SetContext (StatusContext); @@ -606,6 +629,7 @@ SetFlashRect (&r, (FRAME)0); UnlockMutex (GraphicsLock); } + } } BOOLEAN @@ -790,15 +814,7 @@ } else { - switch (pMS->CurState) - { - case OUTFIT_DOFUEL: - SetMenuSounds (MENU_SOUND_UP | MENU_SOUND_DOWN, MENU_SOUND_SELECT | MENU_SOUND_CANCEL); - break; - default: - SetMenuSounds (MENU_SOUND_ARROWS, MENU_SOUND_SELECT); - break; - } + SetMenuSounds (MENU_SOUND_ARROWS, MENU_SOUND_SELECT); if (pMS->CurState == OUTFIT_DOFUEL) ChangeFuelQuantity (); Index: src/sc2code/shipyard.c =================================================================== --- src/sc2code/shipyard.c (revision 2914) +++ src/sc2code/shipyard.c (working copy) @@ -883,6 +883,7 @@ else if (pMS->delta_item & MODIFY_CREW_FLAG) { SIZE crew_delta, crew_bought; + int loop; if (hStarShip) StarShipPtr = LockShipFrag (&GLOBAL (built_ship_q), @@ -890,11 +891,14 @@ else StarShipPtr = NULL; // Keeping compiler quiet. - SetMenuSounds (MENU_SOUND_UP | MENU_SOUND_DOWN, + SetMenuSounds (MENU_SOUND_ARROWS, MENU_SOUND_SELECT | MENU_SOUND_CANCEL); crew_delta = 0; - if (dy < 0) + + for (loop = 0; loop < (dx ? 10 : 1); loop++) { + if (dy < 0 || dx > 0) + { if (hStarShip == 0) { if (GetCPodCapacity (&r.corner) > GetCrewCount () @@ -903,7 +907,7 @@ { DrawPoint (&r.corner); DeltaSISGauges (1, 0, -GLOBAL (CrewCost)); - crew_delta = 1; + crew_delta += 1; SetContext (StatusContext); GetGaugeRect (&r, TRUE); @@ -912,6 +916,7 @@ } else { // at capacity or not enough RUs + if (loop) break; PlayMenuSound (MENU_SOUND_FAILURE); } } @@ -938,7 +943,7 @@ DeltaSISGauges (0, 0, -(COUNT)ShipCost[ StarShipPtr->race_id]); ++StarShipPtr->crew_level; - crew_delta = 1; + crew_delta += 1; ShowShipCrew (StarShipPtr, &pMS->flash_rect0); r.corner.x = pMS->flash_rect0.corner.x; r.corner.y = pMS->flash_rect0.corner.y @@ -950,13 +955,19 @@ } else { // at capacity or not enough RUs + if (loop) + { + UnlockFleetInfo (&GLOBAL (avail_race_q), + hTemplate); + break; + } PlayMenuSound (MENU_SOUND_FAILURE); } UnlockFleetInfo (&GLOBAL (avail_race_q), hTemplate); } } - else if (dy > 0) + else if (dy > 0 || dx < 0) { crew_bought = (SIZE)MAKE_WORD ( GET_GAME_STATE (CREW_PURCHASED0), @@ -968,7 +979,7 @@ DeltaSISGauges (-1, 0, GLOBAL (CrewCost) - (crew_bought == CREW_EXPENSE_THRESHOLD ? 2 : 0)); - crew_delta = -1; + crew_delta -= 1; GetCPodCapacity (&r.corner); SetContextForeGroundColor (BLACK_COLOR); @@ -981,6 +992,7 @@ } else { // no crew to dismiss + if (loop) break; PlayMenuSound (MENU_SOUND_FAILURE); } } @@ -995,11 +1007,24 @@ else DeltaSISGauges (0, 0, (COUNT)ShipCost[ StarShipPtr->race_id]); - crew_delta = -1; + crew_delta -= 1; --StarShipPtr->crew_level; } else { // no crew to dismiss + if (loop) + { + ShowShipCrew (StarShipPtr, + &pMS->flash_rect0); + r.corner.x = pMS->flash_rect0.corner.x; + r.corner.y = pMS->flash_rect0.corner.y + + pMS->flash_rect0.extent.height - 6; + r.extent.width = SHIP_WIN_WIDTH; + r.extent.height = 5; + SetContext (SpaceContext); + SetFlashRect (&r, (FRAME)0); + break; + } PlayMenuSound (MENU_SOUND_FAILURE); } ShowShipCrew (StarShipPtr, &pMS->flash_rect0); @@ -1012,6 +1037,7 @@ SetFlashRect (&r, (FRAME)0); } } + } if (hStarShip) { Index: src/sc2code/ships/pkunk/pkunk.c =================================================================== --- src/sc2code/ships/pkunk/pkunk.c (revision 2914) +++ src/sc2code/ships/pkunk/pkunk.c (working copy) @@ -19,6 +19,7 @@ #include "ships/ship.h" #include "ships/pkunk/resinst.h" +#include "settings.h" #include "globdata.h" #include "libs/mathlib.h" @@ -469,9 +470,14 @@ { COUNT angle, facing; - ProcessSound (SetAbsSoundIndex ( + // kill any music that might be playing. + // The only possible candidate for this is + // the shofixti victory ditty -- if you are + // here, then the scout didn't really win + StopMusic (); + PlaySound (SetAbsSoundIndex ( StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1 - ), ElementPtr); + ), NotPositional (), NULL, GAME_SOUND_PRIORITY); ElementPtr->life_span = PHOENIX_LIFE; SetPrimType (&(GLOBAL (DisplayArray))[ElementPtr->PrimIndex], Index: src/sc2code/ships/androsyn/androsyn.c =================================================================== --- src/sc2code/ships/androsyn/androsyn.c (revision 2914) +++ src/sc2code/ships/androsyn/androsyn.c (working copy) @@ -404,6 +404,9 @@ else { cur_status_flags &= ~(THRUST | WEAPON | SPECIAL); + /* keep the special "on" for the duration of blazer mode, a la SC1 */ + StarShipPtr->RaceDescPtr->ship_data.captain_control.special = + SetRelFrameIndex (StarShipPtr->RaceDescPtr->ship_data.captain_control.special, 2); /* protection against vux */ if (StarShipPtr->RaceDescPtr->characteristics.turn_wait > BLAZER_TURN_WAIT) @@ -416,9 +419,13 @@ if (StarShipPtr->RaceDescPtr->ship_info.energy_level == 0) { + /* turn special off */ + StarShipPtr->RaceDescPtr->ship_data.captain_control.special = + SetRelFrameIndex (StarShipPtr->RaceDescPtr->ship_data.captain_control.special, -2); ZeroVelocityComponents (&ElementPtr->velocity); cur_status_flags &= ~(LEFT | RIGHT | SHIP_AT_MAX_SPEED | SHIP_BEYOND_MAX_SPEED); + DrawCaptainsWindow(StarShipPtr); StarShipPtr->RaceDescPtr->characteristics.turn_wait = StarShipPtr->RaceDescPtr->characteristics.special_wait; Index: src/sc2code/ships/urquan/urquan.c =================================================================== --- src/sc2code/ships/urquan/urquan.c (revision 2914) +++ src/sc2code/ships/urquan/urquan.c (working copy) @@ -19,6 +19,9 @@ #include "ships/ship.h" #include "ships/urquan/resinst.h" +// to satisfy OBJECT_CLOAKED () +#include "colors.h" + #include "globdata.h" #include @@ -201,6 +204,7 @@ COUNT orig_facing, facing; SIZE delta_x, delta_y; ELEMENT *eptr; + HELEMENT hObject, hNextObject; Enroute = TRUE; @@ -242,14 +246,27 @@ if (ElementPtr->thrust_wait > 0) --ElementPtr->thrust_wait; - if (ElementPtr->hTarget) + // just for fun: instead of only shooting at the + // enemy ship, shoot at anything within range + for (hObject = GetTailElement (); hObject; hObject = hNextObject) { - LockElement (ElementPtr->hTarget, &eptr); + LockElement (hObject, &eptr); + hNextObject = GetPredElement (eptr); delta_x = eptr->current.location.x - ElementPtr->current.location.x; delta_y = eptr->current.location.y - ElementPtr->current.location.y; - UnlockElement (ElementPtr->hTarget); + UnlockElement (hObject); + + // the list of things not to shoot at + // includes: yourself, the mothership, other + // fighters, non-collidable objects and + // cloaked ships + if (eptr == ElementPtr || eptr == ElementPtr->pParent || + ElementPtr->pParent == eptr->pParent || + ! CollidingElement (eptr) || OBJECT_CLOAKED (eptr)) + continue; + delta_x = WRAP_DELTA_X (delta_x); delta_y = WRAP_DELTA_Y (delta_y); @@ -264,29 +281,39 @@ ANGLE_TO_FACING (ARCTAN (delta_x, delta_y)) ); ElementPtr->postprocess_func = fighter_postprocess; + break; } + } - if (Enroute) + if (ElementPtr->hTarget && Enroute) + { + LockElement (ElementPtr->hTarget, &eptr); + delta_x = eptr->current.location.x + - ElementPtr->current.location.x; + delta_y = eptr->current.location.y + - ElementPtr->current.location.y; + UnlockElement (ElementPtr->hTarget); + delta_x = WRAP_DELTA_X (delta_x); + delta_y = WRAP_DELTA_Y (delta_y); + + facing = GetFrameIndex (eptr->current.image.frame); + if (ElementPtr->turn_wait & LEFT) { - facing = GetFrameIndex (eptr->current.image.frame); - if (ElementPtr->turn_wait & LEFT) - { - delta_x += COSINE (FACING_TO_ANGLE (facing - 4), - DISPLAY_TO_WORLD (30)); - delta_y += SINE (FACING_TO_ANGLE (facing - 4), - DISPLAY_TO_WORLD (30)); - } - else - { - delta_x += COSINE (FACING_TO_ANGLE (facing + 4), - DISPLAY_TO_WORLD (30)); - delta_y += SINE (FACING_TO_ANGLE (facing + 4), - DISPLAY_TO_WORLD (30)); - } - facing = NORMALIZE_FACING ( - ANGLE_TO_FACING (ARCTAN (delta_x, delta_y)) - ); + delta_x += COSINE (FACING_TO_ANGLE (facing - 4), + DISPLAY_TO_WORLD (30)); + delta_y += SINE (FACING_TO_ANGLE (facing - 4), + DISPLAY_TO_WORLD (30)); } + else + { + delta_x += COSINE (FACING_TO_ANGLE (facing + 4), + DISPLAY_TO_WORLD (30)); + delta_y += SINE (FACING_TO_ANGLE (facing + 4), + DISPLAY_TO_WORLD (30)); + } + facing = NORMALIZE_FACING ( + ANGLE_TO_FACING (ARCTAN (delta_x, delta_y)) + ); } ElementPtr->state_flags |= CHANGING; Index: src/sc2code/planets/planets.c =================================================================== --- src/sc2code/planets/planets.c (revision 2914) +++ src/sc2code/planets/planets.c (working copy) @@ -26,10 +26,12 @@ #include "resinst.h" #include "nameref.h" +void init_coarse_scan (void); +void uninit_coarse_scan (void); +extern FRAME coarse_scan; extern int rotate_planet_task (void *data); - void DrawScannedObjects (BOOLEAN Reversed) { @@ -190,6 +192,8 @@ #endif UnlockMutex (GraphicsLock); + init_coarse_scan (); + if (!PLRPlaying ((MUSIC_REF)~0)) PlayMusic (LanderMusic, TRUE, 1); @@ -229,6 +233,7 @@ // FreeLanderData (); + uninit_coarse_scan (); DestroyStringTable (ReleaseStringTable (pSolarSysState->XlatRef)); pSolarSysState->XlatRef = 0; DestroyDrawable (ReleaseDrawable (pSolarSysState->TopoFrame)); Index: src/sc2code/planets/pl_stuff.c =================================================================== --- src/sc2code/planets/pl_stuff.c (revision 2914) +++ src/sc2code/planets/pl_stuff.c (working copy) @@ -60,6 +60,7 @@ CONTEXT OldContext; PLANET_ORBIT *Orbit = &pSolarSysState->Orbit; int base = GSCALE_IDENTITY; + extern FRAME coarse_scan; num_frames = 1; pFrame[0] = Orbit->PlanetFrameArray; @@ -107,6 +108,13 @@ } SetGraphicScale (old_scale); SetGraphicScaleMode (old_mode); + // If the player is scanning the planet, print the coarse scan. + if (pMenuState && pMenuState->InputFunc == DoScan) + { + s.origin.x = s.origin.y = 0; + s.frame = coarse_scan; + DrawStamp (&s); + } UnbatchGraphics (); SetContext (OldContext); } Index: src/sc2code/planets/plangen.c =================================================================== --- src/sc2code/planets/plangen.c (revision 2914) +++ src/sc2code/planets/plangen.c (working copy) @@ -1296,6 +1296,193 @@ DitherMap (DepthArray); } +/* CreateRingMask + * This creates the rings around gas giants. + * + * How it works: + * ------------- + * Two ellipses are drawn, an "inner" ellipse, which is transparent, and + * an "outer" ellipse, which is opaque. The "back" of the outer + * ellipse is also made transparent to simulate the planet obscuring + * its view. (i.e., if it's where the planet should be, and it's in + * the "upper" half of the ring, set to invisible) The ellipses are + * rotated according to the AxialTilt parameter for the planet, + * and the ring colours are variations on a base colour pulled from + * the planet's colourmap. + * + * Geometry For Dummies: + * --------------------- + * the equation for an ellipse is: + * + * x^2 y^2 + * --- + --- = 1 + * a^2 b^2 + * + * the equation for the rotation of a point (x,y) is: + * + * x' = x*cos(phi) - y*sin(phi) + * y' = x*sin(phi) + y*cos(phi) + * + * combining these gives the equation for a rotated ellipse: + * + * (x*cos(phi) - y*sin(phi))^2 (x*sin(phi) + y*cos(phi))^2 + * --------------------------- + --------------------------- = 1 + * a^2 b^2 + * + */ +#define RING_OUTER_SEMIMAJOR 64 +#define RING_OUTER_MAJOR ((RING_OUTER_SEMIMAJOR << 1) + 1) +#define RING_OUTER_SEMIMINOR 10 +#define RING_OUTER_SEMIMAJOR_2 (RING_OUTER_SEMIMAJOR * RING_OUTER_SEMIMAJOR) +#define RING_OUTER_SEMIMINOR_2 (RING_OUTER_SEMIMINOR * RING_OUTER_SEMIMINOR) + +#define RING_INNER_SEMIMAJOR (RADIUS + 6) +#define RING_INNER_SEMIMINOR (RING_OUTER_SEMIMINOR - 2) +#define RING_INNER_SEMIMAJOR_2 (RING_INNER_SEMIMAJOR * RING_INNER_SEMIMAJOR) +#define RING_INNER_SEMIMINOR_2 (RING_INNER_SEMIMINOR * RING_INNER_SEMIMINOR) +#define RING_INNER_OFF_X 0 +#define RING_INNER_OFF_Y -2 + +static FRAME +CreateRingMask (void) +{ + DWORD rad2, clear, *rgba, *p_rgba, p; + float is_outer, is_inner, phi, cphi, sphi; + UBYTE max, r, g, b; + int x, y, origin_y; + FRAME RingFrame; + BYTE *cbase; + + /* Use the first colour in planet's colourmp as the "base + * colour" for the rings (yes, the rings are monochromatic). + * According to strtab.txt, The RGB values in the colourmap + * are 6 bits wide; padding them to 8 bits makes them look + * too "bright", so they're only padded to 7 bits wide here. + */ + cbase = GetColorMapAddress (pSolarSysState->OrbitalCMap) + 2; + r = cbase[0] << 1; + g = cbase[1] << 1; + b = cbase[2] << 1; + + phi = pSolarSysState->SysInfo.PlanetInfo.AxialTilt * M_DEG2RAD; + cphi = cos(phi); + sphi = sin(phi); + RingFrame = CaptureDrawable ( + CreateDrawable (WANT_PIXMAP | WANT_ALPHA, + RING_OUTER_MAJOR, RING_OUTER_MAJOR, 1)); + rgba = pSolarSysState->Orbit.ScratchArray; + p_rgba = rgba; + + max = 0xFF; + clear = frame_mapRGBA (RingFrame, 0, 0, 0, 0); + + for (y = -RING_OUTER_SEMIMAJOR; y <= RING_OUTER_SEMIMAJOR; y++) + { + float o_ycphi, o_ysphi, i_ycphi, i_ysphi; + o_ycphi = y * cphi; + o_ysphi = y * sphi; + i_ycphi = (y - RING_INNER_OFF_Y) * cphi; + i_ysphi = (y - RING_INNER_OFF_Y) * sphi; + + for (x = -RING_OUTER_SEMIMAJOR; x <= RING_OUTER_SEMIMAJOR; x++) + { + float o_xcphi, o_xsphi, i_xcphi, i_xsphi; + o_xcphi = x * cphi; + o_xsphi = x * sphi; + i_xcphi = (x - RING_INNER_OFF_X) * cphi; + i_xsphi = (x - RING_INNER_OFF_X) * sphi; + + is_outer = (((o_xcphi - o_ysphi) * (o_xcphi - o_ysphi)) / + RING_OUTER_SEMIMAJOR_2) + + (((o_xsphi + o_ycphi) * (o_xsphi + o_ycphi)) / + RING_OUTER_SEMIMINOR_2); + is_inner = (((i_xcphi - i_ysphi) * (i_xcphi - i_ysphi)) / + RING_INNER_SEMIMAJOR_2) + + (((i_xsphi + i_ycphi) * (i_xsphi + i_ycphi)) / + RING_INNER_SEMIMINOR_2); + + origin_y = (int)(o_xsphi + o_ycphi); + rad2 = (x * x) + (y * y); + + if (is_inner < 1.0) + { + if ((origin_y < 0) && (rad2 <= RADIUS_2)) + p = clear; + else + { + if (is_inner < 0.9) + p = clear; + else + { + UBYTE r2, g2, b2, value; + float level; + level = (is_inner - 0.9) * 10; + r2 = (UBYTE) (r * level); + g2 = (UBYTE) (g * level); + b2 = (UBYTE) (b * level); + value = (UBYTE) (max * level); + /* alpha-channel blending only seems to work over the + * actual planet surface, any pixel drawn over the + * clipping frame gets "promoted" to full + * opacity. Whether bug or feature, for now it needs + * working around. + */ + if (rad2 > RADIUS_2) + p = frame_mapRGBA (RingFrame, r2, g2, b2, max); + else + p = frame_mapRGBA (RingFrame, r, g, b, value); + } + } + } + else if (is_outer < 1.0) + { + if ((origin_y < 0) && (rad2 <= RADIUS_2)) + p = clear; + else + { + UBYTE r2, g2, b2, value; + + if (is_outer < 0.9) + { + if ((int)(is_outer * 10) % 2) { + r2 = r * (1 - is_outer); + g2 = g * (1 - is_outer); + b2 = b * (1 - is_outer); + } + else { + r2 = r * is_outer; + g2 = g * is_outer; + b2 = b * is_outer; + } + p = frame_mapRGBA (RingFrame, r2, g2, b2, max); + } + else + { + float level; + level = (1 - ((is_outer - 0.9) * 10)); + r2 = (UBYTE) (r * level); + g2 = (UBYTE) (g * level); + b2 = (UBYTE) (b * level); + value = (UBYTE) (max * level); + if (rad2 > RADIUS_2) + p = frame_mapRGBA (RingFrame, r2, g2, b2, max); + else + p = frame_mapRGBA (RingFrame, r, g, b, value); + } + } + } + else + p = clear; + + *p_rgba++ = p; + } + } + process_rgb_bmp (RingFrame, rgba, RING_OUTER_MAJOR, RING_OUTER_MAJOR); + SetFrameHot (RingFrame, MAKE_HOT_SPOT (RING_OUTER_SEMIMAJOR + 1, RING_OUTER_SEMIMAJOR + 1)); + + return RingFrame; +} + static void ValidateMap (SBYTE *DepthArray) { @@ -1370,7 +1557,7 @@ * (MAP_HEIGHT * (MAP_WIDTH + SPHERE_SPAN_X))); // always allocate the scratch array to largest needed size Orbit->ScratchArray = HMalloc (sizeof (DWORD) - * (SHIELD_DIAM) * (SHIELD_DIAM)); + * (RING_OUTER_MAJOR) * (RING_OUTER_MAJOR)); } static unsigned @@ -1940,6 +2127,29 @@ pSolarSysState->XlatRef, 1); } pSolarSysState->XlatPtr = GetStringAddress (pSolarSysState->XlatRef); + + if (pSolarSysState->SysInfo.PlanetInfo.AtmoDensity == + GAS_GIANT_ATMOSPHERE) + { + /* Skip ringmask if the axial tilt is too small -- + * the idea is that you would be viewing the rings + * "end-on" and wouldn't see them + */ + if (abs (pSolarSysState->SysInfo.PlanetInfo.AxialTilt) > 5) + switch (pSolarSysState->pOrbitalDesc->data_index) + { + /* Also skip rings if the planet is a certain + * colour. These were arbitrarily chosen. + */ + case GRY_GAS_GIANT: + case CYA_GAS_GIANT: + case YEL_GAS_GIANT: + break; + default: + Orbit->ObjectFrame = CreateRingMask (); + } + } + RenderTopography (FALSE); } Index: src/sc2code/planets/lander.c =================================================================== --- src/sc2code/planets/lander.c (revision 2914) +++ src/sc2code/planets/lander.c (working copy) @@ -704,14 +704,14 @@ UnlockElement (hElement); break; } - else if (scan == BIOLOGICAL_SCAN - && (value = LONIBBLE (CreatureData[ - ElementPtr->mass_points - & ~CREATURE_AWARE - ].ValueAndHitPoints))) + else if (scan == BIOLOGICAL_SCAN) { + value = LONIBBLE (CreatureData[ + ElementPtr->mass_points + & ~CREATURE_AWARE + ].ValueAndHitPoints); /* Collision of a stun bolt with a viable creature */ - if (ElementPtr->hit_points) + if (value && ElementPtr->hit_points) { if (--ElementPtr->hit_points == 0) { @@ -748,8 +748,49 @@ NotPositional (), NULL, GAME_SOUND_PRIORITY); } - UnlockElement (hElement); - break; + /* Corner case: collision of a stun bolt with a + * moon bulldozer. Blow 'em up! Uses the same + * frames as the lander explosion */ + else + { + HELEMENT hExplosionElement; + + hExplosionElement = AllocElement (); + if (hExplosionElement) + { + ELEMENT *ExplosionElementPtr; + + LockElement (hExplosionElement, &ExplosionElementPtr); + + ExplosionElementPtr->mass_points = DEATH_EXPLOSION; + ExplosionElementPtr->state_flags = FINITE_LIFE | GOOD_GUY; + ExplosionElementPtr->next.location = + ElementPtr->next.location; + ExplosionElementPtr->preprocess_func = object_animation; + ExplosionElementPtr->turn_wait = MAKE_BYTE (1, 1); + ExplosionElementPtr->life_span = + EXPLOSION_LIFE + * (LONIBBLE (ExplosionElementPtr->turn_wait) + 1); + + SetPrimType (&DisplayArray[ExplosionElementPtr->PrimIndex], STAMP_PRIM); + DisplayArray[ExplosionElementPtr->PrimIndex].Object.Stamp.frame = + SetAbsFrameIndex ( + LanderFrame[0], 46 + ); + + UnlockElement (hExplosionElement); + InsertElement (hExplosionElement, GetHeadElement ()); + + PlaySound (SetAbsSoundIndex ( + LanderSounds, LANDER_HITS + ), NotPositional (), NULL, GAME_SOUND_PRIORITY + 1); + } + } + if (value) + { + UnlockElement (hElement); + break; + } } NumRetrieved = 0; Index: src/sc2code/planets/roster.c =================================================================== --- src/sc2code/planets/roster.c (revision 2914) +++ src/sc2code/planets/roster.c (working copy) @@ -110,6 +110,17 @@ StarShipPtr->race_id); TemplatePtr = LockFleetInfo (&GLOBAL (avail_race_q), hTemplate); + if (crew_delta > 0) + { + while (crew_delta && (StarShipPtr->crew_level + crew_delta) > + StarShipPtr->max_crew) + crew_delta--; + } + else if (crew_delta < 0) + { + while (crew_delta && (StarShipPtr->crew_level + crew_delta) < 1) + crew_delta++; + } StarShipPtr->crew_level += crew_delta; if (StarShipPtr->crew_level == 0) @@ -190,7 +201,7 @@ RECT r; STAMP s; SHIP_FRAGMENT *StarShipPtr; - BOOLEAN select, cancel, up, down, horiz; + BOOLEAN select, cancel, up, down, left, right; if (GLOBAL (CurrentActivity) & CHECK_ABORT) { @@ -206,8 +217,8 @@ cancel = PulsedInputState.menu[KEY_MENU_CANCEL]; up = PulsedInputState.menu[KEY_MENU_UP]; down = PulsedInputState.menu[KEY_MENU_DOWN]; - horiz = PulsedInputState.menu[KEY_MENU_LEFT] || - PulsedInputState.menu[KEY_MENU_RIGHT]; + left = PulsedInputState.menu[KEY_MENU_LEFT]; + right = PulsedInputState.menu[KEY_MENU_RIGHT]; if (pMS->Initialized && (pMS->CurState & SHIP_TOGGLE)) { @@ -263,20 +274,17 @@ { SIZE delta = 0; BOOLEAN failed = FALSE; - - if (up) + if (up || right) { - sy = -1; if (GLOBAL_SIS (CrewEnlisted)) - delta = 1; + delta = right ? 10 : 1; else failed = TRUE; } - else if (down) + else if (down || left) { - sy = 1; if (GLOBAL_SIS (CrewEnlisted) < GetCPodCapacity (NULL)) - delta = -1; + delta = left ? -10 : -1; else failed = TRUE; } @@ -298,7 +306,7 @@ NewState = pMS->CurState; sx = (SBYTE)((pMS->delta_item + 1) >> 1); - if (horiz) + if (left || right) { pship_pos = (POINT*)pMS->flash_frame1; if (NewState == (BYTE)(sx - 1)) Index: src/sc2code/planets/scan.c =================================================================== --- src/sc2code/planets/scan.c (revision 2914) +++ src/sc2code/planets/scan.c (working copy) @@ -17,6 +17,7 @@ */ #include "build.h" +#include "colors.h" #include "controls.h" #include "encount.h" #include "gamestr.h" @@ -35,6 +36,8 @@ #include "libs/inplib.h" #include "libs/mathlib.h" +CONTEXT coarse_scan_context; +FRAME coarse_scan; extern FRAME SpaceJunkFrame; @@ -100,15 +103,12 @@ PrintScanTitlePC (TEXT *t, RECT *r, const char *txt, int xpos) { t->baseline.x = xpos; - SetContextForeGroundColor ( - BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x15), 0x3B)); t->pStr = txt; t->CharCount = (COUNT)~0; - font_DrawText (t); + font_DrawTextWithStroke (t, + BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x15), 0x3B), BLACK_COLOR); TextRect (t, r, NULL); t->baseline.x += r->extent.width; - SetContextForeGroundColor ( - BUILD_COLOR (MAKE_RGB15 (0x0F, 0x00, 0x19), 0x3B)); } static void @@ -134,7 +134,6 @@ UNICODE buf[200]; LockMutex (GraphicsLock); - SetContext (SpaceContext); if (CurStarDescPtr->Index == SOL_DEFINED) { @@ -200,11 +199,9 @@ t.pStr = buf; t.CharCount = (COUNT)~0; - SetContextForeGroundColor ( - BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x15), 0x3B)); SetContextFont (MicroFont); - font_DrawText (&t); - + font_DrawTextWithStroke (&t, + BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x15), 0x3B), BLACK_COLOR); SetContextFont (TinyFont); UnlockMutex (GraphicsLock); @@ -224,7 +221,8 @@ GAME_STRING (ORBITSCAN_STRING_BASE + 1)); // " a.u." t.pStr = buf; t.CharCount = (COUNT)~0; - font_DrawText (&t); + font_DrawTextWithStroke (&t, + BUILD_COLOR (MAKE_RGB15 (0xF, 0x00, 0x19), 0x3B), BLACK_COLOR); t.baseline.y += SCAN_LEADING_PC; UnlockMutex (GraphicsLock); @@ -246,7 +244,8 @@ } t.pStr = buf; t.CharCount = (COUNT)~0; - font_DrawText (&t); + font_DrawTextWithStroke (&t, + BUILD_COLOR (MAKE_RGB15 (0xF, 0x00, 0x19), 0x3B), BLACK_COLOR); t.baseline.y += SCAN_LEADING_PC; UnlockMutex (GraphicsLock); @@ -257,7 +256,8 @@ pSolarSysState->SysInfo.PlanetInfo.SurfaceTemperature); t.pStr = buf; t.CharCount = (COUNT)~0; - font_DrawText (&t); + font_DrawTextWithStroke (&t, + BUILD_COLOR (MAKE_RGB15 (0xF, 0x00, 0x19), 0x3B), BLACK_COLOR); t.baseline.y += SCAN_LEADING_PC; UnlockMutex (GraphicsLock); @@ -274,7 +274,8 @@ t.pStr = buf; } t.CharCount = (COUNT)~0; - font_DrawText (&t); + font_DrawTextWithStroke (&t, + BUILD_COLOR (MAKE_RGB15 (0xF, 0x00, 0x19), 0x3B), BLACK_COLOR); t.baseline.y += SCAN_LEADING_PC; UnlockMutex (GraphicsLock); @@ -292,7 +293,8 @@ t.pStr = buf; } t.CharCount = (COUNT)~0; - font_DrawText (&t); + font_DrawTextWithStroke (&t, + BUILD_COLOR (MAKE_RGB15 (0xF, 0x00, 0x19), 0x3B), BLACK_COLOR); UnlockMutex (GraphicsLock); t.baseline.y = SCAN_BASELINE_Y_PC; @@ -310,7 +312,8 @@ GAME_STRING (ORBITSCAN_STRING_BASE + 12)); // " e.s." t.pStr = buf; t.CharCount = (COUNT)~0; - font_DrawText (&t); + font_DrawTextWithStroke (&t, + BUILD_COLOR (MAKE_RGB15 (0xF, 0x00, 0x19), 0x3B), BLACK_COLOR); t.baseline.y += SCAN_LEADING_PC; UnlockMutex (GraphicsLock); @@ -322,7 +325,8 @@ GAME_STRING (ORBITSCAN_STRING_BASE + 12)); // " e.s." t.pStr = buf; t.CharCount = (COUNT)~0; - font_DrawText (&t); + font_DrawTextWithStroke (&t, + BUILD_COLOR (MAKE_RGB15 (0xF, 0x00, 0x19), 0x3B), BLACK_COLOR); t.baseline.y += SCAN_LEADING_PC; UnlockMutex (GraphicsLock); @@ -336,7 +340,8 @@ GAME_STRING (ORBITSCAN_STRING_BASE + 15)); // " g." t.pStr = buf; t.CharCount = (COUNT)~0; - font_DrawText (&t); + font_DrawTextWithStroke (&t, + BUILD_COLOR (MAKE_RGB15 (0xF, 0x00, 0x19), 0x3B), BLACK_COLOR); t.baseline.y += SCAN_LEADING_PC; UnlockMutex (GraphicsLock); @@ -349,7 +354,8 @@ GAME_STRING (ORBITSCAN_STRING_BASE + 17)); // " days" t.pStr = buf; t.CharCount = (COUNT)~0; - font_DrawText (&t); + font_DrawTextWithStroke (&t, + BUILD_COLOR (MAKE_RGB15 (0xF, 0x00, 0x19), 0x3B), BLACK_COLOR); t.baseline.y += SCAN_LEADING_PC; UnlockMutex (GraphicsLock); @@ -362,7 +368,8 @@ t.pStr = buf; sprintf (buf, "%d" STR_DEGREE_SIGN, val); t.CharCount = (COUNT)~0; - font_DrawText (&t); + font_DrawTextWithStroke (&t, + BUILD_COLOR (MAKE_RGB15 (0xF, 0x00, 0x19), 0x3B), BLACK_COLOR); UnlockMutex (GraphicsLock); } @@ -376,7 +383,6 @@ UNICODE buf[200]; LockMutex (GraphicsLock); - SetContext (SpaceContext); if (CurStarDescPtr->Index == SOL_DEFINED) { @@ -441,10 +447,9 @@ t.pStr = buf; t.CharCount = (COUNT)~0; - SetContextForeGroundColor ( - BUILD_COLOR (MAKE_RGB15 (0x0F, 0x00, 0x19), 0x3B)); SetContextFont (MicroFont); - font_DrawText (&t); + font_DrawTextWithStroke (&t, + BUILD_COLOR (MAKE_RGB15 (0xF, 0x00, 0x19), 0x3B), BLACK_COLOR); s.origin.x = s.origin.y = 0; s.origin.x = 16 - SAFE_X; @@ -467,7 +472,8 @@ + (EARTH_RADIUS >> 1)) / EARTH_RADIUS); MakeScanValue (buf, val, STR_EARTH_SIGN); t.CharCount = (COUNT)~0; - font_DrawText (&t); + font_DrawTextWithStroke (&t, + BUILD_COLOR (MAKE_RGB15 (0xF, 0x00, 0x19), 0x3B), BLACK_COLOR); t.baseline.y += SCAN_LEADING; UnlockMutex (GraphicsLock); @@ -482,7 +488,8 @@ MakeScanValue (buf, val, STR_EARTH_SIGN); } t.CharCount = (COUNT)~0; - font_DrawText (&t); + font_DrawTextWithStroke (&t, + BUILD_COLOR (MAKE_RGB15 (0xF, 0x00, 0x19), 0x3B), BLACK_COLOR); t.baseline.y += SCAN_LEADING; UnlockMutex (GraphicsLock); @@ -491,7 +498,8 @@ sprintf (buf, "%d" STR_DEGREE_SIGN, pSolarSysState->SysInfo.PlanetInfo.SurfaceTemperature); t.CharCount = (COUNT)~0; - font_DrawText (&t); + font_DrawTextWithStroke (&t, + BUILD_COLOR (MAKE_RGB15 (0xF, 0x00, 0x19), 0x3B), BLACK_COLOR); t.baseline.y += SCAN_LEADING; UnlockMutex (GraphicsLock); @@ -500,7 +508,8 @@ sprintf (buf, "<%u>", pSolarSysState->SysInfo.PlanetInfo.AtmoDensity == 0 ? 0 : (pSolarSysState->SysInfo.PlanetInfo.Weather + 1)); t.CharCount = (COUNT)~0; - font_DrawText (&t); + font_DrawTextWithStroke (&t, + BUILD_COLOR (MAKE_RGB15 (0xF, 0x00, 0x19), 0x3B), BLACK_COLOR); t.baseline.y += SCAN_LEADING; UnlockMutex (GraphicsLock); @@ -512,7 +521,8 @@ ) == GAS_GIANT ? 0 : (pSolarSysState->SysInfo.PlanetInfo.Tectonics + 1)); t.CharCount = (COUNT)~0; - font_DrawText (&t); + font_DrawTextWithStroke (&t, + BUILD_COLOR (MAKE_RGB15 (0xF, 0x00, 0x19), 0x3B), BLACK_COLOR); UnlockMutex (GraphicsLock); t.baseline.x = RIGHT_SIDE_BASELINE_X; @@ -529,7 +539,8 @@ val = 1; MakeScanValue (buf, val, STR_EARTH_SIGN); t.CharCount = (COUNT)~0; - font_DrawText (&t); + font_DrawTextWithStroke (&t, + BUILD_COLOR (MAKE_RGB15 (0xF, 0x00, 0x19), 0x3B), BLACK_COLOR); t.baseline.y += SCAN_LEADING; UnlockMutex (GraphicsLock); @@ -539,7 +550,8 @@ MakeScanValue (buf, val, STR_EARTH_SIGN); t.CharCount = (COUNT)~0; - font_DrawText (&t); + font_DrawTextWithStroke (&t, + BUILD_COLOR (MAKE_RGB15 (0xF, 0x00, 0x19), 0x3B), BLACK_COLOR); t.baseline.y += SCAN_LEADING; UnlockMutex (GraphicsLock); @@ -550,7 +562,8 @@ val = 1; MakeScanValue (buf, val, STR_EARTH_SIGN); t.CharCount = (COUNT)~0; - font_DrawText (&t); + font_DrawTextWithStroke (&t, + BUILD_COLOR (MAKE_RGB15 (0xF, 0x00, 0x19), 0x3B), BLACK_COLOR); t.baseline.y += SCAN_LEADING; UnlockMutex (GraphicsLock); @@ -561,7 +574,8 @@ val = -val; sprintf (buf, "%d" STR_DEGREE_SIGN, val); t.CharCount = (COUNT)~0; - font_DrawText (&t); + font_DrawTextWithStroke (&t, + BUILD_COLOR (MAKE_RGB15 (0xF, 0x00, 0x19), 0x3B), BLACK_COLOR); t.baseline.y += SCAN_LEADING; UnlockMutex (GraphicsLock); @@ -571,7 +585,8 @@ * 10 / 24; MakeScanValue (buf, val, STR_EARTH_SIGN); t.CharCount = (COUNT)~0; - font_DrawText (&t); + font_DrawTextWithStroke (&t, + BUILD_COLOR (MAKE_RGB15 (0xF, 0x00, 0x19), 0x3B), BLACK_COLOR); UnlockMutex (GraphicsLock); } @@ -663,7 +678,7 @@ return(0); } -static BOOLEAN DoScan (MENU_STATE *pMS); +BOOLEAN DoScan (MENU_STATE *pMS); static BOOLEAN PickPlanetSide (MENU_STATE *pMS) @@ -793,11 +808,6 @@ SaveFlagshipState (); return (FALSE); } - - if (optWhichCoarseScan == OPT_PC) - PrintCoarseScanPC (); - else - PrintCoarseScan3DO (); } DrawMenuStateStrings (PM_MIN_SCAN, DISPATCH_SHUTTLE); @@ -945,7 +955,7 @@ SetContextForeGroundColor (OldColor); } -static BOOLEAN +BOOLEAN DoScan (MENU_STATE *pMS) { DWORD TimeIn, WaitTime; @@ -1248,11 +1258,6 @@ DrawMenuStateStrings (PM_MIN_SCAN, MenuState.CurState); - if (optWhichCoarseScan == OPT_PC) - PrintCoarseScanPC (); - else - PrintCoarseScan3DO (); - pMenuState = &MenuState; SetMenuSounds (MENU_SOUND_ARROWS, MENU_SOUND_SELECT); DoInput (&MenuState, FALSE); @@ -1415,4 +1420,32 @@ } } +void +init_coarse_scan (void) +{ + COLOR bg; + coarse_scan_context = CreateContext (); + coarse_scan = CaptureDrawable ( + CreateDrawable (WANT_PIXMAP, SIS_SCREEN_WIDTH, + SIS_SCREEN_HEIGHT, 1)); + SetContext (coarse_scan_context); + SetContextFGFrame (coarse_scan); + bg = BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x10), 0x00); + // Color key for the background. + SetContextBackGroundColor (bg); + ClearDrawable (); + SetFrameTransparentColor (coarse_scan, bg); + + if (optWhichCoarseScan == OPT_PC) + PrintCoarseScanPC (); + else + PrintCoarseScan3DO (); +} + +void +uninit_coarse_scan (void) +{ + DestroyContext (coarse_scan_context); + DestroyDrawable (ReleaseDrawable (coarse_scan)); +} Index: src/sc2code/planets/scan.h =================================================================== --- src/sc2code/planets/scan.h (revision 2914) +++ src/sc2code/planets/scan.h (working copy) @@ -20,8 +20,8 @@ #define _SCAN_H #include "libs/gfxlib.h" +#include "menustat.h" - typedef struct { POINT start; @@ -44,6 +44,7 @@ extern void RepairBackRect (RECT *pRect); extern void GeneratePlanetSide (void); +extern BOOLEAN DoScan (MENU_STATE *pMS); #endif /* _SCAN_H */ Index: src/uqmversion.h =================================================================== --- src/uqmversion.h (revision 2914) +++ src/uqmversion.h (working copy) @@ -23,7 +23,7 @@ #define UQM_MINOR_VERSION_S "6" #define UQM_PATCH_VERSION 4 #define UQM_PATCH_VERSION_S "4" -#define UQM_EXTRA_VERSION "" +#define UQM_EXTRA_VERSION "-nic" /* The final version is interpreted as: * printf ("%d.%d.%d%s", UQM_MAJOR_VERSION, UQM_MINOR_VERSION, * UQM_PATCH_VERSION, UQM_EXTRA_VERSION); Index: src/options.c =================================================================== --- src/options.c (revision 2914) +++ src/options.c (working copy) @@ -37,6 +37,10 @@ #include #include +#ifdef __APPLE__ +/* for dirname() */ +#include +#endif int optWhichCoarseScan; int optWhichMenu; @@ -118,10 +122,13 @@ } void -prepareContentDir (const char *contentDirName) +prepareContentDir (const char *contentDirName, const char *program_path) { const char *testFile = "version"; const char *loc; +#ifdef __APPLE__ + char *appleContentDirName = NULL; +#endif if (contentDirName == NULL) { @@ -133,6 +140,19 @@ "../../content" /* For running from MSVC */ }; loc = findFileInDirs (locs, sizeof locs / sizeof locs[0], testFile); +#ifdef __APPLE__ + /* on OSX, if the content can't be found in any of + * the static locations, attempt to look inside the + * application bundle */ + if (loc == NULL) + { + appleContentDirName = (char *) calloc (PATH_MAX, sizeof(char)); + snprintf (appleContentDirName, PATH_MAX, + "%s/../Resources/content", dirname (program_path)); + loc = findFileInDirs ((const char **) &appleContentDirName, 1, + testFile); + } +#endif } else { @@ -155,6 +175,13 @@ log_add (log_Debug, "Using '%s' as base content dir.", baseContentPath); mountContentDir (repository, baseContentPath); +#ifdef __APPLE__ + if (appleContentDirName != NULL) + { + free(appleContentDirName); + appleContentDirName = NULL; + } +#endif } void Index: src/starcon2.c =================================================================== --- src/starcon2.c (revision 2914) +++ src/starcon2.c (working copy) @@ -432,7 +432,7 @@ speechVolumeScale = options.speechVolumeScale; optAddons = options.addons; - prepareContentDir (options.contentDir); + prepareContentDir (options.contentDir, argv[0]); prepareMeleeDir (); prepareSaveDir (); #if 0 Index: build/unix/build.config =================================================================== --- build/unix/build.config (revision 2914) +++ build/unix/build.config (working copy) @@ -481,11 +481,11 @@ cp -r "$FRAMEWORK" "$INSTROOT/Frameworks" done - # Install game content (it should probably make a zipfile) + # Install game content echo "Creating base content package..." >&2 cp content/version "$INSTROOT/Resources/content/" (cd content && \ - find . \( -name CVS -o -name packages -o -name .svn \) -prune \ + find . \( -name CVS -o -name .svn -o -name packages -o -name addons \) -prune \ -o \! \( -type d -o -name \*.ogg \) -print | \ $SED 's/^..//' | zip -@ uqm-${VERSION}-prv-content.uqm) mv content/uqm-$VERSION-prv-content.uqm "$INSTROOT/Resources/content/packages" @@ -496,10 +496,10 @@ | $SED 's/^..//' | zip -0 -@ uqm-${VERSION}-prv-voice.uqm) mv content/uqm-$VERSION-prv-voice.uqm "$INSTROOT/Resources/content/packages" - echo "Creating 3do music content package..." >&2 + echo "Creating 3do music content addon package..." >&2 (cd content && \ - find . -name \*.ogg -a \! -name \*\[0-9\]\[0-9\]\[0-9\].ogg \ - -print | $SED 's/^..//' | zip -0 -@ uqm-${VERSION}-prv-3domusic.uqm) + find addons/3domusic -name .svn -prune -o -type f -print | \ + zip -0 -@ uqm-${VERSION}-prv-3domusic.uqm) mv content/uqm-$VERSION-prv-3domusic.uqm "$INSTROOT/Resources/content/packages" # Install game binary (and rename it)