Skip to content

Instantly share code, notes, and snippets.

Avatar
😴
Having a doze

magicien magicien

😴
Having a doze
View GitHub Profile
@magicien
magicien / draw-outline.lua
Last active Feb 14, 2021
OBS用スクリプト:縁取りフィルタ(簡易版)
View draw-outline.lua
obs = obslua
bit = require('bit')
SETTING_ALPHA_THRESHOLD = 'alpha_threshold'
SETTING_LINE_COLOR = 'line_color'
SETTING_LINE_ALPHA = 'line_alpha'
SETTING_LINE_WIDTH = 'line_width'
TEXT_ALPHA_THRESHOLD = '透明度閾値'
TEXT_LINE_COLOR = '線の色'
@magicien
magicien / eos_friend_data_sample_1.swift
Created May 30, 2020
Epic Online Services: Get friend data sample in Swift
View eos_friend_data_sample_1.swift
import EOSSDK
var platformHandle: EOS_HPlatform
var accountID: EOS_EpicAccountId
// 1. Send a query to get friends info
func getFriends() {
guard let friendsHandle = EOS_Platform_GetFriendsInterface(platformHandle) else {
return
}
@magicien
magicien / eos_friend_data_sample_1.swift
Created May 30, 2020
Epic Online Services: Get friend data sample in Swift
View eos_friend_data_sample_1.swift
import EOSSDK
var platformHandle: EOS_HPlatform
var accountID: EOS_EpicAccountId
// 1. Send a query to get friends info
func initAndLogin() {
guard let friendsHandle = EOS_Platform_GetFriendsInterface(platformHandle) else {
return
}
@magicien
magicien / eos_user_data_sample.swift
Last active May 30, 2020
Epic Online Services: Get user data sample in Swift
View eos_user_data_sample.swift
import EOSSDK
var platformHandle: EOS_HPlatform
// 1. Initialize
// https://gist.github.com/magicien/a892304c22574d59923dccc95571b990
func init() {
// Initialize App, Platform
// Login
@magicien
magicien / eos_user_data_sample.swift
Created May 28, 2020
Epic Online Services: Get user data sample in Swift
View eos_user_data_sample.swift
import EOSSDK
var platformHandle: EOS_HPlatform
// 1. Initialize
// https://gist.github.com/magicien/a892304c22574d59923dccc95571b990
func init() {
// Initialize App, Platform
// Login
@magicien
magicien / EOSSDK2_module.map
Created May 24, 2020
module.map for Epic Online Services SDK (libEOSSDK-Mac-Shipping.dylib) ver2
View EOSSDK2_module.map
module EOSSDK {
umbrella header "libEOSSDK-umbrella.h"
export *
module * { export * }
}
@magicien
magicien / libEOSSDK-umbrella.h
Created May 24, 2020
Umbrella file for libEOSSDK
View libEOSSDK-umbrella.h
#import <eos_base.h>
#import <eos_common.h>
#import <eos_achievements.h>
#import <eos_achievements_types.h>
#import <eos_auth.h>
#import <eos_auth_types.h>
#import <eos_connect.h>
#import <eos_connect_types.h>
#import <eos_ecom.h>
#import <eos_ecom_types.h>
@magicien
magicien / EOSSDK_module.map
Created May 24, 2020
module.map for Epic Online Services SDK (libEOSSDK-Mac-Shipping.dylib)
View EOSSDK_module.map
module EOSSDK {
umbrella "Headers"
export *
module * { export * }
}
@magicien
magicien / eos_login_sample.swift
Created May 24, 2020
Epic Online Services Log in sample for Swift
View eos_login_sample.swift
import QuartzCore
import EOSSDK
var platformHandle: EOS_HPlatform? = nil
var displayLink: CVDisplayLink? = nil
func logFunc(message: Optional<UnsafePointer<_tagEOS_LogMessage>>) {
message?.withMemoryRebound(to: EOS_LogMessage.self, capacity: 100) {
let str = String(cString: $0.pointee.Message, encoding: .ascii)
Swift.print(str ?? "")