jiboync begining s & some work on bootsplash
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
|
||||||
|
######################################
|
||||||
|
# Quick Sync Tool for the jibo robot #
|
||||||
|
######################################
|
||||||
|
|
||||||
|
|
||||||
|
# For ftp -> ftpd server required
|
||||||
|
|
||||||
|
ROBOT_IP = 0.0.0.0
|
||||||
|
PROTOCOL = "ftp"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
#include <SDL2/SDL_image.h>
|
#include <SDL2/SDL_image.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
void show_boot_splash(SDL_Renderer* renderer, SDL_Texture* texture);
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
@@ -77,9 +78,11 @@ int main(int argc, char *argv[])
|
|||||||
SDL_SetRenderDrawColor(renderer, 0,0,0,255);
|
SDL_SetRenderDrawColor(renderer, 0,0,0,255);
|
||||||
SDL_RenderClear(renderer);
|
SDL_RenderClear(renderer);
|
||||||
|
|
||||||
SDL_RenderCopy(renderer,BootSplash_Texture,NULL,NULL);
|
show_boot_splash(renderer, BootSplash_Texture);
|
||||||
SDL_RenderPresent(renderer);
|
SDL_RenderPresent(renderer);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -99,3 +102,22 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void show_boot_splash( SDL_Renderer* renderer , SDL_Texture* texture){
|
||||||
|
|
||||||
|
if (!texture){
|
||||||
|
|
||||||
|
SDL_SetRenderDrawColor(renderer, 0,50,0,50);
|
||||||
|
SDL_RenderClear(renderer);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
SDL_RenderCopy(renderer, texture, NULL,NULL);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
SDL_RenderCopy(renderer,texture, NULL, NULL);
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
# Cross compiler prefix
|
||||||
|
CROSS_COMPILE ?= arm-none-linux-gnueabihf-
|
||||||
|
CC := $(CROSS_COMPILE)gcc
|
||||||
|
|
||||||
|
# Fallback CFLAGS and LIBS if pkg-config cross-wrapper is missing
|
||||||
|
CFLAGS := -Wall -Wextra -O3
|
||||||
|
LIBS := -lSDL2 -lSDL2_image
|
||||||
|
|
||||||
|
TARGET := viewer_tegra
|
||||||
|
SRC := main.c
|
||||||
|
|
||||||
|
.PHONY: all clean
|
||||||
|
|
||||||
|
all: $(TARGET)
|
||||||
|
|
||||||
|
$(TARGET): $(SRC)
|
||||||
|
$(CC) $(CFLAGS) $< -o $@ $(LIBS)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f $(TARGET)
|
||||||
Reference in New Issue
Block a user