allegro

Linking with -static-libstdc++ flag on MinGW 4.7.1 [closed]

主宰稳场 提交于 2019-11-30 18:00:22
I try to compile (Allegro 5) on MinGW 4.7.1 (using Code::Blocks 12.11 on Win 7) with compiler flags (write them in Project :: Linker settings :: Other linker settings): -static-libgcc -static-libstdc++ Result: unrecognized command line option '-static-libstdc++' How to solve it? What does g++ --version say? I don't know the exact version when it was introduced, but -static-libstdc++ is a fairly recent addition. Before, you had to do something like -static -lstdc++ -dynamic . (If the compiler version is 4.7.1, this should not be a problem, but I don't know how MinGW versions map to the actual

Render a vector graphic (.svg) in C++

↘锁芯ラ 提交于 2019-11-30 12:57:42
问题 My and a friend are working on a 2D game where the graphics will be .svg files and we will scale them appropriately either by rasterizing them first, or rendering them directly on a surface (which still would require rasterization at some point). The problem is, I've been looking all day to find a library that will allow me to take an .svg file and eventually get it to render in allegro. As far as I know, it would involve rasterization into some sort of format that allegro can read and then

cadence Allegro 焊盘制作笔记

孤人 提交于 2019-11-30 07:54:36
PasteMask_Top  助焊层【与焊盘大小对应,对应钢网文件的孔】 SolderMask_Top   阻焊层【负片,实际是不盖绿油漏出铜皮的部分,通常比规则焊盘大4mil(0.1mm)】 阻焊层就是 solder mask,是指印刷电路板子上要上绿油的部分。实际上这阻焊层使用的是负片输出,所以在阻焊层的形状映射到板子上以后,并不是上了绿油阻焊,反而是露出了铜皮。 助焊层 paste mask,是机器贴片时要用的,是对应所的贴片元件的焊盘的,大小与toplayer/bottomlayer层一样,是用来开钢网漏锡用的。 来源: https://www.cnblogs.com/guanglun/p/11573744.html

Best way to detect collision between sprites?

最后都变了- 提交于 2019-11-30 07:43:53
问题 Whats the best way to detect collisions in a 2d game sprites? I am currently working in allegro and G++ 回答1: There are a plethora of ways to detect collision detection. The methods you use will be slightly altered if depending on if your using a 2d or 3d environment. Also remember when instituting a collision detection system, to take into account any physics you may want to implement in the game (needed for most descent 3d games) in order to enhance the reality of it. The short version is to

Render a vector graphic (.svg) in C++

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-30 03:58:52
My and a friend are working on a 2D game where the graphics will be .svg files and we will scale them appropriately either by rasterizing them first, or rendering them directly on a surface (which still would require rasterization at some point). The problem is, I've been looking all day to find a library that will allow me to take an .svg file and eventually get it to render in allegro. As far as I know, it would involve rasterization into some sort of format that allegro can read and then allegro could render the "flattened" image. So what are some C++ libraries I could use for taking an

Linking with -static-libstdc++ flag on MinGW 4.7.1 [closed]

一曲冷凌霜 提交于 2019-11-29 18:22:57
问题 I try to compile (Allegro 5) on MinGW 4.7.1 (using Code::Blocks 12.11 on Win 7) with compiler flags (write them in Project :: Linker settings :: Other linker settings): -static-libgcc -static-libstdc++ Result: unrecognized command line option '-static-libstdc++' How to solve it? 回答1: What does g++ --version say? I don't know the exact version when it was introduced, but -static-libstdc++ is a fairly recent addition. Before, you had to do something like -static -lstdc++ -dynamic . (If the

Best way to detect collision between sprites?

断了今生、忘了曾经 提交于 2019-11-29 05:12:16
Whats the best way to detect collisions in a 2d game sprites? I am currently working in allegro and G++ There are a plethora of ways to detect collision detection. The methods you use will be slightly altered if depending on if your using a 2d or 3d environment. Also remember when instituting a collision detection system, to take into account any physics you may want to implement in the game (needed for most descent 3d games) in order to enhance the reality of it. The short version is to use bounding boxes. Or in other words, make each entity in the world a box, then check if each of the

Compiling C++ code with allegro 5 and g++

萝らか妹 提交于 2019-11-28 11:43:50
What flags do I need to add to g++ in order to compile code using allegro 5? I tried g++ allegro5test.cpp -o allegro5test `allegro-config --libs` but that is not working. I'm using ubuntu 11.04. I installed allegro 5 using the instructions at http://wiki.allegro.cc/index.php?title=Install_Allegro5_From_SVN/Linux/Debian I tried: g++ allegro5test.cpp -o allegro5test `allegro-config --cflags --libs` And it also gives a bunch of undefined errors, like: undefined reference to `al_install_system' allegro-config --cflags --libs outputs: -I/usr/local/include -L/usr/local/lib -lalleg So you

allegro封装制作总结

旧巷老猫 提交于 2019-11-27 13:12:06
1、0805封装的制作(贴片分立元件) 1.1、制作焊盘 1.1.1、计算焊盘尺寸 对于0805来说,贴片电阻和贴片电容的封装是一样的,首先计算PCB焊盘的宽度X,高度Y和总长度G。 因为我们制作0805封装,所以PCB焊盘宽度X = 1.20mm,PCB焊盘高度Y = 1.40mm,PCB总长度G = 3.20mm。 1.1.2、制作焊盘 Begin Layer(Top层):Regular Pad选择Rectangle,Width=1.20mm,Height=1.40mm; SOLDERMASK_TOP(绿油层):Regular Pad选择Rectangle,Width=1.2mm+4~20mil(0.1mm~0.5mm), Height=1.4mm+4~20mil (0.1mm~0.5mm) ; PASTEMASK_TOP (钢网层) :Regular Pad选择Rectangle,Width=1.2mm,Height=1.4mm; 其他层不用考虑,设置界面如下图所示。 之后保存为焊盘文件r0805_1mm2_1mm4.pad。 1.2、制作封装 1.2.1、各层的尺寸约束 表贴封装必须包含的层: 元件实体范围(Place_bound) 含义:表明在元件在电路板上所占位置的大小,防止其他元件的侵入,若其他元件进入该区域则自动提示DRC报错。 形状:分立元件的Place

Compiling C++ code with allegro 5 and g++

偶尔善良 提交于 2019-11-27 06:25:15
问题 What flags do I need to add to g++ in order to compile code using allegro 5? I tried g++ allegro5test.cpp -o allegro5test `allegro-config --libs` but that is not working. I'm using ubuntu 11.04. I installed allegro 5 using the instructions at http://wiki.allegro.cc/index.php?title=Install_Allegro5_From_SVN/Linux/Debian I tried: g++ allegro5test.cpp -o allegro5test `allegro-config --cflags --libs` And it also gives a bunch of undefined errors, like: undefined reference to `al_install_system'