mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
ui/info: add \n before btanb warning strings,
misc: replace pi constant with M_PI
This commit is contained in:
parent
bc49f9786c
commit
014cc81ea6
7 changed files with 27 additions and 21 deletions
|
@ -59,7 +59,7 @@ enum
|
|||
***************************************************************************/
|
||||
|
||||
#define MCS48_LC_CLOCK(_L, _C) \
|
||||
(1 / (2 * 3.14159265358979323846 * sqrt(_L * _C)))
|
||||
(1 / (2 * M_PI * sqrt(_L * _C)))
|
||||
|
||||
#define MCS48_ALE_CLOCK(_clock) \
|
||||
attotime::from_hz(_clock/(3*5))
|
||||
|
|
|
@ -88,7 +88,7 @@ void vgmviz_device::device_start()
|
|||
|
||||
void vgmviz_device::fill_window()
|
||||
{
|
||||
float window_pos_delta = (3.14159265358979f * 2) / FFT_LENGTH;
|
||||
float window_pos_delta = (M_PI * 2) / FFT_LENGTH;
|
||||
float power = 0;
|
||||
for (int i = 0; i < (FFT_LENGTH / 2) + 1; i++)
|
||||
{
|
||||
|
|
|
@ -84,7 +84,7 @@ void get_general_warnings(std::ostream &buf, running_machine &machine, machine_f
|
|||
{
|
||||
if (bad_roms)
|
||||
buf << '\n';
|
||||
buf << _("There are known problems with this system\n\n");
|
||||
buf << _("There are known problems with this system:\n\n");
|
||||
}
|
||||
|
||||
// add a warning if any ROMs are flagged BAD_DUMP/NO_DUMP
|
||||
|
@ -139,10 +139,20 @@ void get_system_warnings(std::ostream &buf, running_machine &machine, machine_fl
|
|||
buf << _("Screen flipping in cocktail mode is not supported.\n");
|
||||
if (flags & ::machine_flags::REQUIRES_ARTWORK)
|
||||
buf << _("This system requires external artwork files.\n");
|
||||
|
||||
// add the 'BTANB' warnings
|
||||
if (flags & ::machine_flags::IS_INCOMPLETE)
|
||||
{
|
||||
if (buf.tellp() > start_position)
|
||||
buf << '\n';
|
||||
buf << _("This system was never completed. It may exhibit strange behavior or missing elements that are not bugs in the emulation.\n");
|
||||
}
|
||||
if (flags & ::machine_flags::NO_SOUND_HW)
|
||||
buf << _("This system has no sound hardware, MAME will produce no sounds, this is expected behaviour.\n");
|
||||
{
|
||||
if (buf.tellp() > start_position)
|
||||
buf << '\n';
|
||||
buf << _("This system has no sound hardware, MAME will produce no sounds, this is expected behavior.\n");
|
||||
}
|
||||
|
||||
// these are more severe warnings
|
||||
if (flags & ::machine_flags::MECHANICAL)
|
||||
|
|
|
@ -192,9 +192,9 @@ private:
|
|||
u8 m_cg_motor_on = 0;
|
||||
u8 m_cg_motor_dir = 0;
|
||||
|
||||
int m_cg_motor_clk[5];
|
||||
int m_cg_motor_pos[5];
|
||||
int m_en_pos[5];
|
||||
int m_cg_motor_clk[5] = { };
|
||||
int m_cg_motor_pos[5] = { };
|
||||
int m_en_pos[5] = { };
|
||||
|
||||
emu_timer *m_sol_filter[5];
|
||||
TIMER_CALLBACK_MEMBER(output_sol) { m_en_sol[param >> 1] = param & 1; }
|
||||
|
@ -849,7 +849,7 @@ ROM_START( cgang )
|
|||
ROM_LOAD("cg2_9c_e02a.9c", 0x00000, 0x20000, CRC(f9a3f8a0) SHA1(5ad8b408d36397227019afd15c3516f85488c6df) ) // handwritten label seen on one PCB
|
||||
|
||||
ROM_REGION( 0x20000, "adpcm1", 0 )
|
||||
ROM_LOAD("cg2_9e_586e.9e", 0x00000, 0x20000, CRC(40e7f60b) SHA1(af641b0562db1ae033cee67df583d178fd8c93f3) ) // handwritten label seen on one PCB
|
||||
ROM_LOAD("cg2_9e_586e.9e", 0x00000, 0x20000, CRC(40e7f60b) SHA1(af641b0562db1ae033cee67df583d178fd8c93f3) ) // "
|
||||
ROM_END
|
||||
|
||||
} // anonymous namespace
|
||||
|
|
|
@ -13,10 +13,6 @@
|
|||
#include <cmath>
|
||||
#define CX4_Tan(a) (CX4_CosTable[a] ? ((((int32_t)CX4_SinTable[a]) << 16) / CX4_CosTable[a]) : 0x80000000)
|
||||
#define CX4_sar(b, n) ((b) >> (n))
|
||||
#ifdef PI
|
||||
#undef PI
|
||||
#endif
|
||||
#define PI 3.1415926535897932384626433832795
|
||||
|
||||
//Wireframe Helpers
|
||||
static void CX4_C4TransfWireFrame(void)
|
||||
|
@ -26,17 +22,17 @@ static void CX4_C4TransfWireFrame(void)
|
|||
cx4.c4z = (double)cx4.C4WFZVal - 0x95;
|
||||
|
||||
//Rotate X
|
||||
cx4.tanval = -(double)cx4.C4WFX2Val * PI * 2 / 128;
|
||||
cx4.tanval = -(double)cx4.C4WFX2Val * M_PI * 2 / 128;
|
||||
cx4.c4y2 = cx4.c4y * cos(cx4.tanval) - cx4.c4z * sin(cx4.tanval);
|
||||
cx4.c4z2 = cx4.c4y * sin(cx4.tanval) + cx4.c4z * cos(cx4.tanval);
|
||||
|
||||
//Rotate Y
|
||||
cx4.tanval = -(double)cx4.C4WFY2Val * PI * 2 / 128;
|
||||
cx4.tanval = -(double)cx4.C4WFY2Val * M_PI * 2 / 128;
|
||||
cx4.c4x2 = cx4.c4x * cos(cx4.tanval) + cx4.c4z2 * sin(cx4.tanval);
|
||||
cx4.c4z = cx4.c4x * -sin(cx4.tanval) + cx4.c4z2 * cos(cx4.tanval);
|
||||
|
||||
//Rotate Z
|
||||
cx4.tanval = -(double)cx4.C4WFDist * PI * 2 / 128;
|
||||
cx4.tanval = -(double)cx4.C4WFDist * M_PI * 2 / 128;
|
||||
cx4.c4x = cx4.c4x2 * cos(cx4.tanval) - cx4.c4y2 * sin(cx4.tanval);
|
||||
cx4.c4y = cx4.c4x2 * sin(cx4.tanval) + cx4.c4y2 * cos(cx4.tanval);
|
||||
|
||||
|
@ -75,17 +71,17 @@ static void CX4_C4TransfWireFrame2(void)
|
|||
cx4.c4z = (double)cx4.C4WFZVal;
|
||||
|
||||
//Rotate X
|
||||
cx4.tanval = -(double)cx4.C4WFX2Val * PI * 2 / 128;
|
||||
cx4.tanval = -(double)cx4.C4WFX2Val * M_PI * 2 / 128;
|
||||
cx4.c4y2 = cx4.c4y * cos(cx4.tanval) - cx4.c4z * sin(cx4.tanval);
|
||||
cx4.c4z2 = cx4.c4y * sin(cx4.tanval) + cx4.c4z * cos(cx4.tanval);
|
||||
|
||||
//Rotate Y
|
||||
cx4.tanval = -(double)cx4.C4WFY2Val * PI * 2 / 128;
|
||||
cx4.tanval = -(double)cx4.C4WFY2Val * M_PI * 2 / 128;
|
||||
cx4.c4x2 = cx4.c4x * cos(cx4.tanval) + cx4.c4z2 * sin(cx4.tanval);
|
||||
cx4.c4z = cx4.c4x * -sin(cx4.tanval) + cx4.c4z2 * cos(cx4.tanval);
|
||||
|
||||
//Rotate Z
|
||||
cx4.tanval = -(double)cx4.C4WFDist * PI * 2 / 128;
|
||||
cx4.tanval = -(double)cx4.C4WFDist * M_PI * 2 / 128;
|
||||
cx4.c4x = cx4.c4x2 * cos(cx4.tanval) - cx4.c4y2 * sin(cx4.tanval);
|
||||
cx4.c4y = cx4.c4x2 * sin(cx4.tanval) + cx4.c4y2 * cos(cx4.tanval);
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ static void CX4_op1f(address_space &space)
|
|||
else
|
||||
{
|
||||
cx4.tanval = ((double)cx4.C41FYVal) / ((double)cx4.C41FXVal);
|
||||
cx4.C41FAngleRes = (int16_t)(atan(cx4.tanval) / (PI * 2) * 512);
|
||||
cx4.C41FAngleRes = (int16_t)(atan(cx4.tanval) / (M_PI * 2) * 512);
|
||||
cx4.C41FAngleRes = cx4.C41FAngleRes;
|
||||
if(cx4.C41FXVal < 0)
|
||||
{
|
||||
|
|
|
@ -742,8 +742,8 @@ rgb_t socrates_state::create_color(uint8_t color)
|
|||
int const chromaindex = color&0x0F;
|
||||
int const swappedcolor = ((color&0xf0)>>4)|((color&0x0f)<<4);
|
||||
double finalY = (1/LUMAMAX) * lumatable[swappedcolor];
|
||||
double const finalI = (M_I * (cos((phaseangle[chromaindex]/180)*3.141592653589793)))* ((1/CHROMAMAX)*chromaintensity[swappedcolor]);
|
||||
double const finalQ = (M_Q * (sin((phaseangle[chromaindex]/180)*3.141592653589793)))* ((1/CHROMAMAX)*chromaintensity[swappedcolor]);
|
||||
double const finalI = (M_I * (cos((phaseangle[chromaindex]/180)*M_PI)))* ((1/CHROMAMAX)*chromaintensity[swappedcolor]);
|
||||
double const finalQ = (M_Q * (sin((phaseangle[chromaindex]/180)*M_PI)))* ((1/CHROMAMAX)*chromaintensity[swappedcolor]);
|
||||
if (finalY > 1) finalY = 1; // clamp luma
|
||||
// calculate the R, G and B values here, neato matrix math
|
||||
double finalR = (finalY*1)+(finalI*0.9563)+(finalQ*0.6210);
|
||||
|
|
Loading…
Reference in a new issue