This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pixel manipulation: SDL_LockTexture and SDL_MapRGBA sample on Emscripten. | |
# https://gamedev.stackexchange.com/questions/98641/how-do-i-modify-textures-in-sdl-with-direct-pixel-access | |
bellow code dont run. | |
SDL_PixelFormat pixelFormat; | |
pixelFormat.format = format; | |
# rewrite my code. | |
ctx->pixelFormat = SDL_AllocFormat(SDL_PIXELFORMAT_RGBA8888); | |
*p = SDL_MapRGBA(ctx->pixelFormat, 255, 0, 0, 255); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" タイピングゲーム """ | |
import random | |
import sys | |
import pygame | |
def select_word(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
emcc test_pixel2.c ^ | |
-O2 ^ | |
-Wall -Wextra -pedantic ^ | |
-s USE_SDL=2 ^ | |
-s USE_SDL_IMAGE=2 -s SDL2_IMAGE_FORMATS="[""png""]" ^ | |
-s USE_SDL_TTF=2 ^ | |
--preload-file assets ^ | |
-o test_pixel2.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Unity2020.1.4f1でビルドしたら、Google Play Consoleでエラーが出たので調べました。 | |
管理者権限でcmdコマンドプロンプト起動して以下のコマンドを入れていく。 | |
set java_home="C:\Program Files\Unity\Hub\Editor\2020.1.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK" | |
set android_home="C:\Program Files\Unity\Hub\Editor\2020.1.4f1\Editor\Data\PlaybackEngines\AndroidPlayer" | |
cd "C:\Program Files\Unity\Hub\Editor\2020.1.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\bin" | |
sdkmanager.bat --update | |
sdkmanager "platform-tools" "platforms;android-29" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define _XTAL_FREQ 4000000L | |
// PIC16F628A Configuration Bit Settings | |
// 'C' source line config statements | |
// CONFIG | |
#pragma config FOSC = INTOSCIO // Oscillator Selection bits (INTOSC oscillator: I/O function on RA6/OSC2/CLKOUT pin, I/O function on RA7/OSC1/CLKIN) | |
#pragma config WDTE = OFF // Watchdog Timer Enable bit (WDT disabled) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* GccApplication1.c | |
* | |
* Created: 2020/04/24 19:51:08 | |
* Author : dev001hajipro | |
8-PDIP | |
PB5 1| tiny13 8|VCC | |
A3 PB3 2| |PB2 (SCK A1 | |
A2 PB4 3| |PB1 (MISO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
emcc test_pixel.c ^ | |
-O2 ^ | |
-s USE_SDL=2 ^ | |
-s USE_SDL_IMAGE=2 -s SDL2_IMAGE_FORMATS="[""png""]" ^ | |
-s USE_SDL_TTF=2 ^ | |
--preload-file assets ^ | |
-o test_pixel.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# a initial term | |
# d common_difference | |
def arithmetic_progression(a = 0, d = 0, n = 1): | |
print(a + (d * (n-1))) | |
return a + (d * (n-1)) | |
def main(): | |
nnn = [arithmetic_progression(5, 2, i) for i in range(1,10)] | |
print(nnn) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This file is part of www.nand2tetris.org | |
// and the book "The Elements of Computing Systems" | |
// by Nisan and Schocken, MIT Press. | |
// File name: projects/01/Mux8Way16.hdl | |
/** | |
* 8-way 16-bit multiplexor: | |
* out = a if sel == 000 | |
* b if sel == 001 | |
* etc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://www.youtube.com/watch?v=AaGK-fj-BAM | |
const scale = 20; | |
class Snake { | |
constructor() { | |
this.x = 0; | |
this.y = 0; | |
this.xspeed = 1; | |
this.yspeed = 0; | |
this.total = 0; | |
this.tail = []; |
NewerOlder