Skip to content

Commit

Permalink
Update source to beta3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
NuVanDibe committed Apr 6, 2022
1 parent 323be6d commit 6db5125
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 12 deletions.
4 changes: 2 additions & 2 deletions jpe.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ def getkey(salt):
if pad:
contents += long2chrl(SystemRandom(0).getrandbits(pad*8), pad)
fd.write(pack("<i", size))
'''salt = SystemRandom(0).getrandbits(128)'''
salt = 0xfedcba9876543210fedcba9876543210
salt = SystemRandom(0).getrandbits(128)
'''salt = 0xfedcba9876543210fedcba9876543210'''
fd.write(long2chrl(salt, 16))
key = getkey(salt)
size += pad
Expand Down
2 changes: 2 additions & 0 deletions shell2/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,8 @@ void setup_screen(void)

if(MessageTxt->backdrop)
listview_set_attribute(MessageList, WATR_BACKDROP, MessageTxt->backdrop);
listview_set_attribute(MessageList, WATR_COLOR+0, &(MessageTxt->textcolor[0]));
listview_set_attribute(MessageList, WATR_COLOR+3, &(MessageTxt->textcolor[3]));
}

count = IconSet->height / IconHeight;
Expand Down
Binary file modified shell2/pogo_visoly_xg1.elf
Binary file not shown.
Binary file modified shell2/pogo_visoly_xg1.gba
Binary file not shown.
Binary file modified shell2/pogo_xrom.elf
Binary file not shown.
Binary file modified shell2/pogo_xrom.gba
Binary file not shown.
Binary file modified shell2/visoly_xg1_obj/main.o
Binary file not shown.
4 changes: 1 addition & 3 deletions shell2/widgets/listview.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ int listview_render(ListView *lv, Rect *r, BitMap *bm)
void listview_set_attribute(ListView *lv, int attr, void *val)
{
Color c;
int i;
int n = attr & 0xf;
uint32 l;

Expand All @@ -203,7 +204,6 @@ void listview_set_attribute(ListView *lv, int attr, void *val)
lv->colwidth[n] = (int)val;
lv->w.flags = WFLG_REDRAW;
break;

case WATR_RGB:
l = (int)val;
c.r = (l>>16) & 0xff;
Expand Down Expand Up @@ -302,8 +302,6 @@ ListView *listview_new(int columns, int maxlines, Font *font)

lv->iconw = 0;

lv->w.flags = WFLG_REDRAW;

lv->icons = malloc(sizeof(BitMap *) * maxlines);
memset(lv->icons, 0, sizeof(BitMap *) * maxlines);

Expand Down
Binary file modified shell2/widgets/listview.o
Binary file not shown.
14 changes: 8 additions & 6 deletions shell2/widgets/textflow.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ int textflow_render(TextFlow *tb, Rect *r, BitMap *bm)
else
bitmap_fillbox(bm, r, 0x6318);

font_setcolor(TO_RGB16(tb->textcolor), 0x0000);
font_setcolor(TO_RGB16(tb->textcolor[0]), 0x0000);

for(i=0; i<tb->numlines; i++)
{
Expand Down Expand Up @@ -51,6 +51,7 @@ int calc_lengths(TextFlow *tf)
void textflow_set_attribute(TextFlow *tb, int attr, void *val)
{
int l;
int n = attr&0xf;
char *p;
switch(attr & 0xFF0)
{
Expand All @@ -59,14 +60,14 @@ void textflow_set_attribute(TextFlow *tb, int attr, void *val)
tb->w.flags |= WFLG_REDRAW;
break;
case WATR_COLOR:
tb->textcolor = *((Color *)val);
tb->textcolor[n] = *((Color *)val);
tb->w.flags |= WFLG_REDRAW;
break;
case WATR_RGB:
l = (int)val;
tb->textcolor.r = l>>16;
tb->textcolor.g = (l>>8) & 0xff;
tb->textcolor.b = l & 0xff;
tb->textcolor[n].r = l>>16;
tb->textcolor[n].g = (l>>8) & 0xff;
tb->textcolor[n].b = l & 0xff;
tb->w.flags |= WFLG_REDRAW;
break;
case WATR_TEXT:
Expand Down Expand Up @@ -123,7 +124,8 @@ TextFlow *textflow_new(Font *font, int texlen)
tb->w.type = WIDGET_TEXTFLOW;
tb->w.height = font->height+2;
tb->w.width = 0;
tb->textcolor = Black_Color;
tb->textcolor[0] = Black_Color;
tb->textcolor[3] = Blue_Color;
tb->w.flags = WFLG_REDRAW;
tb->backdrop = NULL;
tb->text = malloc(texlen);
Expand Down
2 changes: 1 addition & 1 deletion shell2/widgets/textflow.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ typedef struct
uint16 textlength[20];
uint16 numlines;
Font *font;
Color textcolor;
Color textcolor[4];

} TextFlow;

Expand Down
Binary file modified shell2/widgets/textflow.o
Binary file not shown.
1 change: 1 addition & 0 deletions shell2/window.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ static Screen *currentScreen;
WidgetRenderFunc render_functions[8];

Color Black_Color = {0,0,0,0};
Color Blue_Color = {0,0,0xFF,0};
Color White_Color = {0xFF,0xFF,0xFF,0};
Color Gray_Color = {0x80,0x80,0x80,0};

Expand Down
1 change: 1 addition & 0 deletions shell2/window.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#define TO_RGB16(c) ( ((c.b << 7) & 0x7C00) | ((c.g << 2) & 0x03E0) | (c.r >> 3) )

extern Color Black_Color;
extern Color Blue_Color;
extern Color White_Color;
extern Color Gray_Color;

Expand Down
Binary file modified shell2/window.o
Binary file not shown.
Binary file modified shell2/xrom_obj/main.o
Binary file not shown.

0 comments on commit 6db5125

Please sign in to comment.