Skip to content

Commit

Permalink
Version 1.2-V-2021-01-06T23:17:24
Browse files Browse the repository at this point in the history
  • Loading branch information
LM committed Jan 6, 2021
1 parent 7c126a7 commit 9f65422
Show file tree
Hide file tree
Showing 18 changed files with 1,130 additions and 902 deletions.
4 changes: 2 additions & 2 deletions Store/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ install:
@cp $(OutPath)/homebrew.self /hostapp/homebrew.self
@echo "Installed!"
oelf:
orbis-elf-create bin/homebrew.elf bin/homebrew.oelf
orbis-elf-create bin/homebrew.elf bin/homebrew.oelf >/dev/null 2>&1


AUTH_INFO = 000000000000000000000000001C004000FF000000000080000000000000000000000000000000000000008000400040000000000000008000000000000000080040FFFF000000F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

eboot:
python2 $(ORBISDEV)/bin/make_fself.py --auth-info $(AUTH_INFO) bin/homebrew.oelf bin/homebrew.self
pkg_build:
cp bin/homebrew.self pkg/eboot.bin && cd pkg && pkgTool pkg_build Project.gp4 . && cp *.pkg ../bin/
cp bin/homebrew.self pkg/eboot.bin && cd pkg && pkgTool pkg_build Project.gp4 . && cp *.pkg ../bin/
6 changes: 2 additions & 4 deletions Store/include/Header.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ int jb();
#define DKS_TIMEOUT 0x804101E2


#define klog printf

#define TRUE 1
#define FALSE 0

Expand Down Expand Up @@ -148,7 +146,7 @@ void logshit(char* format, ...);


#define VERSION_MAJOR 1
#define VERSION_MINOR 4
#define VERSION_MINOR 2

#define BUILD_YEAR_CH0 (__DATE__[ 7])
#define BUILD_YEAR_CH1 (__DATE__[ 8])
Expand Down Expand Up @@ -245,4 +243,4 @@ void logshit(char* format, ...);

#define VERSION_MINOR_INIT \
(VERSION_MINOR + '0')
#endif
#endif
14 changes: 7 additions & 7 deletions Store/include/KeyboardDialog.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

char* StoreKeyboard();
#pragma once

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

char *StoreKeyboard(const char *Title, char *initialTextBuffer);
14 changes: 9 additions & 5 deletions Store/include/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,11 @@ enum views
ON_LEFT_PANEL,
ON_MAIN_SCREEN, // 0
ON_SUBMENU, // 1 - Queue
ON_SUBMENU3, // Ready
ON_SUBMENU_2, // 2 - Groups
ON_ITEM_PAGE, // 3 - aux/temp
ON_EXTRA_PAGE // 4 - pixelshader
ON_SUBMENU3, // 2 - Ready to install
ON_SUBMENU_2, // 3 - Groups
ON_ITEM_PAGE, // 4 - aux/temp
ON_EXTRA_PAGE, // 5 - pixelshader
ON_SETTINGS // 6
};


Expand Down Expand Up @@ -236,6 +237,7 @@ void pixelshader_init( int width, int height );
void pixelshader_fini( void );

void ORBIS_RenderSubMenu(int num);
void GLES2_render_submenu_text_v2( vertex_buffer_t *vbo, vec3 *offset );

void GLES2_init_submenu( void );
void GLES2_render_submenu_text( int num );
Expand Down Expand Up @@ -305,8 +307,10 @@ void destroy_item_t(item_idx_t **p);
int df(char *out, const char *mountPoint);

int get_item_index(layout_t *l);
// from GLES2_scene_v2.c
layout_t * GLES2_layout_init(int req_item_count);

/// pthreads
/// pthreads used in GLES2_q.c

typedef enum pt_status
{
Expand Down
51 changes: 40 additions & 11 deletions Store/include/utils.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#pragma once


#include "defines.h"


#include <MsgDialog.h>
#include <ImeDialog.h>
#include <CommonDialog.h>
#include <KeyboardDialog.h>
#include <pl_ini.h>

#define DIM(x) (sizeof(x)/sizeof(*(x)))

Expand All @@ -16,16 +16,43 @@
#define WARNING 3
#define STORE_LOG "/user/app/NPXS39041/logs/log.txt"

static const char *option_panel_text[] =
{
"Content Delivery Network",
"Temporary Path",
"Detected USB",
"INI Path",
"Custom FreeType font Path",
// following doesn't store strings for any Paths...
"Store Downloads on USB",
"Save Settings"
};

enum STR_type
{
CDN_URL,
TMP_PATH,
USB_PATH,
INI_PATH,
FNT_PATH,
NUM_OF_STRINGS
};

// indexed options
typedef struct
{
char* StoreCDN;
char* temppath;
int StoreOnUSB;
char* USBPath;
char* INIPath;
char *opt[ NUM_OF_STRINGS ];
int StoreOnUSB;
// more options
} StoreOptions;

char *usbpath(void);
int LoadOptions(StoreOptions *set);
int SaveOptions(StoreOptions *set);

// sysctl
uint32_t SysctlByName_get_sdk_version(void);

char *checkedsize;
char *calculateSize(uint64_t size);

Expand All @@ -36,9 +63,11 @@ int loadmsg(char* format, ...);
void klog(const char *format, ...);
void CalcAppsize(char *path);
char* cutoff(const char* str, int from, int to);
uint32_t SysctlByName_get_sdk_version(void);
char* usbpath(void);
void SaveOptions(StoreOptions* set);

int getjson(int Pagenumb, char* cdn);
int LoadOptions(StoreOptions* set);
int MD5_hash_compare(const char* file1, const char* hash);
int MD5_hash_compare(const char* file1, const char* hash);



#define assert(expr) if (!(expr)) msgok(FATAL, "Assetion Failed!");

41 changes: 14 additions & 27 deletions Store/source/GLES2_ani.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
#include <stdio.h>
#include <string.h>

/*clang *.c -I$PS4SDK/include/MiniAPI -L/Archive/PS4-work/OrbisLink/samples/pc_es2template/source -lMiniAPI -L/Archive/PS4-work/OrbisLink/samples/pc_es2template/source -lm -lGL -lEGL -lX11 -D_MAPI_ -I$PS4SDK/include/freetype2 -lfreetype -png -ggdb*/

#include "defines.h"

#include "ani.h"
Expand All @@ -29,9 +27,9 @@ extern int selected_icon; // from main.c
// shader and locations
static GLuint program = 0; // default program
static GLuint shader_fx = 0; // text_ani.[vf]
static mat4 model, view, projection;
static float g_Time = 0.f;
static GLuint meta_Slot = 0;
static mat4 model, view, projection;
// ---------------------------------------------------------------- reshape ---
static void reshape(int width, int height)
{
Expand All @@ -40,35 +38,29 @@ static void reshape(int width, int height)
}

// ---------------------------------------------------------- animation ---

static fx_entry_t *ani; // the fx info

static vertex_buffer_t *line_buffer,
*text_buffer,
*vbo = NULL;

// bool flag
static int ani_is_running = 0;
// callback when done looping all status
// callback when done looping all effect status
static void ani_post_cb(void)
{
printf("%s()\n", __FUNCTION__);
O_action_dispatch();
}

// ---------------------------------------------------------------- display ---
static void render_ani( int text_num, int type_num )
{
// we already clean in main renderloop()!

//type_num = 1; // which fx_entry_t test
// we already clean in main render loop!

fx_entry_t *ani = &fx_entry[0];
//* fx = &fx_entry[0];
// int t_n = ani - fx;

program = shader_fx;

if(ani->t_now >= ani->t_life) // looping ani_state
if(ani->t_now >= ani->t_life) // looping animation status
{
switch(ani->status) // setup for next fx
{
Expand All @@ -79,10 +71,9 @@ static void render_ani( int text_num, int type_num )
/* CLOSED reached: looped once all status */ ani_is_running = 0 ;
ani_post_cb(); break;
}
ani->fcount = 0; // reset framecount
ani->t_now = 0.f;
ani->fcount = 0; // reset framecount (useless)
ani->t_now = 0.f; // yes, it's using time
}

/*
printf("program: %d [%d] fx state: %.1f, frame: %3d/%3.f %.3f\r",
program, t_n,
Expand All @@ -109,19 +100,17 @@ static void render_ani( int text_num, int type_num )
type_num /10.);
if(1) /* draw whole VBO (storing all added texts) */
{
/* draw whole VBO item arrays */
vertex_buffer_render( line_buffer, GL_LINES );
vertex_buffer_render( vbo, GL_TRIANGLES );
}
}
glDisable( GL_BLEND );

ani->fcount += 1; // increase frame counter
ani->fcount += 1; // increase frame counter (useless)

// we already swapframe in main renderloop()!
// we already swap frame in main render loop!
}


/* wrapper from main */
void GLES2_ani_test( fx_entry_t *_ani )
{
Expand All @@ -137,8 +126,6 @@ void GLES2_ani_test( fx_entry_t *_ani )
}
}



// --------------------------------------------------------- custom shaders ---
static GLuint CreateProgram( void )
{
Expand All @@ -150,8 +137,8 @@ static GLuint CreateProgram( void )
/* use embedded glsl source */
#include "ani_vert.h"
#include "ani_frag.h"
const GLchar *vShader = &ani_vert[0];
const GLchar *fShader = &ani_frag[0];
GLchar *vShader = &ani_vert[0];
GLchar *fShader = &ani_frag[0];
#endif
GLuint programID = BuildProgram(vShader, fShader); // shader_common.c

Expand All @@ -175,7 +162,6 @@ void GLES2_ani_init(int width, int height)
line_buffer = vertex_buffer_new( "vertex:3f,color:4f" );

#if 0 // rects

vec2 pen = { .5, .5 };
for (int i = 0; i < 10; ++i)
{
Expand Down Expand Up @@ -311,6 +297,8 @@ for (int i = 0; i < 10; ++i)

void GLES2_ani_update(double now)
{
if(ani_is_running == 0) return;

ani->t_now += now - g_Time;
g_Time = now;
}
Expand Down Expand Up @@ -351,10 +339,9 @@ void ani_notify(const char *message)
}
}

// draw one loop
// draw one effect loop
void GLES2_ani_draw(void)
{
if(vbo && ani_is_running) render_ani(1, 0);
//printf("%f %d\n", ani->t_now, ani->status);
}

Loading

0 comments on commit 9f65422

Please sign in to comment.