Working on poker logic.
This commit is contained in:
35148
tools/model/model.c
Normal file
35148
tools/model/model.c
Normal file
File diff suppressed because it is too large
Load Diff
22
tools/model/model.h
Normal file
22
tools/model/model.h
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Copyright (c) 2021 Dominic Masters
|
||||
*
|
||||
* This software is released under the MIT License.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <dawn/dawn.h>
|
||||
#include "../primitive.h"
|
||||
|
||||
#define POKER_CHIP_NAME "Poker Chip"
|
||||
#define POKER_CHIP_VERTICE_COUNT 5249
|
||||
#define POKER_CHIP_INDICE_COUNT 29874
|
||||
#define POKER_CHIP_TRIANGLE_COUNT 9958
|
||||
|
||||
/**
|
||||
* Generated Model Poker Chip
|
||||
* Generated at Sun, 30 May 2021 01:23:51 GMT
|
||||
* @returns Poker Chip as a primitive.
|
||||
*/
|
||||
primitive_t * pokerChipCreate();
|
@ -12,7 +12,7 @@ const FLIP_TEXTURE_Y = true;
|
||||
let rawVertices = [];
|
||||
let faces = [];
|
||||
let coordinates = [];
|
||||
const filePath = path.join(__dirname, '..', '..', 'assets', 'models', 'Chip Single', 'Single Chip.obj');
|
||||
const filePath = path.join(__dirname, '..', '..', 'assets', 'models', 'poker table_del', 'poker_table.obj');
|
||||
const data = fs.readFileSync(filePath, 'utf-8');
|
||||
|
||||
const scale = 0.1;
|
||||
@ -103,7 +103,7 @@ const header = `${license}
|
||||
* Generated at ${new Date().toUTCString()}
|
||||
* @returns ${MODEL_NAME} as a primitive.
|
||||
*/
|
||||
primitive_t * ${MODEL_NAME_CAMEL}Create();
|
||||
void ${MODEL_NAME_CAMEL}Init(primitive_t *primitive);
|
||||
`;
|
||||
|
||||
// Write Source file
|
||||
@ -118,7 +118,7 @@ const strIndices = indices.map(i => {
|
||||
const source = `${license}
|
||||
#include "${fn}.h"
|
||||
|
||||
primitive_t * ${MODEL_NAME_CAMEL}Create() {
|
||||
primitive_t * ${MODEL_NAME_CAMEL}Create(primitive_t *primitive) {
|
||||
vertice_t vertices[${MODEL_NAME_CAPS}_VERTICE_COUNT] = {
|
||||
${strVertices}
|
||||
};
|
||||
@ -127,7 +127,7 @@ primitive_t * ${MODEL_NAME_CAMEL}Create() {
|
||||
${strIndices}
|
||||
};
|
||||
|
||||
primitive_t *primitive = primitiveCreate(
|
||||
primitiveInit(
|
||||
${MODEL_NAME_CAPS}_VERTICE_COUNT,
|
||||
${MODEL_NAME_CAPS}_INDICE_COUNT
|
||||
);
|
||||
|
Reference in New Issue
Block a user