Skip to content

Commit

Permalink
2007-05-05 Krzysztof Kosciuszkiewicz <[email protected]>
Browse files Browse the repository at this point in the history
	* V161
	* news_sup.c (NMod): Partial fix for uninitialized vars.
	* sdl.c (av_sync): Removed warning code.
  • Loading branch information
drvee committed May 5, 2007
1 parent f555ae3 commit 8482574
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 15 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2007-05-05 Krzysztof Kosciuszkiewicz <[email protected]>

* V161

* news_sup.c (NMod): Partial fix for uninitialized vars.

* sdl.c (av_sync): Removed warning code.

2007-05-05 Krzysztof Kosciuszkiewicz <[email protected]>

* V160
Expand Down
4 changes: 2 additions & 2 deletions data.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,9 @@ struct BuzzData { // master data list for Buzz Aldrin's
char FuturePlans; // Special future mission
char DurLevel; // Current Duration Level
char LMpts; // Accumulation of any LM Test points
#if 0
#if 0
Equipment Hardware[4][7];
#else
#else
Equipment Probe[7]; // 0 = Orbital
// 1 = Inter Planetary
// 2 = Lunar Probe
Expand Down
6 changes: 4 additions & 2 deletions news_sup.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,15 @@ int NMod(int p,int prog,int type,int per) // type= 1:postive -1:negative search

lo=(prog>0) ? (prog-1)*7 : 0; hi=(prog>0) ? lo+7 : 28;
if (prog==1) hi=lo+3;
for (i=0;i<25;i++)
/* drvee: this loop was going to 25, not 28 */
for (i=0;i<(int)ARRAY_LENGTH(Eptr);i++)
{
/* XXX: Mismatch between data.h(250) and this code here */
Eptr[i]=(Equipment *) &Data->P[p].Probe[i];
save[i]= ((Eptr[i]->Safety+per*type)<=(Eptr[i]->MaxSafety)&& Eptr[i]->Num>=0) ? Eptr[i]->Safety+per*type : 0;
if (Eptr[i]->Num<0) save[i]=0;
};
for(i=0;i<28;i++) if (save[i]<0) save[i]=0;
for(i=0;i<(int)ARRAY_LENGTH(save);i++) if (save[i]<0) save[i]=0;
save[11]=save[25]=save[26]=save[27]=save[12]=save[13]=save[3]=save[4]=save[5]=save[6]=0;
for (i=lo;i<hi;i++) if (save[i]>0) j++; // Check if event is good.
if (j==0) return 0;
Expand Down
2 changes: 1 addition & 1 deletion os_win32/Makefile.os
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CFLAGS += -O2 -DNDEBUG
#CFLAGS += -g
# CFLAGS += -g

DOCFILES = $(addsuffix .txt,AUTHORS COPYING README DEVELOPER)

Expand Down
10 changes: 1 addition & 9 deletions sdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -688,20 +688,12 @@ av_sync(void)
}
if (news_rect.h && news_rect.w)
{
static int warned = 0;
av_need_update(&news_rect);
r.h = 2 * news_rect.h;
r.w = 2 * news_rect.w;
r.x = 2 * news_rect.x;
r.y = 2 * news_rect.y;
if (!SDL_DisplayYUVOverlay(news_overlay, &r))
{
if (!warned)
{
warned = 1;
printf("Err: %s\n", SDL_GetError());
}
}
SDL_DisplayYUVOverlay(news_overlay, &r);
}
num_rect = get_dirty_rect_list();
SDL_UpdateRects(display, num_rect, dirty_rect_list);
Expand Down
2 changes: 1 addition & 1 deletion version.c
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
160
161

0 comments on commit 8482574

Please sign in to comment.